CATMathStream class CATSoftwareModification

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


public class CATSoftwareModification

Class defining a software modification.
The CATSoftwareConfiguration and CATSoftwareModification classes allow you to modify the code of a topological operator while keeping the upwards compatibility of the data generated by the operator. If you create and save a feature with a certain code level, any attempt to modify this feature later on with a new algorithm will apply the level of code used prior to saving the feature. This guarantees no regression in the operator behaviour. By using the versioning mechanism, you can store the code level which is used to create a feature and manage the code levels to be used for future calls.

Example

    IID ModifId = { 0xa3208510, 0xe070, 0x11d3,{0xb0, 0xa8, 0x4c, 0x54, 0x01, 0x00, 0x00, 0x00}};
    CATSoftwareModification Modif(ModifId,2);
    ...
    my_operator::Run()
    CATSoftwareConfiguration* Config;
    Config = GetConfig();  
    Config = AddModification(Modif);
    int Level = Config->GetModificationLevel(Modif);
    switch(Level)
    {
       case 0 : // initial version
            {
               ...
               break;
             }
       case 1 : // version 1
             {
               ...
               break;
             }
       case 2 :  // version 2
             {
                ... 
                break;
              }
       default :
              {
                ... 
                break;
              }
      }
    


Constructor and Destructor Index


o CATSoftwareModification(IID&,short)
Constructs a CATSoftwareModification.

Method Index


o Dump(ostream&)
Dumps the content of a CATSoftwareModification;
o GetCurrentLevel()
Retrieves the current level of a mofification.
o GetModification(IID&)
Retrieves a CATSoftwareModification from its IID.
o GetModificationId()
Retrieves the IID of a mofification.
o SetCurrentLevel(short)
Modifies the current level of a mofification.

Constructor and Destructor


o CATSoftwareModification
public CATSoftwareModification( const IID& ModificationId,
short iLevel)
Constructs a CATSoftwareModification.
Parameters:
iModificationID
The CATSoftwareModification identifier.
iLevel
The current level of the modification. The initial level should be 0.

Methods


o Dump
public void Dump(ostream& os)
Dumps the content of a CATSoftwareModification;
Parameters:
os
The stream where the CATSoftwareModification is to be dumped.
o GetCurrentLevel
public short GetCurrentLevel()const
Retrieves the current level of a mofification.
Returns:
The level of the modification.
o GetModification
public static CATSoftwareModification* GetModification( const IID& iModificationID)
Retrieves a CATSoftwareModification from its IID.
Parameters:
iModificationID
The given (code) modification identified by its IID.
Returns:
The modification (a NULL pointer if the CATSoftwareModificationis not found).
o GetModificationId
public const IID* GetModificationId()const
Retrieves the IID of a mofification.
Returns:
The identifier of the modification.
o SetCurrentLevel
public void SetCurrentLevel(short iLevel)
Modifies the current level of a mofification.
Parameters:
iLevel
The new level of the modification.

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

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