GeometricObjects CATCloneManager
Usage: you must use this class as is. You should never derive it.
public class CATCloneManager
Class representing the process of duplication of a CATICGMObject.
- The clone process takes the forward links into account
- A CATCloneManager can process several CATICGMObjects at the same time.
- A CATCloneManager has two modes of duplication:
- CatCGMSingleDuplicate
- Only duplicates the objects
that are Added to the CATCloneManager.
This value is only applicable in the case the objects are being copied within the same container.
- CatCGMFullDuplicate
- Duplicates the objects
that are Added to the CATCloneManager and the forward linked objects.
This value for CATCloneManagerType should be used explicitly when full copy
is desired in the case of the objects being copied within the same container.
For copying objects to a different container this value is used internally
regardless of the value assigned to CATCloneManagerType.
- A CATCloneManager offers two types of methods:
- "user methods" that are called by the application programmer
to clone CATICGMObjects: Add, Run, ReadImage,
WriteReport, GetFactory
- "object methods" that are called by the CATICGMObjects to
ask for the clone of their forward linked objects.
These methods must not be normally called,
except in the CATICGMObject::Clone method,
if you intend to create your own CATICGMObject class.
- The objects of this class are transient and cannot be streamed
code sample :
CATCloneManager MyManager(MyGeoFactory);
MyManager.Add(MyCGMObject);
MyManager.Run();
CATICGMObject* ClonedObject=MyManager.ReadImage(MyCGMObject);
MyManager.WriteReport(MyJournal, CATCGMJournal::Modification);
Constructor and Destructor Index
- o
CATCloneManager(CATGeoFactory*,CATCloneManagerType,CATSoftwareConfiguration*)
- Constructs a CATCloneManager.
- o
~CATCloneManager()
-
Method Index
- o
Add(CATICGMObject*,CATICGMObject*)
- Adds a CATICGMObject to clone with this CATCloneManager.
- o
ReadImage(CATICGMObject*)
- Returns a pointer to the CATICGMObject (called "image") corresponding to the clone
by this of a given iObject.
- o
Run()
- Runs the CATCloneManager process.
- o
WriteReport(CATCGMJournalList*&,CATCGMJournal::Type,CATBoolean)
- Writes the topological journal associated with this CATCloneManager process.
- o
WriteReport(CATICGMObject*,CATCGMJournalList*&,CATCGMJournal::Type,CATBoolean)
- Writes the topological journal for one object.
Constructor and Destructor
o CATCloneManager
public CATCloneManager( | | iFactory, |
| | iType | = CatCGMSingleDuplicate, |
| | iConfig | = NULL) |
-
Constructs a CATCloneManager.
- Parameters:
-
- iFactory
- The pointer to the factory of the resulting objects.
- iType
- The type of duplication. This is relevant when copying within the same container.
CatCGMFullDuplicate is always used for copying into a different container.
- iConfig
- The pointer to the configuration.Should not be NULL in case of topological objects.
o ~CATCloneManager
public virtual ~CATCloneManager( | ) |
-
Methods
o Add
public virtual Add( | | iObjectToClone, |
| | iWhereToPaste | = 0) |
-
Adds a CATICGMObject to clone with this CATCloneManager.
All the added objects must belong
to the same factory.
- Parameters:
-
- iObjectToClone
- The pointer to the object to add to the CATCloneManager.
- iWhereToPaste
- If not NULL, it forces the duplication of iObjectToClone to be
the object iWhereToPaste.
This can be used to copy and paste objects from one container to another one.
Notice that there is no transformation here.
o ReadImage
public virtual ReadImage( | | iObject) |
-
Returns a pointer to the CATICGMObject (called "image") corresponding to the clone
by this of a given iObject.
- Parameters:
-
- iObject
- The pointer to the object which the image is asked for.
- Returns:
- The pointer to the image if it exists. 0 otherwise.
o Run
-
Runs the CATCloneManager process.
This method should be called only once.
o WriteReport
public virtual WriteReport( | | ioJournal, |
| | iType, |
| | iAddInfo | = CATBoolean(1)) |
-
Writes the topological journal associated with this CATCloneManager process.
The journal follows the modifications of the topological
objects.
- Parameters:
-
- ioJournal
- The pointer to the journal to fill
- iType
- The type of modification to be written.
The attribute to put to the face that have just been cloned.
- CATCGMJournal::Creation
- All the duplicated faces are written
as created into the journal
- CATCGMJournal::Modification
- All the duplicated faces are written
as modified into the journal
- iAddInfo
- The activation of the journal info .
Legal values:
TRUE for the activation, FALSE otherwise.
o WriteReport
public virtual WriteReport( | | iObject, |
| | ioJournal, |
| | iType, |
| | iAddInfo | = CATBoolean(1)) |
-
Writes the topological journal for one object.
- Parameters:
-
- iObject
- The pointer to the object to follow.
- ioJournal
- The pointer to the journal to fill
- iType
- The type of modification to be written.
The attribute to put to the face that have just been cloned.
- CATCGMJournal::Creation
- All the duplicated faces are written
as created into the journal
- CATCGMJournal::Modification
- All the duplicated faces are written
as modified into the journal
- iAddInfo
- The activation of the journal info .
Legal values:
TRUE for the activation, FALSE otherwise.
This object is included in the file: CATCloneManager.h
If needed, your Imakefile.mk should include the module: CATGeometricObjects
Copyright © 1999-2014, Dassault Systèmes. All rights reserved.