#include <agent_string.h>
Inheritance diagram for NLAIAGENT::CStringVarName:
Nevrax France
Definition at line 132 of file agent_string.h.
Public Member Functions | |
const char * | addString (const IVarName &s) const |
Adding two string. | |
const NLAIC::IBasicType * | clone () const |
CStringVarName (NLMISC::IStream &is) | |
CStringVarName (const CStringVarName &s) | |
CStringVarName (const char *name) | |
sint32 | decRef () |
Decrement the reference of an object. | |
void | getDebugString (std::string &text) const |
virtual const std::string | getInfo () |
const sint32 & | getRef () const |
get the refence count. | |
virtual const char * | getString () const |
Get the string stored in the instance. | |
const NLAIC::CIdentType & | getType () const |
void | incRef () |
Inc a reference. We use this when we have to conserve a pointer memeory for exemple in a list. | |
void | load (NLMISC::IStream &is) |
const NLAIC::IBasicType * | newInstance () const |
IVarName & | operator+= (const IVarName &s) |
IVarName & | operator-= (const IVarName &s) |
CStringVarName & | operator= (const CStringVarName &v) |
IVarName & | operator= (const IVarName &v) |
virtual void | release () |
Release allow to release the pointer. The last release when the _Ref is nul delete the object. | |
void | save (NLMISC::IStream &os) |
virtual void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
const char * | subString (const IVarName &s) const |
Extract an string from an ather. | |
virtual | ~CStringVarName () |
Compare methode. | |
bool | operator< (const IVarName &v) const |
bool | operator== (const IVarName &v) const |
bool | operator> (const IVarName &v) const |
Compare methode. | |
bool | operator< (const IVarName &v) const |
bool | operator== (const IVarName &v) const |
bool | operator> (const IVarName &v) const |
Compare methode. | |
bool | operator< (const IVarName &v) const |
bool | operator== (const IVarName &v) const |
bool | operator> (const IVarName &v) const |
Static Public Attributes | |
const NLAIC::CIdentType | IdStringVarName |
Private Attributes | |
char * | _Name |
|
Definition at line 139 of file agent_string.h. References sint32. Referenced by clone().
|
|
Definition at line 150 of file agent_string.h.
|
|
Definition at line 161 of file agent_string.h. References load().
|
|
Definition at line 167 of file agent_string.h.
00168 { 00169 delete []_Name; 00170 } |
|
Adding two string.
Definition at line 80 of file agent_string.h. References NLAIAGENT::IVarName::getString(), and s. Referenced by operator+=(), and NLAIAGENT::CIndexedVarName::operator+=().
|
|
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 236 of file agent_string.h. References CStringVarName(). Referenced by NLAIAGENT::CIndexedVarName::insert(), newInstance(), NLAISCRIPT::CAgentClass::registerComponent(), and NLAISCRIPT::COperatorClass::setGoal().
00237 { 00238 NLAIC::IBasicInterface *m = new CStringVarName(_Name); 00239 return m; 00240 } |
|
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 247 of file agent_string.h. References NLAIC::stringGetBuild().
00248 { 00249 text = NLAIC::stringGetBuild("'%s'",_Name); 00250 } |
|
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 }
|
|
Get the string stored in the instance.
Implements NLAIAGENT::IVarName. Definition at line 172 of file agent_string.h. Referenced by NLAISCRIPT::CCompilateur::getValidateHierarchyBase(), NLAISCRIPT::CCodeBrancheRunDebug::printVariable(), and NLAISCRIPT::CCompilateur::processingVar().
00173 { 00174 return _Name; 00175 } |
|
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 28 of file agent_string.cpp. References IdStringVarName.
00029 { 00030 return IdStringVarName; 00031 } |
|
|
Load the class from a stream. Implements NLAIC::IBasicInterface. Definition at line 188 of file agent_string.h. References NLMISC::IStream::serial(), and uint32. Referenced by CStringVarName().
|
|
This function allow a new instance, that mean that the class is a class factory. Implements NLAIC::IBasicType. Definition at line 242 of file agent_string.h. References clone().
00243 { 00244 return clone(); 00245 } |
|
Implements NLAIAGENT::IVarName. Definition at line 199 of file agent_string.h. References NLAIAGENT::IVarName::addString(), and s.
|
|
Implements NLAIAGENT::IVarName. Definition at line 207 of file agent_string.h. References s, and NLAIAGENT::IVarName::subString().
|
|
Definition at line 52 of file agent_string.h. References NLAIAGENT::IVarName::getString(), and v.
|
|
Definition at line 227 of file agent_string.h.
|
|
Implements NLAIAGENT::IVarName. Definition at line 218 of file agent_string.h.
|
|
Definition at line 69 of file agent_string.h. References NLAIAGENT::IVarName::getString(), and v.
|
|
Definition at line 60 of file agent_string.h. References NLAIAGENT::IVarName::getString(), and v.
|
|
|
Save the class in a stream. Implements NLAIC::IBasicInterface. Definition at line 180 of file agent_string.h. References NLMISC::IStream::serial(), size, uint32, and x.
|
|
Reimplemented from NLAIC::IPointerGestion. Definition at line 328 of file abstract_interface.h. References NLAIC::IBasicInterface::load(), and NLAIC::IBasicInterface::save().
|
|
Extract an string from an ather.
Definition at line 90 of file agent_string.h. References NLAIAGENT::IVarName::getString(), s, and sint32. Referenced by operator-=(), and NLAIAGENT::CIndexedVarName::operator-=().
00091 { 00092 char *nameTmp,*str = (char *)s.getString(); 00093 nameTmp = (char *)getString(); 00094 00095 sint32 k = strlen(nameTmp); 00096 00097 for(sint32 i = 0; i < k; i ++) 00098 { 00099 if(!strcmp(&nameTmp[i],str)) 00100 { 00101 sint32 l,n = strlen(str); 00102 char *name = new char [(l = (k - n + 1))]; 00103 memcpy(name,nameTmp,i); 00104 memcpy(&name[i],nameTmp + n,l); 00105 return name; 00106 } 00107 } 00108 return NULL; 00109 } |
|
Definition at line 137 of file agent_string.h. |
|
Referenced by getType(). |