GlobalObjects
Lade ...
Suche ...
Keine Treffer
GloObjID.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_GLOOBJID_H
2#define INC_GLOOBJID_H
3//-----------------------------------------------------------------------------
36//-----------------------------------------------------------------------------
37#include <string>
38#include "GloTypes.h"
39#if defined ( _MSC_VER ) && ( _MSC_VER >= 1920 ) // nur für VC 2019
40 #include <sstream>
41#endif
42//-----------------------------------------------------------------------------
43namespace glo
44{
45 //---------------------------------------------------------------------------
77 {
78 private:
79 //============== Attribute
80 //-----------------------------------------------------------------------
90 unsigned long m_ulClassID;
91 //-----------------------------------------------------------------------
108 unsigned long m_ulBaseID;
109 //-----------------------------------------------------------------------
119 unsigned long m_ulObjCounter;
120 //-----------------------------------------------------------------------
121
122 public:
123 //============= Konstruktoren
124 //-----------------------------------------------------------------------
135 //-----------------------------------------------------------------------
156 ObjID( unsigned long ulClassID,
157 unsigned long ulBaseID,
158 unsigned long ulObjCounter );
159 //-----------------------------------------------------------------------
189 ObjID( const std::string & sObjId, const std::string & sSeparator = "." );
190 //-----------------------------------------------------------------------
202 ObjID( const ObjID & rT );
203 //-----------------------------------------------------------------------
213 virtual ~ObjID();
214 //-----------------------------------------------------------------------
215
216 //============== Methoden
217 //-----------------------------------------------------------------------
229 bool isNULL() const;
230 //-----------------------------------------------------------------------
240 void setNULL();
241 //-----------------------------------------------------------------------
262 void setID( unsigned long ulClassID,
263 unsigned long ulBaseID,
264 unsigned long ulObjCounter );
265 //-----------------------------------------------------------------------
293 int setID( const std::string & sObjId, const std::string & sSeparator = "." );
294 //-----------------------------------------------------------------------
308 void setClassID( unsigned long ulClassID );
309 //-----------------------------------------------------------------------
323 void setBaseID( unsigned long ulBaseID );
324 //-----------------------------------------------------------------------
338 void setObjCounter( unsigned long ulObjCounter );
339 //-----------------------------------------------------------------------
353 unsigned long getClassID() const;
354 //-----------------------------------------------------------------------
368 unsigned long getBaseID() const;
369 //-----------------------------------------------------------------------
383 unsigned long getObjCounter() const;
384 //-----------------------------------------------------------------------
401 static bool IsValidObjID( const std::string & rsObjID,
402 const std::string & sSeparator = "." );
403 //-----------------------------------------------------------------------
415 std::string toString() const;
416 //-----------------------------------------------------------------------
417
418 public:
419 //============== Operatoren
420 //-----------------------------------------------------------------------
422
433 bool operator== ( const ObjID & rT ) const;
434 bool operator!= ( const ObjID & rT ) const;
436 //-----------------------------------------------------------------------
438
452 bool operator> ( const ObjID & rT ) const;
453 bool operator>= ( const ObjID & rT ) const;
454 bool operator< ( const ObjID & rT ) const;
455 bool operator<= ( const ObjID & rT ) const;
457 //-----------------------------------------------------------------------
469 ObjID & operator= ( const ObjID & rT );
470 //-----------------------------------------------------------------------
471 friend std::ostream & operator<< ( std::ostream & rOStream, const ObjID & rObjID )
472 {
473 return rOStream << rObjID.toString();
474 };
475 //-----------------------------------------------------------------------
476 friend std::istream & operator>> ( std::istream & rIStream, ObjID & rObjID )
477 {
478 std::string t_strObjID;
479
480 rIStream >> t_strObjID;
481 rObjID.setID( t_strObjID, "." );
482 return rIStream;
483 };
484 //-----------------------------------------------------------------------
485 };
486 //---------------------------------------------------------------------------
487} // namespace glo
488#endif
Für jede Bibliothek, hier 'GlobalObjects' gibt es eine Typen-Datei.
#define __glo_export_dll
Definition GloTypes.h:63
Ein Objekt-ID besteht aus der Klassen-ID, einer Datenbank-ID und der eigentlichen eindeutigen ObjektZ...
Definition GloObjID.h:77
unsigned long getClassID() const
static bool IsValidObjID(const std::string &rsObjID, const std::string &sSeparator=".")
unsigned long m_ulObjCounter
Definition GloObjID.h:119
unsigned long m_ulClassID
Definition GloObjID.h:90
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:108
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:42