#include <interpret_object.h>
Inheritance diagram for NLAISCRIPT::CClassInterpretFactory:
This class define a class class factory for object derived from IClassInterpret.
Portier Perre.
Nevrax France
Definition at line 197 of file interpret_object.h.
NLMISC::IStreamable method. | |
virtual std::string | getClassName () |
virtual void | serial (NLMISC::IStream &) throw (NLMISC::EStream) |
Public Member Functions | |
CClassInterpretFactory (const IClassInterpret &a) | |
CClassInterpretFactory (IClassInterpret *a) | |
sint32 | decRef () |
Decrement the reference of an object. | |
virtual const std::string | getInfo () |
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 | setClass (const IBasicInterface &)=0 |
Set the mirror class to build. | |
virtual | ~CClassInterpretFactory () |
IClassCFactory method. | |
const NLAIC::IBasicType * | clone () const |
const NLAIC::IBasicInterface * | createInstance () const |
const NLAIC::IBasicInterface * | getClass () const |
virtual void | getDebugString (std::string &) const |
virtual const NLAIC::CIdentType & | getType () const |
const NLAIC::IBasicType * | newInstance () const |
void | setClass (const NLAIC::IBasicInterface &) |
Private Attributes | |
IClassInterpret * | _Inst |
|
Definition at line 114 of file interpret_object.cpp. References NLAIC::IPointerGestion::incRef(). Referenced by clone().
|
|
Definition at line 124 of file interpret_object.cpp.
00124 : _Inst((IClassInterpret *)a.clone()) 00125 { 00126 } |
|
Definition at line 128 of file interpret_object.cpp. References NLAIC::IPointerGestion::release().
00129 { 00130 _Inst->release(); 00131 } |
|
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 144 of file interpret_object.cpp. References CClassInterpretFactory(), and x. Referenced by newInstance().
00145 { 00146 NLAIC::IBasicType *x = new CClassInterpretFactory(_Inst); 00147 return x; 00148 } |
|
This function allow a new instance, that mean that the class is a class factory. Implements NLAIC::IClassFactory. Definition at line 160 of file interpret_object.cpp. References NLAISCRIPT::IClassInterpret::buildNewInstance().
00161 { 00162 return (const NLAIC::IBasicInterface *)_Inst->buildNewInstance(); 00163 } |
|
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 }
|
|
This method allow user to get the builder class where a builder is the class hows make new instance. Implements NLAIC::IClassFactory. Definition at line 165 of file interpret_object.cpp.
00166 { 00167 return _Inst; 00168 } |
|
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 139 of file interpret_object.cpp. References NLAISCRIPT::IClassInterpret::getType(), and NLAIC::stringGetBuild().
00140 { 00141 text += NLAIC::stringGetBuild("class factory: CClassInterpretFactory fabrique des instances pour l'interface %s",(const char *)_Inst->getType()); 00142 } |
|
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 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 155 of file interpret_object.cpp. References NLAISCRIPT::IClassInterpret::getType().
00156 { 00157 return _Inst->getType(); 00158 } |
|
|
This function allow a new instance, that mean that the class is a class factory. Implements NLAIC::IBasicType. Definition at line 150 of file interpret_object.cpp. References clone().
00151 { 00152 return clone(); 00153 } |
|
|
Implements NLMISC::IStreamable. Reimplemented in NLAIC::CIdentType, NLAIC::IBasicInterface, NLAISCRIPT::COperandVoid, NLAISCRIPT::COperandAnyObject, NLAISCRIPT::COperandSimple, NLAISCRIPT::COperandSimpleListOr, NLAISCRIPT::COperandUnknown, NLAISCRIPT::COperationType, NLAISCRIPT::COperationTypeGD, and NLAISCRIPT::COperandListType. Definition at line 120 of file abstract_interface.h. Referenced by NLAISCRIPT::CFindRunMsg::save().
00121 { 00122 } |
|
Set the mirror class to build.
Implemented in NLAIC::CSelfClassFactory. Referenced by NLAISCRIPT::reinitClass(). |
|
Definition at line 133 of file interpret_object.cpp. References NLAIC::IBasicType::clone(), and NLAIC::IPointerGestion::release().
|
|
Definition at line 200 of file interpret_object.h. |