GlobalObjects
Lade ...
Suche ...
Keine Treffer
GloObjID.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_GLOOBJID_H
2#define INC_GLOOBJID_H
3//-----------------------------------------------------------------------------
43//-----------------------------------------------------------------------------
44#include <string>
45#include "GloTypes.h"
46#if defined ( _MSC_VER ) && ( _MSC_VER >= 1920 ) // nur für VC 2019
47 #include <sstream>
48#endif
49//-----------------------------------------------------------------------------
50namespace glo
51{
52 //---------------------------------------------------------------------------
84 {
85 private:
86 //============== Attribute
87 //-----------------------------------------------------------------------
97 unsigned long m_ulClassID;
98 //-----------------------------------------------------------------------
115 unsigned long m_ulBaseID;
116 //-----------------------------------------------------------------------
126 unsigned long m_ulObjCounter;
127 //-----------------------------------------------------------------------
128
129 public:
130 //============= Konstruktoren
131 //-----------------------------------------------------------------------
142 //-----------------------------------------------------------------------
163 ObjID( unsigned long ulClassID,
164 unsigned long ulBaseID,
165 unsigned long ulObjCounter );
166 //-----------------------------------------------------------------------
196 ObjID( const std::string & sObjId, const std::string & sSeparator = "." );
197 //-----------------------------------------------------------------------
209 ObjID( const ObjID & rT );
210 //-----------------------------------------------------------------------
220 virtual ~ObjID();
221 //-----------------------------------------------------------------------
222
223 //============== Methoden
224 //-----------------------------------------------------------------------
236 bool isNULL() const;
237 //-----------------------------------------------------------------------
247 void setNULL();
248 //-----------------------------------------------------------------------
269 void setID( unsigned long ulClassID,
270 unsigned long ulBaseID,
271 unsigned long ulObjCounter );
272 //-----------------------------------------------------------------------
300 int setID( const std::string & sObjId, const std::string & sSeparator = "." );
301 //-----------------------------------------------------------------------
315 void setClassID( unsigned long ulClassID );
316 //-----------------------------------------------------------------------
330 void setBaseID( unsigned long ulBaseID );
331 //-----------------------------------------------------------------------
345 void setObjCounter( unsigned long ulObjCounter );
346 //-----------------------------------------------------------------------
360 unsigned long getClassID() const;
361 //-----------------------------------------------------------------------
375 unsigned long getBaseID() const;
376 //-----------------------------------------------------------------------
390 unsigned long getObjCounter() const;
391 //-----------------------------------------------------------------------
405 std::string getObjCounterAsString() const;
406 //-----------------------------------------------------------------------
423 static bool IsValidObjID( const std::string & rsObjID,
424 const std::string & sSeparator = "." );
425 //-----------------------------------------------------------------------
437 std::string toString() const;
438 //-----------------------------------------------------------------------
439
440 public:
441 //============== Operatoren
442 //-----------------------------------------------------------------------
444
455 bool operator== ( const ObjID & rT ) const;
456 bool operator!= ( const ObjID & rT ) const;
458 //-----------------------------------------------------------------------
460
474 bool operator> ( const ObjID & rT ) const;
475 bool operator>= ( const ObjID & rT ) const;
476 bool operator< ( const ObjID & rT ) const;
477 bool operator<= ( const ObjID & rT ) const;
479 //-----------------------------------------------------------------------
491 ObjID & operator= ( const ObjID & rT );
492 //-----------------------------------------------------------------------
493 friend std::ostream & operator<< ( std::ostream & rOStream, const ObjID & rObjID )
494 {
495 return rOStream << rObjID.toString();
496 };
497 //-----------------------------------------------------------------------
498 friend std::istream & operator>> ( std::istream & rIStream, ObjID & rObjID )
499 {
500 std::string t_strObjID;
501
502 rIStream >> t_strObjID;
503 rObjID.setID( t_strObjID, "." );
504 return rIStream;
505 };
506 //-----------------------------------------------------------------------
507
508 //-----------------------------------------------------------------------
527 {
528 size_t operator()( const ObjID & rObjID ) const;
529 };
530
531 };
532 //---------------------------------------------------------------------------
533} // namespace glo
534#endif
Für jede Bibliothek, hier 'GlobalObjects' gibt es eine Typen-Datei.
#define __glo_export_dll
Definition GloTypes.h:70
unsigned long getClassID() const
static bool IsValidObjID(const std::string &rsObjID, const std::string &sSeparator=".")
unsigned long m_ulObjCounter
Definition GloObjID.h:126
unsigned long m_ulClassID
Definition GloObjID.h:97
ObjID(const std::string &sObjId, const std::string &sSeparator=".")
void setObjCounter(unsigned long ulObjCounter)
std::string getObjCounterAsString() const
void setClassID(unsigned long ulClassID)
unsigned long m_ulBaseID
Definition GloObjID.h:115
ObjID(unsigned long ulClassID, unsigned long ulBaseID, unsigned long ulObjCounter)
virtual ~ObjID()
void setBaseID(unsigned long ulBaseID)
int setID(const std::string &sObjId, const std::string &sSeparator=".")
unsigned long getBaseID() const
ObjID(const ObjID &rT)
std::string toString() const
bool isNULL() const
void setID(unsigned long ulClassID, unsigned long ulBaseID, unsigned long ulObjCounter)
void setNULL()
unsigned long getObjCounter() const
Definition GloAbstractBaseLot.h:49
Definition GloObjID.h:527
size_t operator()(const ObjID &rObjID) const