C3D Toolkit  Kernel - 109696, Vision - 2.4.0.76

Registrator of copied objects. More...

#include <item_registrator.h>

Public Member Functions

 MbRegDuplicate ()
 Constructor.
 
virtual ~MbRegDuplicate ()
 Destructor.
 
virtual bool IsReg (const MbRefItem *srcItem, MbRefItem *&cpyItem)=0
 Check whether copy of the object is registered. More...
 
virtual void SetReg (const MbRefItem *srcItem, MbRefItem *cpyItem)=0
 Register copy of the object. More...
 
virtual void Free ()=0
 Free memory and remove itself.
 

Detailed Description

Registrator of copied objects.

Registrator is used to construct the correct copies of objects. which contain pointers to other geometries.
Object pointer can be contained in several other objects for copying. Registrar is used to prevent multiple copying of the object. Registrator consists of two synchronous arrays. The first array contains pointers to copied objects, the second array contains pointers to their copies.
When copying the object using the registrator, the existence of the copied object inside the first array is verified. If such object exists, then the pointer to its copy is given from the second array. If such objects is absent, then it is stored in the first array, after that its copy is stored in the second array and then this copy is returned.

Member Function Documentation

◆ IsReg()

virtual bool MbRegDuplicate::IsReg ( const MbRefItem srcItem,
MbRefItem *&  cpyItem 
)
pure virtual

Check whether copy of the object is registered.

Find a registered copy of the object.

Parameters
[in]srcItem- The initial object.
[out]cpyItem- Registered copy of the object.
Returns
Returns true if a copy of the object is already registered.

◆ SetReg()

virtual void MbRegDuplicate::SetReg ( const MbRefItem srcItem,
MbRefItem cpyItem 
)
pure virtual

Register copy of the object.

Register copy of the object.

Parameters
[in]srcItem- The initial object.
[out]cpyItem- The object copy.

The documentation for this class was generated from the following file: