From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/a02649.html | 2238 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2238 insertions(+) create mode 100644 docs/doxygen/nel/a02649.html (limited to 'docs/doxygen/nel/a02649.html') diff --git a/docs/doxygen/nel/a02649.html b/docs/doxygen/nel/a02649.html new file mode 100644 index 00000000..063efb8a --- /dev/null +++ b/docs/doxygen/nel/a02649.html @@ -0,0 +1,2238 @@ + + +NeL: NLAIAGENT::CIdent struct Reference + + + +
+

NLAIAGENT::CIdent Struct Reference

#include <identtype.h> +

+

Inheritance diagram for NLAIAGENT::CIdent: +

+ +NLAIAGENT::CAgentNumber +NLMISC::CEntityId + +

Detailed Description

+Complete reference of an agent. Name of the class of the type of object. Ident of the agent. +

+ +

+Definition at line 312 of file identtype.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Types

enum  {
+  DYNAMIC_ID_SIZE = 11, +CREATOR_ID_SIZE = 8, +TYPE_SIZE = 5, +ID_SIZE = 40, +
+  UNKNOWN_TYPE = (1 << TYPE_SIZE)-1 +
+ }

Public Member Functions

uint64 asUint64 () const
 CIdent (NLMISC::IStream &is)
 fill from read stream.

 CIdent (const CIdent &a)
 CIdent (const std::string &typeName, const CAgentNumber &a)
 CIdent (const std::string &typeName, uint64 id, uint8 creator=_ServerId, uint8 dyn=_ServerId)
 CIdent ()
void fromString (const char *str)
 Read from a debug string, use the same format as toString() (id:type:creator:dynamic) in hexadecimal.

uint8 getCreatorId () const
 Get the persistent creator id.

virtual void getDebugString (std::string &str) const
 Have a debug string.

uint8 getDynamicId () const
 Get the variable routing info.

uint64 getRawId () const
 Get the full id.

uint64 getShortId () const
 Get the local entity number.

uint8 getType () const
 Get the entity type.

const std::string & getTypeName () const
uint64 getUniqueId () const
 Get the persistent part of the entity id (the dynamic part in the returned id is 0).

bool isAgentId () const
bool isUnknownId () const
 Test if the entity id is Unknown.

virtual void load (NLMISC::IStream &is)
 loading the nomber from an input stream.

const CEntityId & operator++ (int)
virtual bool operator< (const NLMISC::CEntityId &a) const
bool operator< (const CIdent &a) const
const CIdentoperator= (const CIdent &a)
bool operator== (const CIdent &a) const
bool operator> (const CIdent &a) const
virtual void save (NLMISC::IStream &os)
 saving the nomber in an output stream.

void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
void setCreatorId (uint8 creatorId)
 Set the persistent creator id.

void setDynamicId (uint8 dynId)
 Set the variable routing info.

void setShortId (uint64 shortId)
 Set the local entity number.

void setType (uint8 type)
 Set the entity type.

void setTypeAt (uint64 t)
 That function allow user to change the 7 bit of the type field in the sid agent number; We don't touche at the 8e bits.

std::string toString () const
 return a string in form "(a:b:c:d)" where a,b,c,d are components of entity id.

virtual ~CIdent ()
comparison of two CEntityId.
bool operator!= (const CEntityId &a) const
bool operator< (const CEntityId &a) const
bool operator== (const CEntityId &a) const
bool operator> (const CEntityId &a) const
comparison of two CEntityId.
bool operator!= (const CEntityId &a) const
bool operator< (const CEntityId &a) const
bool operator== (const CEntityId &a) const
bool operator> (const CEntityId &a) const
comparison of two CEntityId.
bool operator!= (const CEntityId &a) const
bool operator< (const CEntityId &a) const
bool operator== (const CEntityId &a) const
bool operator> (const CEntityId &a) const

Static Public Member Functions

CEntityId getNewEntityId (uint8 type)
 Generator of entity ids.

void setServiceId (uint8 sid)
 Set the service id for the generator.


