GlobalObjects
Loading...
Searching...
No Matches
GloObjID.h
Go to the documentation of this file.
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 //-----------------------------------------------------------------------
408 static bool IsValidObjID( const std::string & rsObjID,
409 const std::string & sSeparator = "." );
410 //-----------------------------------------------------------------------
422 std::string toString() const;
423 //-----------------------------------------------------------------------
424
425 public:
426 //============== Operatoren
427 //-----------------------------------------------------------------------
429
440 bool operator== ( const ObjID & rT ) const;
441 bool operator!= ( const ObjID & rT ) const;
443 //-----------------------------------------------------------------------
445
459 bool operator> ( const ObjID & rT ) const;
460 bool operator>= ( const ObjID & rT ) const;
461 bool operator< ( const ObjID & rT ) const;
462 bool operator<= ( const ObjID & rT ) const;
464 //-----------------------------------------------------------------------
476 ObjID & operator= ( const ObjID & rT );
477 //-----------------------------------------------------------------------
478 friend std::ostream & operator<< ( std::ostream & rOStream, const ObjID & rObjID )
479 {
480 return rOStream << rObjID.toString();
481 };
482 //-----------------------------------------------------------------------
483 friend std::istream & operator>> ( std::istream & rIStream, ObjID & rObjID )
484 {
485 std::string t_strObjID;
486
487 rIStream >> t_strObjID;
488 rObjID.setID( t_strObjID, "." );
489 return rIStream;
490 };
491 //-----------------------------------------------------------------------
492
493 //-----------------------------------------------------------------------
512 {
513 size_t operator()( const ObjID & rObjID ) const;
514 };
515
516 };
517 //---------------------------------------------------------------------------
518} // namespace glo
519#endif
For each library, here 'GlobalObjects' there is a type file.
#define __glo_export_dll
Definition GloTypes.h:70
An object ID consists of the class ID, a database ID and the actual unique object number (all unsigne...
Definition GloObjID.h:84
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)
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:512
size_t operator()(const ObjID &rObjID) const