25 #ifndef GEOM_GenericObjPtr_H
26 #define GEOM_GenericObjPtr_H
30 #include "SALOMEconfig.h"
31 #include CORBA_SERVER_HEADER(GEOM_Gen)
89 if ( !CORBA::is_nil( this->myObject ) )
90 this->myObject->Register();
96 if ( !CORBA::is_nil( this->myObject ) ) {
97 this->myObject->UnRegister();
98 this->myObject = TInterface::_nil();
110 this->myObject = TInterface::_duplicate( theObject );
117 this->myObject = thePointer.
myObject;
131 this->myObject = TInterface::_duplicate( theObject );
140 this->myObject = thePointer.
myObject;
147 return theLeft->_is_equivalent( theRight );
153 return isSame( this->myObject, theObject );
159 return isSame( this->myObject, thePointer.
get() );;
165 return !
isSame( this->myObject, theObject );
171 return !
isSame( this->myObject, thePointer.
get() );;
181 operator bool()
const
187 void take( TInterfacePtr theObject )
190 this->myObject = TInterface::_duplicate( theObject );
202 return TInterface::_duplicate( this->myObject );
208 return CORBA::is_nil( this->myObject );
#define GEOMBASE_EXPORT
Definition: GEOM_GEOMBase.hxx:36
A smart pointer for the SALOME GenericObj interface.
Definition: GEOM_GenericObjPtr.h:78
TInterfacePtr operator->() const
Provides normal pointer target member access using operator ->.
Definition: GEOM_GenericObjPtr.h:175
bool isNull() const
Check if pointer is null.
Definition: GEOM_GenericObjPtr.h:206
void nullify()
Nullify pointer.
Definition: GEOM_GenericObjPtr.h:212
TInterfacePtr copy() const
Make the copy of the contained object and return it (caller becomes owner of the CORBA reference).
Definition: GEOM_GenericObjPtr.h:200
TInterfaceVar myObject
Definition: GEOM_GenericObjPtr.h:83
GenericObjPtr(const GenericObjPtr &thePointer)
Initialize pointer with a new reference to the same object referenced by given pointer.
Definition: GEOM_GenericObjPtr.h:115
void Register()
Increment counter for the object.
Definition: GEOM_GenericObjPtr.h:87
TInterface::_var_type TInterfaceVar
Definition: GEOM_GenericObjPtr.h:79
static bool isSame(TInterfacePtr theLeft, TInterfacePtr theRight)
Definition: GEOM_GenericObjPtr.h:145
TInterface::_ptr_type TInterfacePtr
Definition: GEOM_GenericObjPtr.h:80
~GenericObjPtr()
Destroy pointer and remove the reference to the object.
Definition: GEOM_GenericObjPtr.h:122
bool operator!=(const GenericObjPtr &thePointer)
Check difference.
Definition: GEOM_GenericObjPtr.h:169
GenericObjPtr()
Initialize pointer to nil generic object reference.
Definition: GEOM_GenericObjPtr.h:104
void take(TInterfacePtr theObject)
Initialize pointer to the given generic object reference and take ownership on it.
Definition: GEOM_GenericObjPtr.h:187
void UnRegister()
Decrement counter for the object.
Definition: GEOM_GenericObjPtr.h:94
GenericObjPtr(TInterfacePtr theObject)
Initialize pointer to the given generic object reference.
Definition: GEOM_GenericObjPtr.h:108
GenericObjPtr & operator=(TInterfacePtr theObject)
Assign object to reference and remove reference to an old object.
Definition: GEOM_GenericObjPtr.h:128
bool operator==(const GenericObjPtr &thePointer)
Check equivalence.
Definition: GEOM_GenericObjPtr.h:157
bool operator==(TInterfacePtr theObject)
Check equivalence.
Definition: GEOM_GenericObjPtr.h:151
TInterfacePtr get() const
Get the contained object.
Definition: GEOM_GenericObjPtr.h:194
bool operator!=(TInterfacePtr theObject)
Check difference.
Definition: GEOM_GenericObjPtr.h:163
GenericObjPtr & operator=(const GenericObjPtr &thePointer)
Assign object to reference and remove reference to an old object.
Definition: GEOM_GenericObjPtr.h:137
Definition: GEOM_PythonDump.cxx:33
GenericObjPtr< GEOM::GEOM_IGroupOperations > GroupOpPtr
Definition: GEOM_GenericObjPtr.h:231
GenericObjPtr< GEOM::GEOM_ICurvesOperations > CurvesOpPtr
Definition: GEOM_GenericObjPtr.h:226
GenericObjPtr< GEOM::GEOM_Field > GeomFieldPtr
Definition: GEOM_GenericObjPtr.h:219
GenericObjPtr< GEOM::GEOM_IHealingOperations > HealingOpPtr
Definition: GEOM_GenericObjPtr.h:228
GenericObjPtr< GEOM::GEOM_IInsertOperations > InsertOpPtr
Definition: GEOM_GenericObjPtr.h:229
GenericObjPtr< GEOM::GEOM_ILocalOperations > LocalOpPtr
Definition: GEOM_GenericObjPtr.h:227
GenericObjPtr< GEOM::GEOM_IBasicOperations > BasicOpPtr
Definition: GEOM_GenericObjPtr.h:220
GenericObjPtr< GEOM::GEOM_IBooleanOperations > BooleanOpPtr
Definition: GEOM_GenericObjPtr.h:225
GenericObjPtr< GEOM::GEOM_IShapesOperations > ShapesOpPtr
Definition: GEOM_GenericObjPtr.h:223
GenericObjPtr< GEOM::GEOM_IMeasureOperations > MeasureOpPtr
Definition: GEOM_GenericObjPtr.h:230
GenericObjPtr< GEOM::GEOM_I3DPrimOperations > I3DPrimOpPtr
Definition: GEOM_GenericObjPtr.h:222
GenericObjPtr< GEOM::GEOM_ITransformOperations > TransformOpPtr
Definition: GEOM_GenericObjPtr.h:221
GenericObjPtr< GEOM::GEOM_Object > GeomObjPtr
Definition: GEOM_GenericObjPtr.h:218
GenericObjPtr< GEOM::GEOM_IBlocksOperations > BlocksOpPtr
Definition: GEOM_GenericObjPtr.h:224