Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_IBClassToCPXML Class Reference

Inheritance diagram for CP_IBClassToCPXML:

CP_NoCopy List of all members.

Public Member Functions

Constructor / Destructor
 CP_IBClassToCPXML ()
 Constructor.
virtual ~CP_IBClassToCPXML () throw ()
 Destructor.
IBClassToXMLConversion
void RegisterIBClassToXMLConverter (char *inIBClassName, IBClassToXMLConverterCallback inCallback)
IBClassToXMLConverterCallback FindXMLConverterFromIBClassName (CP_String &inIBClassName)
CustomControlToCplat
void RegisterCustomControlToCPLATClassName (UInt32 inCustomControlID, const CP_String &inCPLATClassName)
CP_String FindCPLATClassNameFromCustomControlID (UInt32 inCustomControlID)
Output
CP_FileSystemSpec GetOutputDirectorySpec ()
void SetOutputDirectorySpec (const CP_FileSystemSpec &inSpec)

Static Public Member Functions

Instance
static CP_IBClassToCPXMLInstance ()

Protected Attributes

CP_IBClassToXMLWriter_Map fIBClasstoXMLArray
CP_FileSystemSpec fOutputDirectorySpec
CP_CustomControlToCPLATClass_Map fCustomControlIDToCPLATClassName

Static Protected Attributes

static CP_IBClassToCPXMLfsInstance = NULL

Constructor & Destructor Documentation

CP_IBClassToCPXML::CP_IBClassToCPXML  ) 
 

Constructor.

Exceptions:
none 

CP_IBClassToCPXML::~CP_IBClassToCPXML  )  throw () [virtual]
 

Destructor.

Exceptions:
none 


Member Function Documentation

CP_IBClassToCPXML * CP_IBClassToCPXML::Instance  )  [static]
 

Returns the single instance of this class.

Exceptions:
none 
Returns:
CP_IBClassToCPXML * The single instance of this class.

void CP_IBClassToCPXML::RegisterIBClassToXMLConverter char *  inIBClassName,
IBClassToXMLConverterCallback  inCallback
 

Registers the converter function to be called when a node with the passed in inIBClassName is encountered in the xml file.

If you call the function RegisterKnownIBClasses(), then all of the known classes in InterfaceBuilder will be registered for you, so you don't have to call this for each class.

There is a convenience macro that gives a simple way to register classes: CP_RegisterIBClassConverter and can be called like:

        CP_RegisterIBClassConverter( kCP_IBCarbonButton,            IBClassPushButtonToXML );
        CP_RegisterIBClassConverter( kCP_IBCarbonBevelButton,       IBClassBevelButtonToXML );

Parameters:
inIBClassName The name of the class as found in the nibs .xib file.
inClassback The function to be called when an object of inIBClasssName is encountered.
Exceptions:
none 
Returns:
void

IBClassToXMLConverterCallback CP_IBClassToCPXML::FindXMLConverterFromIBClassName CP_String inIBClassName  ) 
 

Find the previously registered converter function for the passed in class name.

Parameters:
inIBClassName The name of the class as found in the nibs .xib file.
Exceptions:
none 
Returns:
IBClassToXMLConverterCallback Callback used to convert the class.

void CP_IBClassToCPXML::RegisterCustomControlToCPLATClassName UInt32  inCustomControlID,
const CP_String inCPLATClassName
 

Registers a custom control id and its associated CPLAT class name. In Interface Builder we use the custom control to create any controls which Interface Builder does not have built in support for. The custom control id is entered in the Class ID under the attributes pane.

There is a convenience macro that gives a simple way to register classes: CP_RegisterCustomControlID and can be called like:

        CP_RegisterCustomControlID( kCP_CustomClassID_TV_DataBrowser,       kCP_ClassName_DataBrowser );
        CP_RegisterCustomControlID( kCP_CustomClassID_Placard,              kCP_ClassName_Placard );

Parameters:
inCustomControlID The CPLAT control identifier for this class.
inCPLATClassName The name of the CPLAT class including the CPLAT namespace, as follows: CPLAT::CP_ClassName.
Exceptions:
none 
Returns:
void

CP_String CP_IBClassToCPXML::FindCPLATClassNameFromCustomControlID UInt32  inCustomControlID  ) 
 

Returns the name of the CPLAT class that was registered with the passed in inCustomControlID.

Parameters:
inCustomControlID The CPLAT control identifier for this class.
Exceptions:
none 
Returns:
CP_String The CPLAT class name.

CP_FileSystemSpec CP_IBClassToCPXML::GetOutputDirectorySpec  ) 
 

void CP_IBClassToCPXML::SetOutputDirectorySpec const CP_FileSystemSpec inSpec  ) 
 


Member Data Documentation

CPLAT_Begin_Namespace_CPLAT CP_IBClassToCPXML * CP_IBClassToCPXML::fsInstance = NULL [static, protected]
 

CP_IBClassToXMLWriter_Map CP_IBClassToCPXML::fIBClasstoXMLArray [protected]
 

Single instance of this class.

CP_FileSystemSpec CP_IBClassToCPXML::fOutputDirectorySpec [protected]
 

Maps a class name in IB to corresponding CPLAT class. This map is filled in through users registering the mapping.

CP_CustomControlToCPLATClass_Map CP_IBClassToCPXML::fCustomControlIDToCPLATClassName [protected]
 

Location to write the generated XML.


The documentation for this class was generated from the following files:
Generated on Tue Sep 20 20:21:48 2005 for CPLAT_MacOS by  doxygen 1.4.0