Data Fields

std::string TypeName

Static Public Attributes

const uint8 AgentTypeBit = 0x80
const uint64 MaxEntityId = ((uint64)1 << (CEntityId::ID_SIZE + 1)) - (uint64)1
 The maximume of number that we could generate without generate an overtaking exception.

const CEntityId Unknown
 Unknow CEntityId is similar as an NULL pointer.


Static Protected Attributes

NLMISC::CEntityId _NextEntityId
 Counter for generation of unique entity ids.

uint8 _ServerId = 0
 The local num service id of the local machin.

+


Member Enumeration Documentation

+

+ + + + +
+ + +
anonymous enum [inherited] +
+
+ + + + + +
+   + + +

+

Enumeration values:
+ + + + + + +
DYNAMIC_ID_SIZE  +
CREATOR_ID_SIZE  +
TYPE_SIZE  +
ID_SIZE  +
UNKNOWN_TYPE  +
+
+ +

+Definition at line 45 of file entity_id.h. +

+

00046         {
+00047                 DYNAMIC_ID_SIZE = 11,
+00048                 CREATOR_ID_SIZE = 8,
+00049                 TYPE_SIZE = 5,
+00050                 ID_SIZE = 40,
+00051                 UNKNOWN_TYPE = (1 << TYPE_SIZE)-1
+00052         };
+
+


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + +
NLAIAGENT::CIdent::CIdent  )  [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 315 of file identtype.h. +

+

00316                 {                       
+00317                 }               
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NLAIAGENT::CIdent::CIdent const std::string &  typeName,
uint64  id,
uint8  creator = _ServerId,
uint8  dyn = _ServerId
[inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 319 of file identtype.h. +

+References id, TypeName, uint64, and uint8. +

+

00319                                                                                                            :CAgentNumber(id,creator,dyn),TypeName(typeName)
+00320                 {                       
+00321                 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
NLAIAGENT::CIdent::CIdent const std::string &  typeName,
const CAgentNumber a
[inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 323 of file identtype.h. +

+References TypeName. +

+

00323                                                                        :CAgentNumber(a),TypeName(typeName)
+00324                 {                       
+00325                 }
+
+

+ + + + +
+ + + + + + + + + + +
NLAIAGENT::CIdent::CIdent const CIdent a  )  [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 327 of file identtype.h. +

+References TypeName. +

+

00327                                        :CAgentNumber(a),TypeName(a.TypeName)
+00328                 {                       
+00329                 }
+
+

+ + + + +
+ + + + + + + + + + +
NLAIAGENT::CIdent::CIdent NLMISC::IStream is  )  [inline]
+
+ + + + + +
+   + + +

+fill from read stream. +

+ +

+Definition at line 332 of file identtype.h. +

+References s, NLMISC::IStream::serial(), and TypeName. +

+

00332                                          :CAgentNumber(is)
+00333                 {                       
+00334                         std::string s;
+00335                         is.serial(s);
+00336                         TypeName = s;
+00337                 }
+
+

+ + + + +
+ + + + + + + + + +
virtual NLAIAGENT::CIdent::~CIdent  )  [inline, virtual]
+
+ + + + + +
+   + + +

+ +

+Definition at line 339 of file identtype.h. +

+

00339 {}
+
+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + +
uint64 NLMISC::CEntityId::asUint64  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 401 of file entity_id.h. +

+References NLMISC::CEntityId::FullId, and uint64. +

+

00402         {
+00403                 return FullId;
+00404         }
+
+

+ + + + +
+ + + + + + + + + + +
void NLMISC::CEntityId::fromString const char *  str  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Read from a debug string, use the same format as toString() (id:type:creator:dynamic) in hexadecimal. +

+ +

+Definition at line 488 of file entity_id.h. +

+References NLMISC::CEntityId::DetailedId, NL_I64, type, uint, and uint64. +

+Referenced by NLMISC::CEntityId::CEntityId(), and NLNET::createMessage(). +

+

00490         {
+00491                 uint64          id;
+00492                 uint            type;
+00493                 uint            creatorId;
+00494                 uint            dynamicId;
+00495 
+00496                 if (sscanf(str, "(%"NL_I64"x:%x:%x:%x)", &id, &type, &creatorId, &dynamicId) != 4)
+00497                 {
+00498                         *this = Unknown;
+00499                         return;
+00500                 }
+00501 
+00502                 DetailedId.Id = id;
+00503                 DetailedId.Type = type;
+00504                 DetailedId.CreatorId = creatorId;
+00505                 DetailedId.DynamicId = dynamicId;
+00506         }
+
+

+ + + + +
+ + + + + + + + + +
uint8 NLMISC::CEntityId::getCreatorId  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Get the persistent creator id. +

+ +

+Definition at line 245 of file entity_id.h. +

+References NLMISC::CEntityId::DetailedId, and uint8. +

+Referenced by NLAIAGENT::CAgentNumber::operator<(). +

+

00246         {
+00247                 return DetailedId.CreatorId;
+00248         }
+
+

+ + + + +
+ + + + + + + + + + +
virtual void NLAIAGENT::CIdent::getDebugString std::string &  str  )  const [inline, virtual]
+
+ + + + + +
+   + + +

+Have a debug string. +

+ +

+Reimplemented from NLMISC::CEntityId. +

+Definition at line 387 of file identtype.h. +

+References NLAIC::stringGetBuild(), and TypeName. +

+

00388                 {
+00389                         CAgentNumber::getDebugString(str);
+00390                         str += NLAIC::stringGetBuild(" '%s'",TypeName.data());
+00391                 }
+
+

+ + + + +
+ + + + + + + + + +
uint8 NLMISC::CEntityId::getDynamicId  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Get the variable routing info. +

+ +

+Definition at line 233 of file entity_id.h. +

+References NLMISC::CEntityId::DetailedId, and uint8. +

+Referenced by NLAIAGENT::CAgentNumber::operator<(). +

+

00234         {
+00235                 return DetailedId.DynamicId;
+00236         }
+
+

+ + + + +
+ + + + + + + + + + +
CEntityId NLMISC::CEntityId::getNewEntityId uint8  type  )  [inline, static, inherited]
+
+ + + + + +
+   + + +

