C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2

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 MbRefItemSetRegCheck (const MbRefItem *srcItem, MbRefItem *&cpyItem)=0
 Register a copy of the object with verification of the presence of already registered copy. 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.

◆ SetRegCheck()

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

Register a copy of the object with verification of the presence of already registered copy.

Register a copy of the object with verification of the presence of already registered copy. If a registered copy of the object already exists, then the input copy is not registered and deleted. The function returns a registered copy of the object.

Parameters
[in]srcItem- The initial object.
[in/out]cpyItem - The object copy. Deleted if a registered copy already exists.
Returns
Returns the registered copy of the object.

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