Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

CP_XibToXML_Application Class Reference

List of all members.

Public Member Functions

Constructor / Destructor
 CP_XibToXML_Application ()
 Constructor.
virtual ~CP_XibToXML_Application () throw ()
 Destructor.

Protected Member Functions

Commands
virtual void HandleOpenApplication ()

Protected Attributes

CPLAT::CP_FileSystemSpec fDestinationDirectory
CPLAT::CP_FileSystemSpec fNibSpec
CP_NibNameToRef_Map fNibNameToRefMap
CPLAT::CP_Window * fAskUserWindow
CPLAT::CP_Window * fProgressWindow

Private Types

typedef CPLAT::CP_Application<
CPLAT::CP_DocumentPolicy_None,
CPLAT::CP_PrintPolicy_None,
CPLAT::CP_UndoPolicy_None > 
inherited

Private Member Functions

AskUser
void AskUserForLocations ()
Navigation Dialogs
void HandleGetOutputDirectory (CPLAT::CP_FileSystemDialogs_Base *inSendingDialog, const CPLAT::CP_FileSystemSpec &inSelection, bool inOverwrite)
void HandleGetNibsDirectory (CPLAT::CP_FileSystemDialogs_Base *inSendingDialog, const CPLAT::CP_FileSystemSpec &inSelection, bool inOverwrite)
Nib Conversion
void HandleNibConversion (CPLAT::CP_FileSystemSpec &inFileSpec)
void FindIBCarbonWindowNode (CPLAT::CP_XMLDocNode *inParentNode)
void ConvertWindowsInNib (CPLAT::CP_FileSystemSpec &inNibSpec)
Slots
void AskForDestinationDirectory (CPLAT::OSStatus &inOutStatus, CPLAT::CP_CommandNo &inCommandNo)
void AskForDestinationNib (CPLAT::OSStatus &inOutStatus, CPLAT::CP_CommandNo &inCommandNo)
void HandleConversion (CPLAT::OSStatus &inOutStatus, CPLAT::CP_CommandNo &inCommandNo)
void HandleCancel (CPLAT::OSStatus &inOutStatus, CPLAT::CP_CommandNo &inCommandNo)
Writing
void CreateXMLWriter (const CPLAT::CP_FileSystemSpec &inFileSpec, CPLAT::CP_XMLWriter_Element **inOutRootElement, CPLAT::CP_XMLWriter_Element **inOutParentElement)
void WriteXMLToFile (CPLAT::CP_XMLWriter_Element *inRootElement, const CPLAT::CP_FileSystemSpec &inFileSpec)
Utility
CPLAT::CP_FileSystemSpec FindNibDirectory (CPLAT::CP_CFBundle &inBundle, CPLAT::CP_String &inOutName)
void BuildNibNameMap (CPLAT::CP_XMLDocNode *inRootNode)
CPLAT::CP_String FindWindowRefFromRefID (CPLAT::CP_String &inRefID)
void DisplayProgress (CPLAT::CP_Window *inParentWindow)
void CloseProgress ()

Member Typedef Documentation

typedef CPLAT::CP_Application<CPLAT::CP_DocumentPolicy_None, CPLAT::CP_PrintPolicy_None, CPLAT::CP_UndoPolicy_None> CP_XibToXML_Application::inherited [private]
 


Constructor & Destructor Documentation

CP_XibToXML_Application::CP_XibToXML_Application  ) 
 

Constructor.

Exceptions:
none 

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

Destructor.

Exceptions:
none 


Member Function Documentation

void CP_XibToXML_Application::HandleOpenApplication  )  [protected, virtual]
 

Called when the application first starts up.

Exceptions:
none 
Returns:
void

void CP_XibToXML_Application::AskUserForLocations  )  [private]
 

Main user interaction portion of tool to create the main window allowing the user to select the source Nib, and corresponding output directory.

Exceptions:
none 
Returns:
void

void CP_XibToXML_Application::HandleGetOutputDirectory CPLAT::CP_FileSystemDialogs_Base *  inSendingDialog,
const CPLAT::CP_FileSystemSpec &  inSelection,
bool  inOverwrite
[private]
 

Called when the user selects a directory from the get directory dialog to select the output directory.

Parameters:
inSendingDialog Not used.
inSelection The selected directory.
inOverwrite Not used.
Exceptions:
none 
Returns:
void

void CP_XibToXML_Application::HandleGetNibsDirectory CPLAT::CP_FileSystemDialogs_Base *  inSendingDialog,
const CPLAT::CP_FileSystemSpec &  inSelection,
bool  inOverwrite
[private]
 

Called when the user selects a nib file from the get file dialog to select the nib file to convert.

Parameters:
inSendingDialog Not used.
inSelection The selected directory.
inOverwrite Not used.
Exceptions:
none 
Returns:
void

void CP_XibToXML_Application::HandleNibConversion CPLAT::CP_FileSystemSpec &  inFileSpec  )  [private]
 

This is called from the choose directory callback when the user is asked to select a directory that containns the nib to be converted. This will go through each nib, and convert the windows located in the nibs.