+Generator of entity ids. +

+ +

+Definition at line 109 of file entity_id.h. +

+References NLMISC::CEntityId::_NextEntityId, nlassert, NLMISC::CEntityId::setType(), type, and uint8. +

+

00110         {
+00111                 nlassert(_NextEntityId != Unknown ); // type may be Unknown, so isUnknownId() would return true
+00112                 NLMISC::CEntityId id = _NextEntityId++;
+00113                 id.setType( type );
+00114                 return id;
+00115         }
+
+

+ + + + +
+ + + + + + + + + +
uint64 NLMISC::CEntityId::getRawId  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Get the full id. +

+ +

+Definition at line 212 of file entity_id.h. +

+References NLMISC::CEntityId::FullId, and uint64. +

+

00213         {
+00214                 return FullId;
+00215                 /*
+00216                 return (uint64)*this;
+00217                 */
+00218         }
+
+

+ + + + +
+ + + + + + + + + +
uint64 NLMISC::CEntityId::getShortId  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Get the local entity number. +

+ +

+Definition at line 221 of file entity_id.h. +

+References NLMISC::CEntityId::DetailedId, and uint64. +

+Referenced by NLAIAGENT::CAgentNumber::operator<(). +

+

00222         {
+00223                 return DetailedId.Id;
+00224         }
+
+

+ + + + +
+ + + + + + + + + + +
uint8 NLMISC::CEntityId::getType void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Get the entity type. +

+ +

+Definition at line 257 of file entity_id.h. +

+References NLMISC::CEntityId::DetailedId, and uint8. +

+Referenced by NLAIAGENT::IRefrence::IRefrence(), NLAIAGENT::CAgentNumber::isAgentId(), and NLAIAGENT::CAgentNumber::setTypeAt(). +

