#include <object_load.h>
Inheritance diagram for NLAISCRIPT::CLoadHeapObject:
Public Member Functions | |
CLoadHeapObject (const std::list< sint32 > &i, int n) | |
CLoadHeapObject () | |
sint32 | decRef () |
Decrement the reference of an object. | |
virtual void | getDebugString (std::string &) const |
virtual const std::string | getInfo () |
virtual const NLAIAGENT::IObjectIA * | getObject (CCodeContext &context) const |
Get an compoment from the heap object. | |
virtual const NLAIAGENT::IBaseGroupType * | getParam (CCodeContext &context) const |
Get the argument define in the stack for an object stored in the heap. | |
const sint32 & | getRef () const |
get the refence count. | |
void | incRef () |
Inc a reference. We use this when we have to conserve a pointer memeory for exemple in a list. | |
virtual void | release () |
Release allow to release the pointer. The last release when the _Ref is nul delete the object. | |
virtual void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
NLAIC::IBasicInterface. | |
virtual const NLAIC::IBasicType * | clone () const |
virtual const NLAIC::CIdentType & | getType () const |
virtual void | load (NLMISC::IStream &is) |
virtual const NLAIC::IBasicType * | newInstance () const |
virtual void | save (NLMISC::IStream &os) |
Static Public Attributes | |
const NLAIC::CIdentType | IdLoadHeapObject |
Private Attributes | |
std::list< sint32 > | _I |
sint32 | _N |
|
Definition at line 181 of file object_load.h. Referenced by clone(), and newInstance().
00181 {} |
|
Definition at line 182 of file object_load.h. References _N.
|
|
This function allow a pointer copy, that mean that the new class have the sam attributs caracteristics as the owne. Implements NLAIC::IBasicType. Definition at line 198 of file object_load.h. References _N, CLoadHeapObject(), and x.
00199 { 00200 NLAIC::IBasicType *x= new CLoadHeapObject(_I,_N); 00201 return x; 00202 } |
|
Decrement the reference of an object.
Definition at line 93 of file abstract_interface.h. References NLAIC::IPointerGestion::_Ref, and sint32. Referenced by NLAIC::IPointerGestion::release(), and NLAIAGENT::CAgentTimerHandle::~CAgentTimerHandle().
00094 {
00095 return --_Ref;
00096 }
|
|
Implements NLMISC::IClassable. Reimplemented in NLAIC::CIdentType. Definition at line 116 of file abstract_interface.h. Referenced by NLAISCRIPT::CAgentClass::isClassInheritedFrom().
00117 { 00118 return std::string("<unnamed>"); 00119 } |
|
This is a Debug function, text is an character pointer to receive the debug text output, the debug text containe all think sensible to interset user. Implements NLAIC::IBasicType. Definition at line 56 of file object_load.h.
00056 {} |
|
Definition at line 292 of file abstract_interface.h. References NLAIC::IBasicType::getDebugString(), and s.
00293 { 00294 std::string s; 00295 getDebugString(s); 00296 return s; 00297 } |
|
Get an compoment from the heap object.
Implements NLAISCRIPT::ILoadObject. Definition at line 84 of file objects_load.cpp. References _N, NLAIAGENT::IObjectIA::getStaticMember(), and NLAISCRIPT::CCodeContext::Heap.
00085 { 00086 NLAIAGENT::IObjectIA *a = (NLAIAGENT::IObjectIA *)context.Heap[(int)_N]; 00087 std::list<sint32>::const_iterator i = _I.begin(); 00088 int j; 00089 while(i != _I.end()) 00090 { 00091 j = *i++; 00092 a = (NLAIAGENT::IObjectIA *)a->getStaticMember(j); 00093 } 00094 return a; 00095 } |
|
Get the argument define in the stack for an object stored in the heap.
Implements NLAISCRIPT::ILoadObject. Definition at line 79 of file objects_load.cpp. References NLAISCRIPT::CCodeContext::Stack.
00080 { 00081 return (const NLAIAGENT::IBaseGroupType *)context.Stack[(int)context.Stack]; 00082 } |
|
get the refence count.
Definition at line 99 of file abstract_interface.h. References NLAIC::IPointerGestion::_Ref, and sint32. Referenced by NLAIAGENT::CAgentTimerHandle::~CAgentTimerHandle().
00100 {
00101 return _Ref;
00102 }
|
|
getType return a unique string how represente the class, it can be the name of the class. This function is used for the sytem regstry class (see the definition of the template class Gen::CRegistry). Implements NLAIC::IBasicType. Definition at line 193 of file object_load.h. References IdLoadHeapObject.
00194 { 00195 return IdLoadHeapObject; 00196 } |
|
|
Load the class from a stream. Implements NLAIC::IBasicInterface. Definition at line 217 of file object_load.h. References _N, NLMISC::IStream::serial(), and NLMISC::IStream::serialCont().
00218 { 00219 is.serialCont(_I); 00220 is.serial(_N); 00221 } |
|
This function allow a new instance, that mean that the class is a class factory. Implements NLAIC::IBasicType. Definition at line 204 of file object_load.h. References CLoadHeapObject(), and x.
00205 { 00206 NLAIC::IBasicType *x= new CLoadHeapObject(); 00207 return x; 00208 } |
|
|
Save the class in a stream. Implements NLAIC::IBasicInterface. Definition at line 210 of file object_load.h. References _N, NLMISC::IStream::serial(), NLMISC::IStream::serialCont(), and sint32.
00211 { 00212 std::list<sint32> &i = (std::list<sint32> &) _I; 00213 os.serialCont(i); 00214 sint32 n = _N; 00215 os.serial(n); 00216 } |
|
Reimplemented from NLAIC::IPointerGestion. Definition at line 328 of file abstract_interface.h. References NLAIC::IBasicInterface::load(), and NLAIC::IBasicInterface::save().
|
|
Definition at line 178 of file object_load.h. |
|
Definition at line 179 of file object_load.h. Referenced by CLoadHeapObject(), clone(), getObject(), load(), and save(). |
|
Initial value: NLAIC::CIdentType("LoadHeapObject", NLAIC::CSelfClassFactory(CLoadHeapObject(l,0)), NLAIC::CTypeOfObject(NLAIC::CTypeOfObject::tObject),NLAIC::CTypeOfOperator(0)) Definition at line 256 of file opcode_register.cpp. Referenced by getType(). |