All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

MechanicalModeler Class CATMmrAlgoConfigServices

CATMmrAlgoConfigServices
 

Usage: you must use this class as is. You should never derive it.


public class CATMmrAlgoConfigServices

Class providing services to manage the mechanical feature versionning.


Role:


Note about the different methods provided by this class and when to use them:

See the CAA article entitled "Integrating a New Geometrical Feature in the Update Mechanism" for an example of the use of the methods of this class.


Method Index


o CreateConfigurationData(CATISpecObject*)
Initializes a data needed to store the configuration of the feature.
o GetConfiguration(CATISpecObject*,CATSoftwareConfiguration*&,int&)
Reads the configuration stored on a mechanical feature.
o StoreConfiguration(CATISpecObject*,CATSoftwareConfiguration*)
Stores a configuration on a mechanical feature.

Methods


o CreateConfigurationData
public static HRESULT CreateConfigurationData( const CATISpecObject* iFeature)
Initializes a data needed to store the configuration of the feature.

Role:
This method initializes a data needed to store the configuration that allows to version your feature.

Note:
Parameters:
iFeature
The mechanical feature to version.
Returns:
  • S_OK if the data has been correctly initialized.
  • E_INVALIDARG if iFeature:
    • is NULL
    • is not a mechanical feature
  • E_FAIL for all other problems.


o GetConfiguration
public static HRESULT GetConfiguration( const CATISpecObject* iFeature,
CATSoftwareConfiguration*& oConfig,
int& oIsConfigToStore)
Reads the configuration stored on a mechanical feature.

Role:
This method reads the configuration stored on the mechanical feature.
It must be called at the beginning of the build of your feature.

Note:
Parameters:
iFeature
The feature on which you want to read the configuration.
oConfig
The configuration read (or created if the feature has no configuration stored) on the feature.
This object must be released at the end of the treatement!
oIsConfigToStore
This integer allows to know if the configuration provided must be stored on the feature.
  • oIsConfigToStore = 1, the configuration must be stored.
  • oIsConfigToStore = 0, the configuration must not be stored.

Returns:
  • S_OK if the configuration has been correctly read on the feature (or created if no configuration is stored on the feature).
  • S_FALSE if iFeature is an old created feature which does not have any configuration yet.
  • E_INVALIDARG if iFeature:
    • is NULL
    • is not a mechanical feature
  • E_FAIL for all other problems.


o StoreConfiguration
public static HRESULT StoreConfiguration( const CATISpecObject* iFeature,
CATSoftwareConfiguration* iConfig)
Stores a configuration on a mechanical feature.

Role:
This method stores the configuration that allow to version your mechanical feature.
It must be called at the end of the build of your feature. Check the value of the oIsConfigToStore parameter of the GetConfiguration method to know when it's usefull to call this method.

Note:

Parameters:
iFeature
The feature that stores the configuration.
iConfig
The configuration that must be stored on the feature.
The configuration is not released if the store is done. The release must be done by the user!

Returns:
  • S_OK if the configuration has been correctly stored on the feature, or if it was useless to call this method (because the configuration is already stored on the feature).
  • E_INVALIDARG if iFeature:
    • is NULL
    • is not a mechanical feature
  • E_INVALIDARG if iConfig:
    • is NULL
    • is not the same configuration that the one provided by the GetConfiguration method
  • E_FAIL for all other problems.



This object is included in the file: CATMmrAlgoConfigServices.h
If needed, your Imakefile.mk should include the module: CATMechanicalModeler

Copyright © 2003, Dassault Systèmes. All rights reserved.