+

00258         {
+00259                 return (uint8)DetailedId.Type;
+00260         }
+
+

+ + + + +
+ + + + + + + + + +
const std::string& NLAIAGENT::CIdent::getTypeName  )  const [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 393 of file identtype.h. +

+References TypeName. +

+

00394                 {
+00395                         return TypeName;
+00396                 }
+
+

+ + + + +
+ + + + + + + + + +
uint64 NLMISC::CEntityId::getUniqueId  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Get the persistent part of the entity id (the dynamic part in the returned id is 0). +

+ +

+Definition at line 269 of file entity_id.h. +

+References NLMISC::CEntityId::FullId, and uint64. +

+Referenced by NLMISC::CEntityId::operator<(), and NLMISC::CEntityId::operator>(). +

+

00270         {
+00271                 CEntityId id;
+00272                 id.FullId = FullId;
+00273                 id.DetailedId.DynamicId = 0;
+00274                 return id.FullId;
+00275         }
+
+

+ + + + +
+ + + + + + + + + +
bool NLAIAGENT::CAgentNumber::isAgentId  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 85 of file identtype.h. +

+References NLAIAGENT::CAgentNumber::AgentTypeBit, and NLMISC::CEntityId::getType(). +

+Referenced by NLAIAGENT::CAgentNumber::operator<(). +

+

00086                 {
+00087                         return (getType() & AgentTypeBit) != 0;
+00088                 }
+
+

+ + + + +
+ + + + + + + + + +
bool NLMISC::CEntityId::isUnknownId  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Test if the entity id is Unknown. +

+ +

+Definition at line 278 of file entity_id.h. +

+References NLMISC::CEntityId::DetailedId, and NLMISC::CEntityId::UNKNOWN_TYPE. +

+

00279         {
+00280                 return DetailedId.Type == UNKNOWN_TYPE;
+00281         }
+
+

+ + + + +
+ + + + + + + + + + +
virtual void NLAIAGENT::CIdent::load NLMISC::IStream is  )  [inline, virtual]
+
+ + + + + +
+   + + +

+loading the nomber from an input stream. +

+ +

+Reimplemented from NLMISC::CEntityId. +

+Definition at line 376 of file identtype.h. +

+References s, NLMISC::IStream::serial(), and TypeName. +

+

00377                 {
+00378                         CAgentNumber::load(is);
+00379                         std::string s;
+00380                         is.serial(s);
+00381                         TypeName = s;
+00382                 }
+
+

+ + + + +
+ + + + + + + + + + +
bool NLMISC::CEntityId::operator!= const CEntityId a  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 301 of file entity_id.h. +

+

00302         {
+00303                 return !((*this) == a);
+00304         }
+
+

+ + + + +
+ + + + + + + + + + +
const CEntityId& NLMISC::CEntityId::operator++ int   )  [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 358 of file entity_id.h. +

+References NLMISC::CEntityId::DetailedId, NLMISC::CEntityId::MaxEntityId, NL_I64, and nlerror. +

+

00359         {
+00360                 if(DetailedId.Id < MaxEntityId)
+00361                 {
+00362                         DetailedId.Id ++;
+00363                 }
+00364                 else
+00365                 {
+00366                         nlerror ("CEntityId looped (max was %"NL_I64"d", MaxEntityId);
+00367                 }
+00368                 return *this;
+00369         }
+
+

+ + + + +
+ + + + + + + + + + +
bool NLMISC::CEntityId::operator< const CEntityId a  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 306 of file entity_id.h. +

+References NLMISC::CEntityId::getUniqueId(). +

+

00308         {
+00309                 return getUniqueId() < a.getUniqueId();
+00310 
+00311                 /*
+00312                 if (Type < a.Type)
+00313                 {
+00314                         return true;
+00315                 }
+00316                 else if (Type == a.Type)
+00317                 {
+00318                         if (Id < a.Id)
+00319                         {
+00320                                 return true;
+00321                         }
+00322                         else if (Id == a.Id)
+00323                         {
+00324                                 return (CreatorId < a.CreatorId);
+00325                         }
+00326                 }               
+00327                 return false;
+00328                 */
+00329         }
+
+

+ + + + +
+ + + + + + + + + + +
virtual bool NLAIAGENT::CAgentNumber::operator< const NLMISC::CEntityId a  )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 90 of file identtype.h. +

