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:
This class is used to manage the that is needed to version a mechanical feature.
But this class doesn't provide services that modify the CATSoftwareConfiguration.
At the end of the first build, the configuration must be stored thanks to the
method. After this storage, the configuration can not be modified anymore. It is impossible to by-pass this restriction
thanks to a new call of the "store" method with a different configuration. It's the only way to assure that the
configuration used during the following builds will be the same that during the first one.
So if you use these methods correctly, your feature will have the same behavior update after update.
Note about the different methods provided by this class and when to use them:
-
The
method must be called in your factory implementation.
It allows to initialize an internal mechanical data needed to manage the configuration.
If this method is not properly used, the rest of the methods of this class will have a bad behavior.
-
The
and
methods must be used during the build, in the
interface implementation of your feature.
Like the configuration is a common data that allows to version the different softwares (DS softwares and
your owns) called during the build, the
method must be called at the begining of the build, and the
method at its ends.
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:
-
This method must be called in the method instanciating the feature. More generally in the factory
implementation.
-
If this method is not properly used, the rest of the methods of this class will have a bad behavior.
- 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:
-
If the
method has not been correctly called on the feature (because it's an old feature not versionned, or because you made an error in the use of this method), an empty
configuration is provided. This configuration can not be valuated.
In this case the oIsConfigToStore parameter shows that it's useless to store the configuration.
-
If your feature has not been built yet, like it has no configuration at this step, an empty
configuration is provided. This configuration can be valuated.
In this case the oIsConfigToStore parameter shows that the configuration must be stored,
and so you will have to store it at the end of the build of your feature, thanks to the
method.
-
If the feature has already been built one time, it's the configuration stored at the end of the first
build that is provided. This configuration can not be valuated or modified.
In this case the oIsConfigToStore parameter shows that it's useless to store the configuration.
- 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:
-
If the
method has not been correctly called on the feature (because it's an old feature not versionned, or because you made an error in the use of this method), nothing is done.
-
The configuration that is passed must be the same configuration that the one provided by the
method.
-
The method checks that the configuration must effectively be stored. If it's not the case, nothing is done.
- 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.