CATMecModExtendItf Interface CATIMmiAlgoConfigServices

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


interface CATIMmiAlgoConfigServices

Class providing services to manage the mechanical feature versionning.

Use CATMmiExtendServicesFactory to get the services component with Component_AlgoConfigServices as class name.
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(CATIMmiMechanicalFeature*)
Initializes a data needed to store the configuration of the feature.
o GetConfiguration(CATIMmiMechanicalFeature*,CATSoftwareConfiguration*&,int&)
Reads the configuration stored on a mechanical feature.
o StoreConfiguration(CATIMmiMechanicalFeature*,CATSoftwareConfiguration*)
Stores a configuration on a mechanical feature.

Methods


o CreateConfigurationData
public virtual CreateConfigurationData( const 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 virtual GetConfiguration( const iFeature,
oConfig,
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 virtual StoreConfiguration( const iFeature,
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 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 method
  • E_FAIL for all other problems.



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

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.