+References NLMISC::CEntityId::getCreatorId(), NLMISC::CEntityId::getDynamicId(), NLMISC::CEntityId::getShortId(), NLAIAGENT::CAgentNumber::isAgentId(), and operator<(). +

+

00091                 {
+00092                         
+00093                         if(isAgentId())
+00094                         {
+00095                                 if (getShortId() < a.getShortId())
+00096                                 {
+00097                                         return true;
+00098                                 }
+00099                                 else 
+00100                                 if (getShortId() == a.getShortId())
+00101                                 {
+00102                                         if(getCreatorId() < a.getCreatorId())
+00103                                         {
+00104                                                 return true;
+00105                                         }
+00106                                         else
+00107                                                 if(getCreatorId() == a.getCreatorId())
+00108                                                 {
+00109                                                         return getDynamicId() < a.getDynamicId();
+00110                                                 }
+00111                                 }
+00112                                 return false;
+00113                         }
+00114                         else
+00115                         {
+00116                                 return CEntityId::operator < (a);
+00117                         }
+00118                 }
+
+

+ + + + +
+ + + + + + + + + + +
bool NLAIAGENT::CIdent::operator< const CIdent a  )  const [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 350 of file identtype.h. +

+References TypeName. +

+

00351                 {                               
+00352                         return TypeName < a.TypeName;
+00353                 }
+
+

+ + + + +
+ + + + + + + + + + +
const CIdent& NLAIAGENT::CIdent::operator= const CIdent a  )  [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 361 of file identtype.h. +

+References TypeName. +

+

00362                 {
+00363                         CAgentNumber::operator = (a);
+00364                         TypeName = a.TypeName;
+00365                         return *this;
+00366                 }
+
+

+ + + + +
+ + + + + + + + + + +
bool NLMISC::CEntityId::operator== const CEntityId a  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 289 of file entity_id.h. +

+References NLMISC::CEntityId::DetailedId, and NLMISC::CEntityId::FullId. +

+

00291         {
+00292 
+00293                 CEntityId testId ( FullId ^ a.FullId );
+00294                 testId.DetailedId.DynamicId = 0;
+00295                 return testId.FullId == 0;
+00296 
+00297                 /*
+00298                 return (Id == a.DetailedId.Id && DetailedId.CreatorId == a.DetailedId.CreatorId && DetailedId.Type == a.DetailedId.Type);
+00299                 */
+00300         }
+
+

+ + + + +
+ + + + + + + + + + +
bool NLAIAGENT::CIdent::operator== const CIdent a  )  const [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 341 of file identtype.h. +

+References TypeName. +

+

00342                 {
+00343                         if(TypeName == a.TypeName) 
+00344                         {
+00345                                 return CAgentNumber::operator == (a);
+00346                         }
+00347                         return false;
+00348                 }
+
+

+ + + + +
+ + + + + + + + + + +
bool NLMISC::CEntityId::operator> const CEntityId a  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 331 of file entity_id.h. +

+References NLMISC::CEntityId::getUniqueId(). +

+

00333         {
+00334                 return getUniqueId() > a.getUniqueId();
+00335 
+00336                 /*
+00337                 if (Type > a.Type)
+00338                 {
+00339                         return true;
+00340                 }
+00341                 else if (Type == a.Type)
+00342                 {
+00343                         if (Id > a.Id)
+00344                         {
+00345                                 return true;
+00346                         }
+00347                         else if (Id == a.Id)
+00348                         {
+00349                                 return (CreatorId > a.CreatorId);
+00350                         }
+00351                 }
+00352                 // lesser
+00353                 return false;
+00354                 */
+00355         }
+
+

+ + + + +
+ + + + + + + + + + +
bool NLAIAGENT::CIdent::operator> const CIdent a  )  const [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 355 of file identtype.h. +

+References TypeName. +

+

00356                 {
+00357                         return !(TypeName < a.TypeName);
+00358                 }               
+
+

+ + + + +
+ + + + + + + + + + +
virtual void NLAIAGENT::CIdent::save NLMISC::IStream os  )  [inline, virtual]
+
+ + + + + +
+   + + +

