Home

SPAIConverter Class Reference

The SPAIConverter class. More...

#include <SPAIConverter.h>

Inheritance diagram for SPAIConverter:

Inheritance graph
[legend]
Collaboration diagram for SPAIConverter:

Collaboration graph
[legend]

List of all members.

Public Member Functions

SPAIResult AppendOptions (const SPAIOptions &iOptions)
 Appends the translation options to already existing options.
SPAIResult Convert (const SPAIDocument &iSourceDocument, const SPAIDocument &iTargetDocument)
 Converts the source document to the target document format.
void * GetData () const
 For Spatial Corp.
virtual bool IsValid () const
SPAIResult RegisterComponent (const wchar_t *ipw1, const wchar_t *ipw2, int iI1, const wchar_t *ipw3)
 For internal use of Spatial Corp.
SPAIResult SetConverterCallback (const SPAIConverterCallback iCallbackFunction)
 Sets a callback function that allows mapping of entities of source and target document.
void SetData (void *ipData)
 For Spatial Corp.
SPAIResult SetOptions (const SPAIOptions &iOptions)
 Set the translation options.
SPAIResult SetProgressCallback (const SPAIProgressCallback iCallbackFunction)
 Sets a callback function that lets the embeding application monitor the translation progress.
 SPAIConverter (SPAXConverter *ipConverteImplementation)
 Constructor.
 SPAIConverter ()
 Constructor.
SPAIResult StartLog (const SPAIFile &iLogFile)
 Sets and activates the log file for the next convertion.
SPAIResult StopLog (const SPAIFile &iLogFile)
 Deactivates the log file.
virtual ~SPAIConverter ()
 Destructor.

Protected Member Functions

int Ref ()
int Unref ()

Protected Attributes

SPAIObjectType _type


Detailed Description

The SPAIConverter class.

SPAIConverter provides for the translation capability from one source document to a target document. SPAIConverter also provides for translation control with options, logging and progress report methods. Typical usage of SPAIConverter would be as follow : SPAIDocument src("MyAcisFile.sat"); SPAIDocument dst("MyCATIAV5File.CATPart");

SPAIConverter converter;

SPAIFile log("MyLogFile.txt"); result&=converter.StartLog(log); result&=converter.Convert(src, dst); result&=converter.StopLog(log);

See also:
SPAIDocument

Constructor & Destructor Documentation

SPAIConverter::SPAIConverter (  ) 

Constructor.

SPAIConverter::SPAIConverter ( SPAXConverter *  ipConverteImplementation  ) 

Constructor.

Parameters:
ipConverteImplementation the implementation object of SPAIConverter. SPAIConverter will not own the implementation object. So it will not release it.

virtual SPAIConverter::~SPAIConverter (  )  [virtual]

Destructor.


Member Function Documentation

SPAIResult SPAIConverter::AppendOptions ( const SPAIOptions iOptions  ) 

Appends the translation options to already existing options.

Parameters:
iOptions,: the translation options to append.

SPAIResult SPAIConverter::Convert ( const SPAIDocument iSourceDocument,
const SPAIDocument iTargetDocument 
)

Converts the source document to the target document format.

Parameters:
iSourceDocument The source document.
iTargetDocument The target document.
Returns:
The translation result.

void* SPAIObject::GetData (  )  const [inherited]

For Spatial Corp.

internal use only.

virtual bool SPAIObject::IsValid (  )  const [virtual, inherited]

Returns:
true if this object was correctly initialized ; false otherwise.

int SPAIObject::Ref (  )  [protected, inherited]

SPAIResult SPAIConverter::RegisterComponent ( const wchar_t *  ipw1,
const wchar_t *  ipw2,
int  iI1,
const wchar_t *  ipw3 
)

For internal use of Spatial Corp.

SPAIResult SPAIConverter::SetConverterCallback ( const SPAIConverterCallback  iCallbackFunction  ) 

Sets a callback function that allows mapping of entities of source and target document.

Parameters:
iCallbackFunction the application callback function

void SPAIObject::SetData ( void *  ipData  )  [inherited]

For Spatial Corp.

internal use only.

SPAIResult SPAIConverter::SetOptions ( const SPAIOptions iOptions  ) 

Set the translation options.

Parameters:
iOptions,: the translation options.

SPAIResult SPAIConverter::SetProgressCallback ( const SPAIProgressCallback  iCallbackFunction  ) 

Sets a callback function that lets the embeding application monitor the translation progress.

Parameters:
iCallbackFunction the application callback function

SPAIResult SPAIConverter::StartLog ( const SPAIFile iLogFile  ) 

Sets and activates the log file for the next convertion.

Parameters:
iLogFile the log file.

SPAIResult SPAIConverter::StopLog ( const SPAIFile iLogFile  ) 

Deactivates the log file.

Parameters:
iLogFile the log file.

int SPAIObject::Unref (  )  [protected, inherited]


Member Data Documentation

SPAIObjectType SPAIObject::_type [protected, inherited]