My Project
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
ParaEngine::CDataInt32 Class Reference
Inheritance diagram for ParaEngine::CDataInt32:
ParaEngine::IObject ParaEngine::CRefCounted

Public Member Functions

 CDataInt32 (int data)
 
IObjectClone () const
 Clone the object's contains and return a pointer to the newly created object. More...
 
void Clone (IObject *obj) const
 Clone the object's contains to a pointer. More...
 
 operator int ()
 
CDataInt32operator= (int data)
 
virtual bool operator== (int value)
 
virtual string ToString () const
 
virtual const ITypeGetType () const
 
- Public Member Functions inherited from ParaEngine::IObject
virtual bool Equals (const IObject *obj) const
 Compare the object with another object. More...
 
WeakPtr_typeGetWeakReference ()
 get weak reference object. More...
 
virtual int ProcessObjectEvent (const ObjectEvent &event)
 this function is only used to backward compatibility of ParaObject:AddEvent() function. More...
 
- Public Member Functions inherited from ParaEngine::CRefCounted
void addref () const
 add reference count of the object. More...
 
bool delref () const
 decrease reference count of the object. More...
 
int GetRefCount () const
 get the reference count
 
virtual int Release ()
 
CRefCountedAddToAutoReleasePool ()
 addref and releases the ownership sometime soon automatically (usually at the end of the current frame). More...
 

Protected Attributes

int m_data
 
- Protected Attributes inherited from ParaEngine::IObject
WeakPtr_type m_weak_reference
 
- Protected Attributes inherited from ParaEngine::CRefCounted
int m_refcount
 

Static Protected Attributes

static const ITypem_type =NULL
 

Additional Inherited Members

- Public Types inherited from ParaEngine::IObject
typedef ParaEngine::weak_ptr< IObjectWeakPtr_type
 

Member Function Documentation

§ Clone() [1/2]

IObject* ParaEngine::CDataInt32::Clone ( ) const
inlinevirtual

Clone the object's contains and return a pointer to the newly created object.

The caller should free the memory of the return object. Inheritance should implement this function void Clone(IObject*) and IObject* Clone() should have the same behavior

Reimplemented from ParaEngine::IObject.

§ Clone() [2/2]

void ParaEngine::CDataInt32::Clone ( IObject obj) const
inlinevirtual

Clone the object's contains to a pointer.

The caller should allocate the memory and pass the pointer to this function.. Inheritance should implement this function void Clone(IObject*) and IObject* Clone() should have the same behavior In some cases, if you want to avoid Dead Reference( one object is being referred to by many objects and you can't update all the references). It is possible to use this function to replace the contains at a given pointer. But this may result in memory leak if you do not implement this function carefully or misuse it.

Reimplemented from ParaEngine::IObject.


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