+saving the nomber in an output stream. +

+ +

+Reimplemented from NLMISC::CEntityId. +

+Definition at line 369 of file identtype.h. +

+References NLMISC::IStream::serial(), and TypeName. +

+

00370                 {       
+00371                         CAgentNumber::save(os);
+00372                         os.serial(TypeName);
+00373                 }
+
+

+ + + + +
+ + + + + + + + + + +
void NLMISC::CEntityId::serial NLMISC::IStream f  )  throw (NLMISC::EStream) [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 462 of file entity_id.h. +

+References NLMISC::CEntityId::load(), and NLMISC::CEntityId::save(). +

+

00464         {
+00465                 if (f.isReading ())
+00466                 {
+00467                         load (f);
+00468                 }
+00469                 else
+00470                 {                               
+00471                         save (f);
+00472                 }
+00473         }
+
+

+ + + + +
+ + + + + + + + + + +
void NLMISC::CEntityId::setCreatorId uint8  creatorId  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Set the persistent creator id. +

+ +

+Definition at line 251 of file entity_id.h. +

+References NLMISC::CEntityId::DetailedId, and uint8. +

+Referenced by NLMISC::CEntityIdTranslator::checkEntity(), NLLOGIC::CLogicEventMessage::CLogicEventMessage(), NLLOGIC::CLogicStateMachine::displayVariables(), NLMISC::CEntityIdTranslator::getByEntity(), NLMISC::CEntityIdTranslator::getEntityIdInfo(), NLMISC::CEntityIdTranslator::getEntityNameStringId(), NLMISC::CEntityIdTranslator::isEntityOnline(), NLMISC::NLMISC_COMMAND(), NLMISC::CEntityIdTranslator::registerEntity(), NLMISC::CEntityIdTranslator::setEntityOnline(), NLAILINK::setLocalServerID(), NLMISC::CEntityId::setServiceId(), and NLMISC::CEntityIdTranslator::unregisterEntity(). +

+

00252         {
+00253                 DetailedId.CreatorId = creatorId;
+00254         }
+
+

+ + + + +
+ + + + + + + + + + +
void NLMISC::CEntityId::setDynamicId uint8  dynId  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Set the variable routing info. +

+ +

+Definition at line 239 of file entity_id.h. +

+References NLMISC::CEntityId::DetailedId, and uint8. +

+Referenced by NLMISC::CEntityIdTranslator::checkEntity(), NLLOGIC::CLogicEventMessage::CLogicEventMessage(), NLLOGIC::CLogicStateMachine::displayVariables(), NLMISC::CEntityIdTranslator::getByEntity(), NLMISC::CEntityIdTranslator::getEntityIdInfo(), NLMISC::CEntityIdTranslator::getEntityNameStringId(), NLMISC::CEntityIdTranslator::isEntityOnline(), NLMISC::NLMISC_COMMAND(), NLMISC::CEntityIdTranslator::registerEntity(), NLMISC::CEntityIdTranslator::setEntityOnline(), NLAILINK::setLocalServerID(), NLMISC::CEntityId::setServiceId(), and NLMISC::CEntityIdTranslator::unregisterEntity(). +

+

00240         {
+00241                 DetailedId.DynamicId = dynId;
+00242         }
+
+

+ + + + +
+ + + + + + + + + + +
void NLMISC::CEntityId::setServiceId uint8  sid  )  [inline, static, inherited]
+
+ + + + + +
+   + + +

+Set the service id for the generator. +

