#include <agent_string.h>
Inheritance diagram for NLAIAGENT::IVarName:

Nevrax France
Definition at line 39 of file agent_string.h.
Public Member Functions | |
| const char * | addString (const IVarName &s) const |
| Adding two string. | |
| virtual const IBasicType * | clone () const=0 |
| sint32 | decRef () |
| Decrement the reference of an object. | |
| virtual void | getDebugString (std::string &) const=0 |
| virtual const std::string | getInfo () |
| const sint32 & | getRef () const |
| get the refence count. | |
| virtual const char * | getString () const=0 |
| Get the string stored in the instance. | |
| virtual const CIdentType & | getType () const=0 |
| void | incRef () |
| Inc a reference. We use this when we have to conserve a pointer memeory for exemple in a list. | |
| IVarName () | |
| virtual void | load (NLMISC::IStream &)=0 |
| virtual const IBasicType * | newInstance () const=0 |
| virtual void | release () |
| Release allow to release the pointer. The last release when the _Ref is nul delete the object. | |
| virtual void | save (NLMISC::IStream &)=0 |
| virtual void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
| const char * | subString (const IVarName &s) const |
| Extract an string from an ather. | |
| virtual | ~IVarName () |
Usually operation. | |
| virtual IVarName & | operator+= (const IVarName &s)=0 |
| virtual IVarName & | operator-= (const IVarName &s)=0 |
| virtual IVarName & | operator= (const IVarName &v)=0 |
|
|
Definition at line 43 of file agent_string.h.
00044 {
00045 }
|
|
|
Definition at line 118 of file agent_string.h.
00119 {
00120 }
|
|
|
Adding two string.
Definition at line 80 of file agent_string.h. References getString(), and s. Referenced by NLAIAGENT::CStringVarName::operator+=(), and NLAIAGENT::CIndexedVarName::operator+=().
|
|
|
|
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 }
|
|
|
|
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 }
|
|
|
|
|
|
|
|
Implemented in NLAIAGENT::CStringVarName, and NLAIAGENT::CIndexedVarName. |
|
|
Implemented in NLAIAGENT::CStringVarName, and NLAIAGENT::CIndexedVarName. |
|
|
Definition at line 52 of file agent_string.h. References getString(), and v.
|
|
|
Implemented in NLAIAGENT::CStringVarName, and NLAIAGENT::CIndexedVarName. |
|
|
Definition at line 69 of file agent_string.h. References getString(), and v.
|
|
|
Definition at line 60 of file agent_string.h. References getString(), and v.
|
|
|
|
|
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 getString(), s, and sint32. Referenced by NLAIAGENT::CStringVarName::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 }
|
1.3.6