Parameters:
inFileSpec The file spec of of the directory that contains the nibs to be converted.
Exceptions:
none - Exceptions are caught in this method.
Returns:
void

void CP_XibToXML_Application::FindIBCarbonWindowNode CPLAT::CP_XMLDocNode *  inParentNode  )  [private]
 

Finds the XML node that contains the definition of the IBCarbonWindow, which is the parent node of the window and its subview descriptions.

Exceptions:
none 
Returns:
void

void CP_XibToXML_Application::ConvertWindowsInNib CPLAT::CP_FileSystemSpec &  inNibSpec  )  [private]
 

Converts the windows found in the nib file from the passed in file spec.

Parameters:
inNibSpec File system spec for the nib file to convert.
Exceptions:
none 
Returns:
void

void CP_XibToXML_Application::AskForDestinationDirectory CPLAT::OSStatus &  inOutStatus,
CPLAT::CP_CommandNo inCommandNo
[private]
 

Ask the user for the output directory, where the files will be written to.

Parameters:
inOutStatus Not used.
inCommandNo Not used.
Exceptions:
none 
Returns:
void

void CP_XibToXML_Application::AskForDestinationNib CPLAT::OSStatus &  inOutStatus,
CPLAT::CP_CommandNo inCommandNo
[private]
 

Ask the user for the nib file to convert.

Parameters:
inOutStatus Not used.
inCommandNo Not used.
Exceptions:
none 
Returns:
void

void CP_XibToXML_Application::HandleConversion CPLAT::OSStatus &  inOutStatus,
CPLAT::CP_CommandNo inCommandNo
[private]
 

Routine to handle conversion of the nib file once the user has selected the nib and output directory, and selected convert from the main window.

Parameters:
inOutStatus Not used.
inCommandNo Not used.
Exceptions:
none 
Returns:
void

void CP_XibToXML_Application::HandleCancel CPLAT::OSStatus &  inOutStatus,
CPLAT::CP_CommandNo inCommandNo
[private]
 

Called when the user selects cancel from the main window, this will quit the application.

Parameters:
inOutStatus Passed to the HandleQuitCommand.
inCommandNo Passed to the HandleQuitCommand.
Exceptions:
none 
Returns:
void

void CP_XibToXML_Application::CreateXMLWriter const CPLAT::CP_FileSystemSpec &  inFileSpec,
CPLAT::CP_XMLWriter_Element **  inOutRootElement,
CPLAT::CP_XMLWriter_Element **  inOutParentElement
[private]
 

Creates the XMLWriter and root elements to write out our data.

Parameters:
inFileSpec Location of the output XML file.
inOutRootElement Location to return the constructed root element.
inOutParentElement Location to return the constructed parent element.
Exceptions:
none 
Returns:
void

void CP_XibToXML_Application::WriteXMLToFile CPLAT::CP_XMLWriter_Element inRootElement,
const CPLAT::CP_FileSystemSpec &  inFileSpec
[private]
 

CPLAT::CP_FileSystemSpec CP_XibToXML_Application::FindNibDirectory CPLAT::CP_CFBundle &  inBundle,
CPLAT::CP_String &  inOutName
[private]
 

Return a file system spec object for the nib directory in the passed in CFBundle object.

Parameters:
inBundle The CFBundle we are searching for the nib.
inOutName The name of the nib in the bundle.
Exceptions:
none 
Returns:
void

void CP_XibToXML_Application::BuildNibNameMap CPLAT::CP_XMLDocNode *  inRootNode  )  [private]
 

Builds the name map that corresponds to the name of objects and their id in the nib file.

Parameters:
inRootNode The root node to start searching in.
Exceptions:
none 
Returns:
void

CPLAT::CP_String CP_XibToXML_Application::FindWindowRefFromRefID CPLAT::CP_String &  inRefID  )  [private]
 

Returns a window reference string from the passed in reference id.

Parameters:
inRefID Refrence id of the window we want to return the window name of.
Exceptions:
none 
Returns:
void

void CP_XibToXML_Application::DisplayProgress CPLAT::CP_Window *  inParentWindow  )  [private]
 

Displays a progress dialog during the conversion process.

Parameters:
inParentWindow Not used.
Exceptions:
none 
Returns:
void

void CP_XibToXML_Application::CloseProgress  )  [private]
 

Closses and deletes the progress dialog window.

Parameters:
inParentWindow Not used.
Exceptions:
none 
Returns:
void


Member Data Documentation

CPLAT::CP_FileSystemSpec CP_XibToXML_Application::fDestinationDirectory [protected]
 

CPLAT::CP_FileSystemSpec CP_XibToXML_Application::fNibSpec [protected]
 

The directory to write the xml file out to.

CP_NibNameToRef_Map CP_XibToXML_Application::fNibNameToRefMap [protected]
 

CPLAT::CP_Window* CP_XibToXML_Application::fAskUserWindow [protected]
 

A map that contains a reference between the window names and the data in the Interface Builder xib file.

CPLAT::CP_Window* CP_XibToXML_Application::fProgressWindow [protected]
 


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