+ +

+Definition at line 101 of file entity_id.h. +

+References NLMISC::CEntityId::_NextEntityId, NLMISC::CEntityId::_ServerId, NLMISC::CEntityId::setCreatorId(), NLMISC::CEntityId::setDynamicId(), and uint8. +

+Referenced by NLNET::IService::main(), and NLAILINK::setLocalServerID(). +

+

00102         {
+00103                 _NextEntityId.setDynamicId( sid );
+00104                 _NextEntityId.setCreatorId( sid ); 
+00105                 _ServerId = sid;
+00106         }
+
+

+ + + + +
+ + + + + + + + + + +
void NLMISC::CEntityId::setShortId uint64  shortId  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Set the local entity number. +

+ +

+Definition at line 227 of file entity_id.h. +

+References NLMISC::CEntityId::DetailedId, and uint64. +

+

00228         {
+00229                 DetailedId.Id = shortId;
+00230         }
+
+

+ + + + +
+ + + + + + + + + + +
void NLMISC::CEntityId::setType uint8  type  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Set the entity type. +

+ +

+Definition at line 263 of file entity_id.h. +

+References NLMISC::CEntityId::DetailedId, type, and uint8. +

+Referenced by NLAIAGENT::CAgentNumber::CAgentNumber(), NLLOGIC::CLogicEventMessage::CLogicEventMessage(), NLLOGIC::CLogicStateMachine::displayVariables(), NLMISC::CEntityId::getNewEntityId(), and NLAIAGENT::CAgentNumber::setTypeAt(). +

+

00264         {
+00265                 DetailedId.Type = type;
+00266         }
+
+

+ + + + +
+ + + + + + + + + + +
void NLAIAGENT::CAgentNumber::setTypeAt uint64  t  )  [inline, inherited]
+
+ + + + + +
+   + + +

+That function allow user to change the 7 bit of the type field in the sid agent number; We don't touche at the 8e bits. +

+ +

+Definition at line 121 of file identtype.h. +

+References NLMISC::CEntityId::getType(), NLMISC::CEntityId::setType(), t, type, uint64, and uint8. +

+Referenced by NLAIAGENT::CNumericIndex::setTypeAt(). +

+

00122                 {
+00123                         uint8 type = getType();
+00124                         type |= (t & 0x7f);
+00125                         setType( type );
+00126                 }
+
+

+ + + + +
+ + + + + + + + + +
std::string NLMISC::CEntityId::toString  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+return a string in form "(a:b:c:d)" where a,b,c,d are components of entity id. +

+ +

+Definition at line 480 of file entity_id.h. +

+References NLMISC::CEntityId::getDebugString(). +

+Referenced by NLMISC::CEntityIdTranslator::checkEntity(), NLMISC::CEntityIdTranslator::getEntityIdInfo(), NLMISC::CEntityIdTranslator::isEntityOnline(), NLMISC::NLMISC_COMMAND(), NLMISC::CEntityIdTranslator::registerEntity(), NLMISC::CEntityIdTranslator::setEntityOnline(), and NLMISC::CEntityIdTranslator::unregisterEntity(). +

+

00481         {
+00482                 std::string id;
+00483                 getDebugString (id);
+00484                 return "(" + id + ")";
+00485         }
+
+


Field Documentation

+

+ + + + +
+ + +
CEntityId NLMISC::CEntityId::_NextEntityId [static, protected, inherited] +
+
+ + + + + +
+   + + +

+Counter for generation of unique entity ids. +

+ +

+Definition at line 36 of file entity_id.cpp. +

+Referenced by NLMISC::CEntityId::getNewEntityId(), and NLMISC::CEntityId::setServiceId().

+

+ + + + +
+ + +
uint8 NLMISC::CEntityId::_ServerId = 0 [static, protected, inherited] +
+
+ + + + + +
+   + + +

+The local num service id of the local machin. +

+ +

+Definition at line 38 of file entity_id.cpp. +

+Referenced by NLMISC::CEntityId::CEntityId(), and NLMISC::CEntityId::setServiceId().

+

+ + + + +
+ + +
const uint8 NLAIAGENT::CAgentNumber::AgentTypeBit = 0x80 [static, inherited] +
+
+ + + + + +
+   + + +

+All agents id'S numbers have the 8th bit reserved on NLMISC::CEntityId::Type byte The CEntityId::Type field is for AI an user bits field becarful we dont't touch at the 8e bits. +

+Definition at line 28 of file ident.cpp. +

+Referenced by NLAIAGENT::CAgentNumber::CAgentNumber(), and NLAIAGENT::CAgentNumber::isAgentId().

+

+ + + + +
+ + +
uint64 NLMISC::CEntityId::CreatorId [protected, inherited] +
+
+ + + + + +
+   + + +

+Id of the service who created the entity (persistent). +

+ +

+Definition at line 66 of file entity_id.h.

+

+ + + + +
+ + +
struct { ... } NLMISC::CEntityId::DetailedId [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Referenced by NLMISC::CEntityId::CEntityId(), NLMISC::CEntityId::fromString(), NLMISC::CEntityId::getCreatorId(), NLMISC::CEntityId::getDebugString(), NLMISC::CEntityId::getDynamicId(), NLMISC::CEntityId::getShortId(), NLMISC::CEntityId::getType(), NLMISC::CEntityId::isUnknownId(), NLMISC::CEntityId::operator++(), NLMISC::CEntityId::operator==(), NLMISC::CEntityId::setCreatorId(), NLMISC::CEntityId::setDynamicId(), NLMISC::CEntityId::setShortId(), and NLMISC::CEntityId::setType().

+

+ + + + +
+ + +
uint64 NLMISC::CEntityId::DynamicId [protected, inherited] +
+
+ + + + + +
+   + + +

+Id of the service where the entity is (variable routing info). +

+ +

+Definition at line 64 of file entity_id.h.

+

+ + + + +
+ + +
uint64 NLMISC::CEntityId::FullId [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 73 of file entity_id.h. +

+Referenced by NLMISC::CEntityId::asUint64(), NLMISC::CEntityId::CEntityId(), NLMISC::CEntityId::getRawId(), NLMISC::CEntityId::getUniqueId(), NLMISC::CEntityId::load(), NLMISC::CEntityId::operator=(), NLMISC::CEntityId::operator==(), and NLMISC::CEntityId::save().

+

+ + + + +
+ + +
uint64 NLMISC::CEntityId::Id [protected, inherited] +
+
+ + + + + +
+   + + +

+Local entity number (persistent). +

+ +

+Definition at line 70 of file entity_id.h.

+

+ + + + +
+ + +
const uint64 NLMISC::CEntityId::MaxEntityId = ((uint64)1 << (CEntityId::ID_SIZE + 1)) - (uint64)1 [static, inherited] +
+
+ + + + + +
+   + + +

+The maximume of number that we could generate without generate an overtaking exception. +

+ +

+Definition at line 34 of file entity_id.cpp. +

+Referenced by NLMISC::CEntityId::operator++().

+

+ + + + +
+ + +
uint64 NLMISC::CEntityId::Type [protected, inherited] +
+
+ + + + + +
+   + + +

+Type of the entity (persistent). +

+ +

+Definition at line 68 of file entity_id.h.

+

+ + + + +
+ + +
std::string NLAIAGENT::CIdent::TypeName +
+
+ + + + + +
+   + + +

+ +

+Definition at line 314 of file identtype.h. +

+Referenced by CIdent(), getDebugString(), getTypeName(), load(), operator<(), operator=(), operator==(), operator>(), and save().

+

+ + + + +
+ + +
const CEntityId NLMISC::CEntityId::Unknown [static, inherited] +
+
+ + + + + +
+   + + +

+Unknow CEntityId is similar as an NULL pointer. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Tue Mar 16 09:16:00 2004 for NeL by + +doxygen +1.3.6
+ + -- cgit v1.2.1