GlobalObjects
Loading...
Searching...
No Matches
glo::Base Class Reference

#include <GloBase.h>

Public Member Functions

 Base ()
 
 Base (const std::string &rstrClientName)
 
 Base (const std::string &rstrClientName, const std::string &rstrSchemaPath, const std::string &rstrBaseName)
 
 Base (const std::string &rstrClientName, ObjCreator &rObjCreator)
 
 Base (const std::string &rstrServerName, const std::string &rstrClientName)
 
 Base (const std::string &rstrServerName, const std::string &rstrClientName, int iTimeOutSec, unsigned int uiPort, const std::string &rstrSchemaPath, const std::string &rstrKnownSchemes)
 
 Base (const std::string &rstrServerName, const std::string &rstrClientName, ObjCreator &rObjCreator)
 
virtual ~Base ()
 
int assignObject (BasePersistent *pObject) const
 
int beginTransaction () const
 
int close (CallBack *pProgressNotificationCallBack=nullptr)
 
int closeAllSet (BaseAllSet *pAllSet) const
 
int closeBase (CallBack *pProgressNotificationCallBack=nullptr)
 
int commitTransaction () const
 
int compressBase (CallBack *pProgressNotificationCallBack=nullptr)
 
int compressBase (const std::string &rstrBaseName, CallBack *pProgressNotificationCallBack=nullptr)
 
int connect (CallBack *pServerCrashNotificationCallBack=nullptr)
 
int deleteObject (BasePersistent *pObject, EnDeepMode eDeepMode) const
 
int deleteObjects (const std::vector< glo::ObjID > &rObjectIDs, EnDeepMode eDeepMode=glo::DM_SHALLOW) const
 
int disconnect ()
 
int getAllBases (std::vector< std::string > *&prRetValVector) const
 
int getAllClassInfosFromBase (std::map< unsigned long, ClassInfo *, std::less< unsigned long > > *&prAllClassInfoMap, const std::string &rstrBaseName="") const
 
int getAllClassInfosFromBase (std::map< unsigned long, std::shared_ptr< ClassInfo >, std::less< unsigned long > > &rAllClassInfoMap, const std::string &rstrBaseName="") const
 
int getAllLoggedClients (std::vector< ClientInfo > &rClientInfoVector, const std::string &rstrBaseName="") const
 
int getAllSubClassInfos (std::map< unsigned long, ClassInfo *, std::less< unsigned long > > *&prSubClassInfoMap, unsigned long ulClassID, const std::string &rstrBaseName="") const
 
int getAllSubClassInfos (std::map< unsigned long, std::shared_ptr< ClassInfo >, std::less< unsigned long > > &rSubClassInfoMap, unsigned long ulClassID, const std::string &rstrBaseName="") const
 
int getAllSuperClassInfos (std::map< unsigned long, ClassInfo *, std::less< unsigned long > > *&prSuperClassInfoMap, unsigned long ulClassID, const std::string &rstrBaseName="") const
 
int getAllSuperClassInfos (std::map< unsigned long, std::shared_ptr< ClassInfo >, std::less< unsigned long > > &rBaseClassInfoMap, unsigned long ulClassID, const std::string &rstrBaseName="") const
 
int getAnObject (BasePersistent *&prObject, const ObjID &rObjID, bool bGeneric=false) const
 
int getAnObject (std::shared_ptr< BasePersistent > &rObject, const ObjID &rObjID, bool bGeneric=false) const
 
int getBaseCount (std::vector< std::string >::size_type &rBaseCount) const
 
unsigned long getBaseID () const
 
std::string getBaseName () const
 
int getClassInfo (ClassInfo *&prClassInfo, const std::string &rstrClassName, const std::string &rstrBaseName="") const
 
int getClassInfo (ClassInfo *&prClassInfo, unsigned long ulClassID, const std::string &rstrBaseName="") const
 
int getClassInfo (std::shared_ptr< ClassInfo > &rRetVal, const std::string &rstrClassName, const std::string &rstrBaseName="") const
 
int getClassInfo (std::shared_ptr< ClassInfo > &rRetVal, unsigned long ulClassID, const std::string &rstrBaseName="") const
 
int getClassInfoCount (std::map< unsigned long, ClassInfo *, std::less< unsigned long > >::size_type &rClassInfoCount, const std::string &rstrBaseName="") const
 
std::string getClientName () const
 
unsigned int getCommunicatorID () const
 
std::string getDbIniName () const
 
int getDefaultLimits (std::vector< LimitRecord > *&prRetValVector) const
 
GenPersObjectSpygetGenPersObjectSpy ()
 
int getIndexedObjIdsFromAllSet (std::vector< glo::ObjID > &rObjIDContainer, const BaseAllSet &rAllSet, const std::string &rsIndexName, unsigned long ulIndexClassID, const std::string &rsIndexSearchValue, EnComparisionOp eComparisionOp) const
 
int getIndexedObjIdsFromAllSet (std::vector< glo::ObjID > &rObjIDContainer, const BaseAllSet &rAllSet, const std::string &rsIndexName, unsigned long ulIndexClassID, const std::string &rsIndexSearchValue, EnQueryType eQuerryType) const
 
int getIndexedObjIdsFromAllSet (std::vector< glo::ObjID > &rObjIDContainer, const BaseAllSet &rAllSet, const std::string &rsIndexName, unsigned long ulIndexClassID, const std::string &rsRangeStartIndexSearchValue, const std::string &rsRangeEndIndexSearchValue) const
 
int getIndexedObjIdsFromAllSet (std::vector< glo::ObjID > &rObjIDContainer, const BaseAllSet &rAllSet, const std::string &rsIndexSearchValue, EnComparisionOp eComparisionOp) const
 
int getIndexedObjIdsFromAllSet (std::vector< glo::ObjID > &rObjIDContainer, const BaseAllSet &rAllSet, const std::string &rsIndexSearchValue, EnQueryType eQuerryType) const
 
int getIndexedObjIdsFromAllSet (std::vector< glo::ObjID > &rObjIDContainer, const BaseAllSet &rAllSet, const std::string &rsRangeStartIndexSearchValue, const std::string &rsRangeEndIndexSearchValue) const
 
int getKnownSchemes (std::vector< std::string > &rRetVal)
 
int getLimits (LimitRecord *&prLimitRecord, const ClassInfoAttribute::Type &rClassInfoAttributeType) const
 
int getLimits (std::shared_ptr< LimitRecord > &rLimitRecord, const ClassInfoAttribute::Type &rClassInfoAttributeType) const
 
int getObjectFromAllSet (ObjID &rObjID, BasePersistent *&prObject, const BaseAllSet &rAllSet, EnSeekMode eMode, bool bGeneric=false) const
 
ObjectMakergetObjectMaker ()
 
int getObjIdFromAllSet (ObjID &rObjID, const BaseAllSet &rAllSet, EnSeekMode eMode) const
 
PersObjectSpygetPersObjectSpy ()
 
int getPort (unsigned int &ruiPort)
 
int getProcessingPossibilities (const ObjID &rObjId, LockPossibleSpecification &rLockPossibleSpecification, EnDeepMode eDeepMode) const
 
int getRecord (Record *&prRecord, const ObjID &rObjID, unsigned long ulClassID) const
 
int getRecord (std::shared_ptr< Record > &rRecord, const ObjID &rObjID, unsigned long ulClassID) const
 
int getRootClassInfo (ClassInfo *&prRootClassInfo, const std::string &rstrBaseName="") const
 
int getRootClassInfo (std::shared_ptr< ClassInfo > &rRootClassInfo, const std::string &rstrBaseName="") const
 
int getSchemaNameWithPath (std::string &rstrRetVal)
 
int getSchemaPath (std::string &rstrRetVal)
 
std::string getServerName () const
 
int getSizeFromAllSet (std::size_t &rnSize, const BaseAllSet &rAllSet) const
 
int getSubClassInfos (std::map< unsigned long, ClassInfo *, std::less< unsigned long > > *&prSubClassInfoMap, unsigned long ulClassID, const std::string &rstrBaseName="") const
 
int getSubClassInfos (std::map< unsigned long, std::shared_ptr< ClassInfo >, std::less< unsigned long > > &rSubClassInfoMap, unsigned long ulClassID, const std::string &rstrBaseName="") const
 
int getSuperClassInfos (std::map< unsigned long, ClassInfo *, std::less< unsigned long > > *&prSuperClassInfoMap, unsigned long ulClassID, const std::string &rstrBaseName="") const
 
int getSuperClassInfos (std::map< unsigned long, std::shared_ptr< ClassInfo >, std::less< unsigned long > > &rBaseClassInfoMap, unsigned long ulClassID, const std::string &rstrBaseName="") const
 
int getTimeOutSec (int &riTimeOutSec)
 
int getTransactionLevel () const
 
int indexAvailable (const std::string &rsIndexName, unsigned long ulClassID, const std::string &rstrBaseName="") const
 
bool isConnected () const
 
bool isInTransaction () const
 
int isKnownClassID (bool &rbRetVal, unsigned long ulClassID, const std::string &rstrBaseName="") const
 
int isLockedObject (const ObjID &rObjId, EnLockMode eLockMode, EnDeepMode eDeepMode) const
 
bool isOpen () const
 
int isPossible (const ObjID &rObjId, bool bRead, bool bWrite, bool bDelete, EnDeepMode eDeepMode) const
 
int isStoredObject (bool &rbRetVal, BasePersistent *pObject) const
 
int isSuperClassFrom (bool &rbRetVal, unsigned long ulClassIDSuperClass, unsigned long ulClassIDSubClass, const std::string &rstrBaseName="") const
 
int lockLot (const BaseLot &rObjIdLot, EnLockMode eLockMode, EnDeepMode eDeepMode) const
 
int lockObject (const ObjID &rObjId, EnLockMode eLockMode, EnDeepMode eDeepMode) const
 
int lockObjIdList (std::list< ObjID > *pObjIDList, EnLockMode eLockMode, EnDeepMode eDeepMode) const
 
int notifyAsWritten (const std::list< ObjID > &rObjIDList) const
 
int objIDInAllSet (const ObjID &rObjID, const BaseAllSet &rAllSet) const
 
int open (const std::string &rstrBaseName, CallBack *pProgressNotificationCallBack=nullptr)
 
int openAllSet (BaseAllSet *pAllSet) const
 
int openBase (CallBack *pProgressNotificationCallBack=nullptr, CallBack *pServerCrashNotificationCallBack=nullptr)
 
int openBaseComfortably (CallBack *pProgressNotificationCallBack=nullptr, CallBack *pServerCrashNotificationCallBack=nullptr)
 
int reconnect (CallBack *pServerCrashNotificationCallBack=nullptr)
 
int refreshObject (BasePersistent *pObject) const
 
int reindexBase (CallBack *pProgressNotificationCallBack=nullptr)
 
int reindexBase (const std::string &rstrBaseName, CallBack *pProgressNotificationCallBack=nullptr)
 
int relockObject (const ObjID &rObjId, EnLockMode eLockMode, EnDeepMode eDeepMode) const
 
int removeIndexFilter (const BaseAllSet &rAllSet) const
 
int repairBase (CallBack *pProgressNotificationCallBack=nullptr)
 
int repairBase (const std::string &rstrBaseName, CallBack *pProgressNotificationCallBack=nullptr)
 
int setBaseName (const std::string &rstrBaseName)
 
int setClientName (const std::string &rstrClientName)
 
int setCurrentObjectInAllSet (const ObjID &rObjID, const BaseAllSet &rAllSet) const
 
int setDbIniName (const std::string &rstrDbIniName)
 
int setIndexFilter (const BaseAllSet &rAllSet, const std::string &rsIndexFilter) const
 
int setIndexFilter (const BaseAllSet &rAllSet, const std::string &rsIndexFilter, EnComparisionOp eComparisionOp) const
 
int setIndexFilter (const BaseAllSet &rAllSet, const std::string &rsRangeStartIndexFilter, const std::string &rsRangeEndIndexFilter) const
 
int setKnownSchemes (const std::string &rstrKnownSchemes)
 
int setPositionInAllSet (std::size_t nPosition, const BaseAllSet &rAllSet) const
 
int setSchemaPath (const std::string &rstrSchemaPath)
 
int setWatchClass (unsigned long ulClassID, TdWatchNotifyMode ulWatchMode, CallBack *pCallBack) const
 
int setWatchClient (TdWatchNotifyMode ulWatchMode, CallBack *pCallBack) const
 
int setWatchIndex (TdWatchNotifyMode ulWatchMode, CallBack *pCallBack) const
 
int setWatchLot (const BaseLot &rObjIdLot, TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack) const
 
int setWatchObject (const ObjID &rObjId, TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack) const
 
int setWatchServer (CallBack *pCallBack) const
 
int storeObject (BasePersistent *pObject, EnDeepMode eDeepMode) const
 
int unlockLot (const BaseLot &rObjIdLot, EnLockMode eLockMode, EnDeepMode eDeepMode) const
 
int unlockObject (const ObjID &rObjId, EnLockMode eLockMode, EnDeepMode eDeepMode) const
 
int unlockObjIdList (std::list< ObjID > *pObjIDList, EnLockMode eLockMode, EnDeepMode eDeepMode) const
 
int unsetWatchClass (unsigned long ulClassID, TdWatchNotifyMode ulWatchMode, CallBack *pCallBack) const
 
int unsetWatchClient (TdWatchNotifyMode ulWatchMode, CallBack *pCallBack) const
 
int unsetWatchIndex (TdWatchNotifyMode ulWatchMode, CallBack *pCallBack) const
 
int unsetWatchLot (const BaseLot &rObjIdLot, TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack) const
 
int unsetWatchObject (const ObjID &rObjId, TdWatchNotifyMode ulWatchMode, EnDeepMode eDeepMode, CallBack *pCallBack) const
 
int abortTransaction () const
 A transaction is aborted or rolled back.
 
int rollBackTransaction () const
 A transaction is aborted or rolled back.
 

Protected Member Functions

std::shared_ptr< PrivateBasegetPrivateBase () const
 

Private Member Functions

 Base (const Base &)
 
Baseoperator= (const Base &)
 

Private Attributes

eut::CriticalSection m_LocalCriticalSection
 
OpenedDatabasesm_pOpenedDatabases
 
std::shared_ptr< PrivateBasem_spPrivateBase
 

Friends

class EmbeddedRecordAttribute
 
class ObjectMaker
 
class Persistent
 

Constructor & Destructor Documentation

◆ Base() [1/8]

glo::Base::Base ( )

The standard constructor instantiates an object of this class in "LOCAL" mode, i.e. in single-user mode on the database.

◆ Base() [2/8]

glo::Base::Base ( const std::string & rstrClientName)

The constructor with parameter passing instantiates an object of this class in "LOCAL" mode, i.e. in single-user mode on the database.

Parameters
[in]rstrClientNameThe client name can be passed.

◆ Base() [3/8]

glo::Base::Base ( const std::string & rstrClientName,
const std::string & rstrSchemaPath,
const std::string & rstrBaseName )

The constructor with parameter passing instantiates an object of this class in "LOCAL" mode, i.e. in single-user mode on the database. To be able to open a database without DB.ini, the path to a database and the name of the database is needed, which is passed here.

Parameters
[in]rstrClientNameThe client name can be passed here.
[in]rstrSchemaPathThe directory path to the database is mandatory (e.g. "C:/Path/").
[in]rstrBaseNameThe name of the schema respectively database is mandatory.

◆ Base() [4/8]

glo::Base::Base ( const std::string & rstrClientName,
ObjCreator & rObjCreator )

The constructor with parameter passing instantiates an object of this class in "LOCAL" mode, i.e. in single-user mode on the database.

In order to be able to open a database without DB.ini, the path to a database can be passed afterwards (see also Base::setSchemaPath (...) ).

Parameters
[in]rstrClientNameThe client name can be passed.
[in]rObjCreatorReference to a valid ObjCreator (which knows the persistent classes and the database).

◆ Base() [5/8]

glo::Base::Base ( const std::string & rstrServerName,
const std::string & rstrClientName )

Constructor with parameter passing instantiates an object of this class in the passed mode (parameter rstrServerName)

This would be sufficient to connect to a database (see Base::connect(CallBack *) )

Parameters
[in]rstrServerNameThe server name or IP address is mandatory. If "LOCAL" is passed as server, the system operates in single user mode.
[in]rstrClientNameThe client name can be passed.

◆ Base() [6/8]

glo::Base::Base ( const std::string & rstrServerName,
const std::string & rstrClientName,
int iTimeOutSec,
unsigned int uiPort,
const std::string & rstrSchemaPath,
const std::string & rstrKnownSchemes )

This constructor with parameter passing instantiates an object of this class in passed mode (parameter rstrServerName) to be able to open a database without a DB.ini.

Parameters
[in]rstrServerNameThe server name or IP address is mandatory. If "LOCAL" is passed as server, the system operates in single user mode. The uiPort is not used.
If "LOCAL" is not passed as server, i.e. a server is to be addressed, rstrSchemaPath and rstrKnownSchemes are not evaluated, because the server knows by evaluating 'its DB.ini' which databases exist and where they are located.
[in]rstrClientNameThe client name can be passed.
[in]iTimeOutSecThe waiting time in seconds is mandatory.
[in]uiPortThe port (only mandatory for server operation!).
[in]rstrSchemaPathThe directory path to the database (e.g. "C:/Path/") is only mandatory for single user operation.
[in]rstrKnownSchemesThe names of the known database (e.g. "Name1|Name2") are only mandatory for single user operation.

◆ Base() [7/8]

glo::Base::Base ( const std::string & rstrServerName,
const std::string & rstrClientName,
ObjCreator & rObjCreator )

This constructor with parameter passing instantiates an object of this class in passed mode (parameter rstrServerName) to open a database with DB.ini This constructor is usually used when working with typed persistent objects of a database.

Parameters
[in]rstrServerNameThe server name or IP address is mandatory. If "LOCAL" is passed as the server, work is carried out in single-user mode. There must be a DB.ini for the application (in its execution directory) so that it can determine, among other things, which databases exist and where they are located.
If not passed as server "LOCAL", i.e. a server is addressed the server (in its access) must have a DB.ini must be present, so that it can determine, among other things, which databases exist and where they are located.
[in]rstrClientNameThe client name can be passed.
[in]rObjCreatorReference to a valid ObjCreator (which knows the persistent classes and the database).

◆ ~Base()

virtual glo::Base::~Base ( )
virtual

Destructor, cleaning up. If the database is open, it will be closed first to write the indexes.

◆ Base() [8/8]

glo::Base::Base ( const Base & )
private

The copy constructor is not available.

Member Function Documentation

◆ abortTransaction()

int glo::Base::abortTransaction ( ) const

A transaction is aborted or rolled back.

The database actions of the current transaction stack up to the last Base::beginTransaction() are discarded.

Returns
A return < 0 indicates an error.
See also
description of the GlobalObjects Transaktion.
Base::beginTransaction() and Base::commitTransaction()

◆ assignObject()

int glo::Base::assignObject ( BasePersistent * pObject) const

Registriert das übertragene Objekt in der geöffneten Datenbank. Dem Objekt wird eine Objekt-ID zugewiesen.

Parameters
[in,out]pObjectZeiger auf das zu registrierende persistente Objekt.
Returns
Ein Rückgabewert < 0 zeigt einen Fehler an.

◆ beginTransaction()

int glo::Base::beginTransaction ( ) const

A transaction is started. Database actions are not processed immediately, but end up on a transaction stack.

Returns
A return < 0 indicates an error.
See also
description of the GlobalObjects Transaktion.
Base::commitTransaction(), Base::abortTransaction() and Base::rollBackTransaction()

◆ close()

int glo::Base::close ( CallBack * pProgressNotificationCallBack = nullptr)

The open database is closed.

Parameters
[in]pProgressNotificationCallBackWhen a valid pointer to an object is passed, the progress of writing indexes is sent via a notification to the CallBack object (see also CallBack::notify(NotifyNote&) ).
Returns
A return value < 0 indicates an error.
Note
The database should have been opened with the method Base::open(const std::string&, CallBack*).

◆ closeAllSet()

int glo::Base::closeAllSet ( BaseAllSet * pAllSet) const

Closes an AllSet in the open database.

Parameters
[in,out]pAllSetThe AllSet.
Returns
A return value < 0 indicates an error.

◆ closeBase()

int glo::Base::closeBase ( CallBack * pProgressNotificationCallBack = nullptr)

The open database is closed.
The connection to the database is implicitly terminated.

Parameters
[in]pProgressNotificationCallBackWhen a valid pointer to an object is passed, the progress of writing indexes is sent via a notification to the CallBack object (see also CallBack::notify(NotifyNote&) ).
Returns
A return value < 0 indicates an error.
Note
The database should have been opened with the method Base::openBase(CallBack*) or Base::openBaseComfortably(CallBack*).

◆ commitTransaction()

int glo::Base::commitTransaction ( ) const

A transaction is confirmed. The database actions of the current transaction stack are processed.

Returns
A return < 0 indicates an error.
See also
description of the GlobalObjects Transaktion.
Base::beginTransaction(), Base::abortTransaction() and Base::rollBackTransaction()

◆ compressBase() [1/2]

int glo::Base::compressBase ( CallBack * pProgressNotificationCallBack = nullptr)

The database is compressed with the name that was previously passed in a constructor or via Base::setBaseName (...). This means that all deleted records are removed from the tables.

Parameters
[in]pProgressNotificationCallBackIf a valid pointer to an object is passed the progress of the compression via a notification to the CallBack object (see also CallBack::notify(NotifyNote&) ).
Returns
A return value < 0 indicates an error.
Note
If finished without errors, the index has been rebuilt.
Attention
The desired will only succeed if the database is not opened by any instance.
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ compressBase() [2/2]

int glo::Base::compressBase ( const std::string & rstrBaseName,
CallBack * pProgressNotificationCallBack = nullptr )

The database is compressed with the transferred name. The means that all deleted records are removed from the tables.

Parameters
[in]rstrBaseNameThe name of the database which compresses should be.
[in]pProgressNotificationCallBackIf a valid pointer to an object is passed the progress of the compression via a notification to the CallBack object (see also CallBack::notify(NotifyNote&) ).
Returns
A return value < 0 indicates an error.
Note
If finished without errors, the index has been rebuilt.
Attention
The desired will only succeed if the database is not opened by any instance.
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ connect()

int glo::Base::connect ( CallBack * pServerCrashNotificationCallBack = nullptr)

Establishes a connection to Manager.
Depending on the server name a LocalThread is instantiated at "LOCAL", otherwise a ClientThread is instantiated.
If server name "LOCAL", at least the directory path to the database and the names of the existing databases (e.g. "Name1|Name2") must be known.
If the server name includes a server connection, at least the TCP port and the information about the waiting time in seconds must be known.

Parameters
[in]pServerCrashNotificationCallBackIf a valid pointer to a CallBack object is passed and a connection to a GloServer is to be established, a notification is sent to the CallBack object if the connection is lost (see also CallBack::notify(NotifyNote&) ).
Returns
A return value < 0 indicates an error.
See also
Base::disconnect()

◆ deleteObject()

int glo::Base::deleteObject ( BasePersistent * pObject,
EnDeepMode eDeepMode ) const

Deletes passed persistent object in the database.

Parameters
[in]pObjectA pointer to the object to be deleted.
[in]eDeepModeThe delete depth mode.
Returns
A return value < 0 indicates an error.
Attention
The deleted object can no longer be saved, the object ID is used up.

◆ deleteObjects()

int glo::Base::deleteObjects ( const std::vector< glo::ObjID > & rObjectIDs,
EnDeepMode eDeepMode = glo::DM_SHALLOW ) const

Deletes the objects with the object ID from the passed container in the database.

Parameters
[in]rObjectIDsContainer with the object IDs of the objects to be deleted.
[in]eDeepModeThe delete depth mode.
Returns
A return value < 0 indicates an error.
Note
Either all objects with the respective object IDs are deleted, or none. This can happen if at least one object to be deleted is locked.
The passed object ID container must not be empty.
The possibly overwritten methods glo::Persistent::preDeleteInBase( EnDeepMode, void*& ) and glo::Persistent::postDeleteInBase( int, EnDeepMode, void* ) are NOT called for the objects to be deleted!
Attention
The deleted objects can no longer be saved; the object IDs are used up.

◆ disconnect()

int glo::Base::disconnect ( )

Terminates a connection to Manager.

Returns
A return value < 0 indicates an error.
See also
Base::connect(CallBack*)

◆ getAllBases()

int glo::Base::getAllBases ( std::vector< std::string > *& prRetValVector) const

Returns all names of known databases via Manager.

Parameters
[in,out]prRetValVectorThe names of the known databases.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ getAllClassInfosFromBase() [1/2]

int glo::Base::getAllClassInfosFromBase ( std::map< unsigned long, ClassInfo *, std::less< unsigned long > > *& prAllClassInfoMap,
const std::string & rstrBaseName = "" ) const

Returns all class information from the database with the name passed.

Parameters
[in,out]prAllClassInfoMapThe container with all class information.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.
The supplied object and its elements must be removed from memory by the calling instance.
Note
It is recommended, if possible, to consider using std::shared_ptr and to use the method getAllClassInfosFromBase(std::map< unsigned, std::shared_ptr<ClassInfo>, std::less<unsigned long> >&, const std::string&)const.

◆ getAllClassInfosFromBase() [2/2]

int glo::Base::getAllClassInfosFromBase ( std::map< unsigned long, std::shared_ptr< ClassInfo >, std::less< unsigned long > > & rAllClassInfoMap,
const std::string & rstrBaseName = "" ) const

Returns all class information from the database with the name passed.

Parameters
[in,out]rAllClassInfoMapThe container with all class information in std::shared_ptr.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ getAllLoggedClients()

int glo::Base::getAllLoggedClients ( std::vector< ClientInfo > & rClientInfoVector,
const std::string & rstrBaseName = "" ) const

Returns all clients logged on the server. If the name of a database is passed, the clients which have opened the database with the passed name are delivered. have opened the database with the given name.

Parameters
[in,out]prClientInfoVectorThe ClientInfo's of the clients, which have opened the database with the given name.
[in]rstrBaseNameIf the name of the database is not an empty string, the clients are delivered, which are connected to the database.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ getAllSubClassInfos() [1/2]

int glo::Base::getAllSubClassInfos ( std::map< unsigned long, ClassInfo *, std::less< unsigned long > > *& prSubClassInfoMap,
unsigned long ulClassID,
const std::string & rstrBaseName = "" ) const

Returns the class information of all subclasses of a class with passed class ID from the database with passed name.

Parameters
[in,out]prSubClassInfoMapThe container with the class information of all subclasses of the class with passed class ID.
[in]ulClassIDThe class ID.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.
The supplied object and its elements must be removed from memory by the calling instance.
Note
It is recommended, if possible, to consider using std::shared_ptr and to use the method getAllSubClassInfos(std::map< unsigned, std::shared_ptr<ClassInfo>, std::less<unsigned long> >&, unsigned long, const std::string&)const.

◆ getAllSubClassInfos() [2/2]

int glo::Base::getAllSubClassInfos ( std::map< unsigned long, std::shared_ptr< ClassInfo >, std::less< unsigned long > > & rSubClassInfoMap,
unsigned long ulClassID,
const std::string & rstrBaseName = "" ) const

Returns the class information of all subclasses of a class with passed class ID from the database with passed name.

Parameters
[in,out]rSubClassInfoMapThe container with the class information of all subclasses of the class with passed class ID in std::shared_ptr.
[in]ulClassIDThe class ID.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ getAllSuperClassInfos() [1/2]

int glo::Base::getAllSuperClassInfos ( std::map< unsigned long, ClassInfo *, std::less< unsigned long > > *& prSuperClassInfoMap,
unsigned long ulClassID,
const std::string & rstrBaseName = "" ) const

Returns the class information of all superclasses of a class with a passed class ID from the database with a passed name.

Parameters
[in,out]prSuperClassInfoMapThe container with the class information of all superclasses of the class with passed class ID.
[in]ulClassIDThe class ID.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.
The supplied object and its elements must be removed from memory by the calling instance.
Note
It is recommended, if possible, to consider using std::shared_ptr and to use the method getAllSuperClassInfos(std::map< unsigned, std::shared_ptr<ClassInfo>, std::less<unsigned long> >&, unsigned long, const std::string&)const.

◆ getAllSuperClassInfos() [2/2]

int glo::Base::getAllSuperClassInfos ( std::map< unsigned long, std::shared_ptr< ClassInfo >, std::less< unsigned long > > & rBaseClassInfoMap,
unsigned long ulClassID,
const std::string & rstrBaseName = "" ) const

Returns the class information of all superclasses of a class with a passed class ID from the database with a passed name.

Parameters
[in,out]rBaseClassInfoMapThe container with the class information of all superclasses of the class with passed class ID in std::shared_ptr.
[in]ulClassIDThe class ID.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ getAnObject() [1/2]

int glo::Base::getAnObject ( BasePersistent *& prObject,
const ObjID & rObjID,
bool bGeneric = false ) const

Returns an object with passed object ID from the opened database.

Parameters
[in,out]prObjectThe pointer to the fetched object.
[in]rObjIDThe object ID.
[in]bGenericIf false, an object of type Persistent or derived from it is returned.
If true, a generic object of the type GenericPersistent is delivered.
Returns
A return value < 0 indicates an error.
Attention
The returned object must be removed from memory by the calling instance using BasePersistent::forget().
Note
It is recommended, if possible, to consider using std::shared_ptr in conjunction with Forgetter and to use the method getAnObject(std::shared_ptr<BasePersistent>&, const ObjID&, bool)const.

◆ getAnObject() [2/2]

int glo::Base::getAnObject ( std::shared_ptr< BasePersistent > & rObject,
const ObjID & rObjID,
bool bGeneric = false ) const

Returns an object with passed object ID from the opened database.

Parameters
[in,out]rObjectThe pointer to the fetched object in a std::shared_ptr.
[in]rObjIDThe object ID.
[in]bGenericIf false, an object of type Persistent or derived from it is returned.
If true, a generic object of the type GenericPersistent is delivered.
Returns
A return value < 0 indicates an error.

◆ getBaseCount()

int glo::Base::getBaseCount ( std::vector< std::string >::size_type & rBaseCount) const

Returns the number of known databases via Manager.

Parameters
[in,out]rBaseCountThe number of known databases.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ getBaseID()

unsigned long glo::Base::getBaseID ( ) const

Returns the database ID.

Returns
See above.

◆ getBaseName()

std::string glo::Base::getBaseName ( ) const
Returns
The name of the schema respectively database.

◆ getClassInfo() [1/4]

int glo::Base::getClassInfo ( ClassInfo *& prClassInfo,
const std::string & rstrClassName,
const std::string & rstrBaseName = "" ) const

Returns the class information of a class with passed class name from the database with passed name.

Parameters
[in,out]prClassInfoThe class information.
[in]rstrClassNameThe class name.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.
The object delivered must be removed from memory by the calling instance.
Note
It is recommended, if possible, to consider using std::shared_ptr and to use the method getClassInfo(std::shared_ptr<ClassInfo>&, unsigned long, const std::string&)const

◆ getClassInfo() [2/4]

int glo::Base::getClassInfo ( ClassInfo *& prClassInfo,
unsigned long ulClassID,
const std::string & rstrBaseName = "" ) const

Returns the class information of a class with passed class ID from the database with passed name.

Parameters
[in,out]prClassInfoThe class information.
[in]ulClassIDThe class ID.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.
The object delivered must be removed from memory by the calling instance.
Note
It is recommended, if possible, to consider using std::shared_ptr and to use the method getClassInfo(std::shared_ptr<ClassInfo>&, unsigned long, const std::string&)const

◆ getClassInfo() [3/4]

int glo::Base::getClassInfo ( std::shared_ptr< ClassInfo > & rRetVal,
const std::string & rstrClassName,
const std::string & rstrBaseName = "" ) const

Returns the class information of a class with passed class name from the database with passed name.

Parameters
[in,out]rRetValThe class information in a std::shared_ptr.
[in]rstrClassNameThe class name.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ getClassInfo() [4/4]

int glo::Base::getClassInfo ( std::shared_ptr< ClassInfo > & rRetVal,
unsigned long ulClassID,
const std::string & rstrBaseName = "" ) const

Returns the class information of a class with passed class ID from the database with passed name.

Parameters
[in,out]rRetValThe class information in a std::shared_ptr.
[in]ulClassIDThe class ID.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ getClassInfoCount()

int glo::Base::getClassInfoCount ( std::map< unsigned long, ClassInfo *, std::less< unsigned long > >::size_type & rClassInfoCount,
const std::string & rstrBaseName = "" ) const

Returns the number of all class information from the database with the name passed.

Parameters
[in,out]rClassInfoCountThe number of class information.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ getClientName()

std::string glo::Base::getClientName ( ) const

Returns a client name if set.

Returns
The client name.

◆ getCommunicatorID()

unsigned int glo::Base::getCommunicatorID ( ) const
Returns
The communicator ID.

◆ getDbIniName()

std::string glo::Base::getDbIniName ( ) const

Returns the name of the initialization file.

Returns
See above.
See also
setDbIniName(const std::string&)

◆ getDefaultLimits()

int glo::Base::getDefaultLimits ( std::vector< LimitRecord > *& prRetValVector) const

Returns the default limitations of the database.

Parameters
[in,out]prRetValVectorAll limits of the database.
Returns
A return value < 0 indicates an error.
Attention
There must be at least one connection to the Manager (see Base::connect(CallBack*) )

◆ getGenPersObjectSpy()

GenPersObjectSpy * glo::Base::getGenPersObjectSpy ( )

Returns the pointers to the GenPersObjectSpy from its m_spPrivateBase

Returns
see above.
Attention
The calling instance must NOT modify or remove the returned object from memory. It only lives as long as this object.

◆ getIndexedObjIdsFromAllSet() [1/6]

int glo::Base::getIndexedObjIdsFromAllSet ( std::vector< glo::ObjID > & rObjIDContainer,
const BaseAllSet & rAllSet,
const std::string & rsIndexName,
unsigned long ulIndexClassID,
const std::string & rsIndexSearchValue,
EnComparisionOp eComparisionOp ) const

Returns a container of object IDs from the passed AllSet in relation to the passed parameters. The result can be defined using the parameter eComparisionOp. If e.g. parameter sIndex has the value "123" and parameter eComparisionOp has the value LESS, only all objects with the index lower than 123 will be delivered.

Parameters
[in,out]rObjIDContainerThe object IDs found are returned to this list.
[in]rAllSetThe AllSet that is to provide the object ID.
[in]rsIndexNameThe index name of the index to be searched.
[in]ulIndexClassIDThe ID of the class indexed with the 'rsIndexName'. This allows you to use the index of a superclass.
[in]rsIndexSearchValueThe index value.
[in]eComparisionOpThe comparison operator. For example, if rsIndex has the value "123" and eComparisionOp has the value LESS, all objects with the index less than 123 are returned.
Returns
A return value < 0 indicates an error.
Note
Any placeholders '*' and '?' in the parameter rsIndexSearchValue are NOT taken into account.
The IndexName must be set in AllSet.
Indexes are only determined after opening the AllSet.

◆ getIndexedObjIdsFromAllSet() [2/6]

int glo::Base::getIndexedObjIdsFromAllSet ( std::vector< glo::ObjID > & rObjIDContainer,
const BaseAllSet & rAllSet,
const std::string & rsIndexName,
unsigned long ulIndexClassID,
const std::string & rsIndexSearchValue,
EnQueryType eQuerryType ) const

Returns a container of object IDs from the passed AllSet in relation to the passed parameters.

Parameters
[in,out]rObjIDContainerThe object IDs found are returned to this list.
[in]rAllSetThe AllSet that is to provide the object ID.
[in]rsIndexNameThe index name of the index to be searched.
[in]ulIndexClassIDThe ID of the class indexed with the 'rsIndexName'. This allows you to use the index of a superclass.
[in]rsIndexSearchValueThe index expression can contain the placeholders '*' and '?', which are taken into account in the evaluation or if parameter eQueryType == eOQL, the string is interpreted as OQL expression. Please note; OQL is not yet implemented!
[in]eQuerryTypeThe query type.
Returns
A return value < 0 indicates an error.
Note
The IndexName must be set in AllSet.
Indexes are only determined after opening the AllSet.

◆ getIndexedObjIdsFromAllSet() [3/6]

int glo::Base::getIndexedObjIdsFromAllSet ( std::vector< glo::ObjID > & rObjIDContainer,
const BaseAllSet & rAllSet,
const std::string & rsIndexName,
unsigned long ulIndexClassID,
const std::string & rsRangeStartIndexSearchValue,
const std::string & rsRangeEndIndexSearchValue ) const

Returns a container of object IDs from the passed AllSet in relation to the passed parameters. The result can be defined with a range specification. For example, if parameter rsRangeStartIndexSearchValue has the value "123" and parameter rsRangeEndIndexSearchValue has the value "155", only all objects with an index greater than/equal to 123 and less than/equal to 155 will be delivered.

Parameters
[in,out]rObjIDContainerThe object IDs found are returned to this list.
[in]rAllSetThe AllSet that is to provide the object ID.
[in]rsIndexNameThe index name of the index to be searched.
[in]ulIndexClassIDThe ID of the class indexed with the 'rsIndexName'. This allows you to use the index of a superclass.
[in]rsRangeStartIndexSearchValueThe start index value.
[in]rsRangeEndIndexSearchValueThe end index value.
Note
Any placeholders '*' and '?' in the parameter rsIndexSearchValue are NOT taken into account.
The IndexName must be set in AllSet.
Indexes are only determined after opening the AllSet.

◆ getIndexedObjIdsFromAllSet() [4/6]

int glo::Base::getIndexedObjIdsFromAllSet ( std::vector< glo::ObjID > & rObjIDContainer,
const BaseAllSet & rAllSet,
const std::string & rsIndexSearchValue,
EnComparisionOp eComparisionOp ) const

Returns a container of object IDs from the passed AllSet in relation to the passed parameters. The result can be defined using the parameter eComparisionOp. If e.g. parameter sIndex has the value "123" and parameter eComparisionOp has the value LESS, only all objects with the index lower than 123 will be delivered.

Parameters
[in,out]rObjIDContainerThe object IDs found are returned to this list.
[in]rAllSetThe AllSet that is to provide the object ID.
[in]rsIndexSearchValueThe index value.
[in]eComparisionOpThe comparison operator. For example, if rsIndex has the value "123" and eComparisionOp has the value LESS, all objects with the index less than 123 are returned.
Returns
A return value < 0 indicates an error.
Note
Any placeholders '*' and '?' in the parameter rsIndexSearchValue are NOT taken into account.
The IndexName must be set in AllSet.
Indexes are only determined after opening the AllSet.

◆ getIndexedObjIdsFromAllSet() [5/6]

int glo::Base::getIndexedObjIdsFromAllSet ( std::vector< glo::ObjID > & rObjIDContainer,
const BaseAllSet & rAllSet,
const std::string & rsIndexSearchValue,
EnQueryType eQuerryType ) const

Returns a container of object IDs from the passed AllSet in relation to the passed parameters.

Parameters
[in,out]rObjIDContainerThe object IDs found are returned to this list.
[in]rAllSetThe AllSet that is to provide the object ID.
[in]rsIndexSearchValueThe index expression can contain the placeholders '*' and '?', which are taken into account in the evaluation or if parameter eQueryType == eOQL, the string is interpreted as OQL expression. Please note; OQL is not yet implemented!
[in]eQuerryTypeThe query type.
Returns
A return value < 0 indicates an error.
Note
The IndexName must be set in AllSet.
Indexes are only determined after opening the AllSet.

◆ getIndexedObjIdsFromAllSet() [6/6]

int glo::Base::getIndexedObjIdsFromAllSet ( std::vector< glo::ObjID > & rObjIDContainer,
const BaseAllSet & rAllSet,
const std::string & rsRangeStartIndexSearchValue,
const std::string & rsRangeEndIndexSearchValue ) const

Returns a container of object IDs from the passed AllSet in relation to the passed parameters. The result can be defined with a range specification. For example, if parameter rsRangeStartIndexSearchValue has the value "123" and parameter rsRangeEndIndexSearchValue has the value "155", only all objects with an index greater than/equal to 123 and less than/equal to 155 will be delivered.

Parameters
[in,out]rObjIDContainerThe object IDs found are returned to this list.
[in]rAllSetThe AllSet that is to provide the object ID.
[in]rsRangeStartIndexSearchValueThe start index value.
[in]rsRangeEndIndexSearchValueThe end index value.
Note
Any placeholders '*' and '?' in the parameter rsIndexSearchValue are NOT taken into account.
The IndexName must be set in AllSet.
Indexes are only determined after opening the AllSet.

◆ getKnownSchemes()

int glo::Base::getKnownSchemes ( std::vector< std::string > & rRetVal)

Returns the names of the known databases.

Parameters
[in,out]rRetValThe names of the known databases.
Returns
A return value < 0 indicates an error.

◆ getLimits() [1/2]

int glo::Base::getLimits ( LimitRecord *& prLimitRecord,
const ClassInfoAttribute::Type & rClassInfoAttributeType ) const

Returns the limits of the passed ClassInfoAttribute::Type.

Parameters
[in,out]prLimitRecordThe limits of the passed ClassInfoAttribute::Type.
[in]rClassInfoAttributeTypeThe ClassInfoAttribute::Type
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.
The object delivered must be removed from memory by the calling instance.
Note
It is recommended, if possible, to consider using std::shared_ptr and to use the method getLimits(std::shared_ptr<LimitRecord>&, const ClassInfoAttribute::Type&)const.

◆ getLimits() [2/2]

int glo::Base::getLimits ( std::shared_ptr< LimitRecord > & rLimitRecord,
const ClassInfoAttribute::Type & rClassInfoAttributeType ) const

Returns the limits of the passed ClassInfoAttribute::Type.

Parameters
[in,out]rLimitRecordThe limits of the passed ClassInfoAttribute::Type in a std::shared_ptr.
[in]rClassInfoAttributeTypeThe ClassInfoAttribute::Type
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ getObjectFromAllSet()

int glo::Base::getObjectFromAllSet ( ObjID & rObjID,
BasePersistent *& prObject,
const BaseAllSet & rAllSet,
EnSeekMode eMode,
bool bGeneric = false ) const

Returns an object from the passed AllSet in relation to eMode.

Parameters
[in,out]rObjIDIn this object ID, the values are not set in case of an error.
[in,out]prObjectThe pointer to the fetched object. Can be nullptr despite a valid rObjID, e.g. if 'read locked'.
[in]rAllSetThe AllSet that is to supply the object ID.
[in]eModeThe seek mode.

Parameter examples:

Parameters
[in]bGenericIf false, an object of the type Persistent respectively a derived class from it is returned.
If true, a generic object of the type GenericPersistent is delivered.
Returns
A return < 0 indicates an error. A return == ERR_RANGE indicates the end of the AllSet.

◆ getObjectMaker()

ObjectMaker * glo::Base::getObjectMaker ( )
Returns
The pointer to the ObjectMaker.

◆ getObjIdFromAllSet()

int glo::Base::getObjIdFromAllSet ( ObjID & rObjID,
const BaseAllSet & rAllSet,
EnSeekMode eMode ) const

Returns an object ID from the passed AllSet in relation to eMode.

Parameters
[in,out]rObjIDIn this object ID, the values are not set in case of an error.
[in]rAllSetThe AllSet that is to supply the object ID.
[in]eModeThe seek mode.

Parameter examples:

Returns
A return < 0 indicates an error. A return == ERR_RANGE indicates the end of the AllSet.

◆ getPersObjectSpy()

PersObjectSpy * glo::Base::getPersObjectSpy ( )

Returns the pointers to the PersObjectSpy from its m_spPrivateBase

Returns
see above.
Attention
The calling instance must NOT modify or remove the returned object from memory. It only lives as long as this object respectively m_spPrivateBase.

◆ getPort()

int glo::Base::getPort ( unsigned int & ruiPort)

Returns the TCP port.

Parameters
[in,out]ruiPortThe TCP port.
Returns
A return value < 0 indicates an error.

◆ getPrivateBase()

std::shared_ptr< PrivateBase > glo::Base::getPrivateBase ( ) const
protected

Returns a pointer to the m_spPrivateBase

Returns
The pointer to the m_spPrivateBase; it only lives as long as this object.

◆ getProcessingPossibilities()

int glo::Base::getProcessingPossibilities ( const ObjID & rObjId,
LockPossibleSpecification & rLockPossibleSpecification,
EnDeepMode eDeepMode ) const

Returns the permitted options for the object with passed object ID in the database.

Parameters
[in]rObjIdThe object ID of the object to be checked.
[in,out]rLockPossibleSpecificationThe possibility response.
[in]eDeepModeThe depth mode to check.
Returns
A return value < 0 indicates an error.
See also
Check object for locks or access possibilities.

◆ getRecord() [1/2]

int glo::Base::getRecord ( Record *& prRecord,
const ObjID & rObjID,
unsigned long ulClassID ) const

Returns a record from the table of the object with passed object ID from the opened database.

Parameters
[in,out]prRecordThe pointer to the fetched record.
[in]rObjIDThe object ID.
[in]ulClassIDThe class ID from whose table is read.
Returns
A return value < 0 indicates an error.
Note
It is delivered directly from the database and not, if necessary, from the TransactionManager where a Record has already been changed and is just waiting for its commit.
However, if the object with the passed object ID is marked as deleted in the TransactionManager for the calling instance, no Record will be delivered.
Attention
The supplied object must be removed from memory by the calling instance using Record::forget().
Note
It is recommended, if possible, to consider using std::shared_ptr in conjunction with Forgetter and to use the method getRecord(std::shared_ptr<Record>&, const ObjID&, unsigned long)const.

◆ getRecord() [2/2]

int glo::Base::getRecord ( std::shared_ptr< Record > & rRecord,
const ObjID & rObjID,
unsigned long ulClassID ) const

Returns a record from the table of the object with passed object ID from the opened database.

Parameters
[in,out]rRecordThe pointer to the fetched record in a std::shared_ptr.
[in]rObjIDThe object ID.
[in]ulClassIDThe class ID from whose table is read.
Returns
A return value < 0 indicates an error.
Note
It is delivered directly from the database and not, if necessary, from the TransactionManager where a Record has already been changed and is just waiting for its commit.
However, if the object with the passed object ID is marked as deleted in the TransactionManager for the calling instance, no Record will be delivered.

◆ getRootClassInfo() [1/2]

int glo::Base::getRootClassInfo ( ClassInfo *& prRootClassInfo,
const std::string & rstrBaseName = "" ) const

Returns the class information of the 'top' class in the class hierarchy from the database with the passed name.

Parameters
[in,out]prRootClassInfoThe class information.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.
The object delivered must be removed from memory by the calling instance.
Note
It is recommended, if possible, to consider using std::shared_ptr and to use the method getRootClassInfo(std::shared_ptr<ClassInfo>&,const std::string&)const.

◆ getRootClassInfo() [2/2]

int glo::Base::getRootClassInfo ( std::shared_ptr< ClassInfo > & rRootClassInfo,
const std::string & rstrBaseName = "" ) const

Returns the class information of the 'top' class in the class hierarchy from the database with the passed name.

Parameters
[in,out]rRootClassInfoThe class information in a std::shared_ptr.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ getSchemaNameWithPath()

int glo::Base::getSchemaNameWithPath ( std::string & rstrRetVal)

Returns the complete file name of the underlying schema composed of directory path + the name of the database.

Parameters
[in,out]rstrRetValComplete file name (e.g. "C:/Path/MyGloBase.ini").
Returns
A return value < 0 indicates an error.

◆ getSchemaPath()

int glo::Base::getSchemaPath ( std::string & rstrRetVal)

Returns the directory path to the database.

Parameters
[in,out]rstrRetValThe directory path to the database.
Returns
A return value < 0 indicates an error.

◆ getServerName()

std::string glo::Base::getServerName ( ) const
Returns
The server name.

◆ getSizeFromAllSet()

int glo::Base::getSizeFromAllSet ( std::size_t & rnSize,
const BaseAllSet & rAllSet ) const

Returns the number of AllSet objects in the open database.

Parameters
[in]rnSizeThe number of objects of the AllSet.
[in]rAllSetThe AllSet whose number is to be delivered.
Returns
A return value < 0 indicates an error.

◆ getSubClassInfos() [1/2]

int glo::Base::getSubClassInfos ( std::map< unsigned long, ClassInfo *, std::less< unsigned long > > *& prSubClassInfoMap,
unsigned long ulClassID,
const std::string & rstrBaseName = "" ) const

Returns the class information of the direct subclasses of a class with passed class ID from the database with passed name.

Parameters
[in,out]prSubClassInfoMapThe container with the class information of the direct subclasses of the class with passed class ID.
[in]ulClassIDThe class ID.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.
The supplied object and its elements must be removed from memory by the calling instance.
Note
It is recommended, if possible, to consider using std::shared_ptr nd to use the method getSubClassInfos(std::map< unsigned, std::shared_ptr<ClassInfo>, std::less<unsigned long> >&, unsigned long, const std::string&)const.

◆ getSubClassInfos() [2/2]

int glo::Base::getSubClassInfos ( std::map< unsigned long, std::shared_ptr< ClassInfo >, std::less< unsigned long > > & rSubClassInfoMap,
unsigned long ulClassID,
const std::string & rstrBaseName = "" ) const

Returns the class information of the direct subclasses of a class with passed class ID from the database with passed name.

Parameters
[in,out]rSubClassInfoMapThe container with the class information of the direct subclasses of the class with passed class ID in std::shared_ptr.
[in]ulClassIDThe class ID.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ getSuperClassInfos() [1/2]

int glo::Base::getSuperClassInfos ( std::map< unsigned long, ClassInfo *, std::less< unsigned long > > *& prSuperClassInfoMap,
unsigned long ulClassID,
const std::string & rstrBaseName = "" ) const

Returns the class information of the direct superclass(es) of a class with passed class ID from the database with passed description.

Parameters
[in,out]prSuperClassInfoMapThe container with the class information of the direct superclass(es) of the class with passed class ID.
[in]ulClassIDThe class ID.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.
The supplied object and its elements must be removed from memory by the calling instance.
Note
It is recommended, if possible, to consider using std::shared_ptr and to use the method getSuperClassInfos(std::map< unsigned, std::shared_ptr<ClassInfo>, std::less<unsigned long> >&, unsigned long, const std::string&)const.

◆ getSuperClassInfos() [2/2]

int glo::Base::getSuperClassInfos ( std::map< unsigned long, std::shared_ptr< ClassInfo >, std::less< unsigned long > > & rBaseClassInfoMap,
unsigned long ulClassID,
const std::string & rstrBaseName = "" ) const

Returns the class information of the direct superclass(es) of a class with passed class ID from the database with passed description.

Parameters
[in,out]rBaseClassInfoMapThe container with the class information of the direct superclass(es) of the class with passed class ID in std::shared_ptr.
[in]ulClassIDThe class ID.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ getTimeOutSec()

int glo::Base::getTimeOutSec ( int & riTimeOutSec)

Returns the seconds of the general timeout.

Parameters
[in,out]riTimeOutSecThe general specification of the wait time in seconds.
Returns
A return value < 0 indicates an error.

◆ getTransactionLevel()

int glo::Base::getTransactionLevel ( ) const

Returns the transaction level (nesting depth).

◆ indexAvailable()

int glo::Base::indexAvailable ( const std::string & rsIndexName,
unsigned long ulClassID,
const std::string & rstrBaseName = "" ) const

Checks if there is a string index with passed index name for the class with passed class ID in the database with passed name.

Parameters
[in]rsIndexNameThe index name to be checked.
[in]ulClassIDThe class ID.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
If return == 0 the index does not exist. If return == 1 there is a corresponding string index. A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ isConnected()

bool glo::Base::isConnected ( ) const
Returns
Returns true if a connection to the Manager exists.
See also
Base::disconnect() and Base::connect(CallBack*).

◆ isInTransaction()

bool glo::Base::isInTransaction ( ) const

Returns true if at least one transaction has been started.

◆ isKnownClassID()

int glo::Base::isKnownClassID ( bool & rbRetVal,
unsigned long ulClassID,
const std::string & rstrBaseName = "" ) const

Checks if the passed class ID of this instance is known.

Parameters
[in,out]rbRetValIf true, the passed class ID of this instance is known.
[in]ulClassIDThe class ID to be checked.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ isLockedObject()

int glo::Base::isLockedObject ( const ObjID & rObjId,
EnLockMode eLockMode,
EnDeepMode eDeepMode ) const

Checks if object with passed object ID is locked in the database with the passed parameters.

Parameters
[in]rObjIdThe object ID of the object to be checked.
[in]eLockModeThe lock mode to be checked.
[in]eDeepModeThe lock depth mode to be checked.
Returns
A return value < 0 indicates an error.
See also
Check object for locks or access possibilities.

◆ isOpen()

bool glo::Base::isOpen ( ) const

Checks if the database is open.

Returns
If true, the database is open.

◆ isPossible()

int glo::Base::isPossible ( const ObjID & rObjId,
bool bRead,
bool bWrite,
bool bDelete,
EnDeepMode eDeepMode ) const

Checks whether the transferred actions with the object with transferred object ID are possible in the database or whether a concurrent lock exists.

Parameters
[in]rObjIdThe object ID of the object to be checked.
[in]bReadIf true, the read permission is checked.
[in]bWriteIf true, the write permission is checked.
[in]bDeleteIf true, a check is made for delete permissions.
[in]eDeepModeThe depth mode for which it is checked.
Returns
. If return == 0, the respective action is allowed. A return < 0 indicates an error.
See also
Check object for locks or access possibilities.

◆ isStoredObject()

int glo::Base::isStoredObject ( bool & rbRetVal,
BasePersistent * pObject ) const

Checks if the passed object is stored in the open database.

Parameters
[in,out]rbRetValIf true, the object is stored in the database.
[in]pObjectThe pointer to the object to be checked.
Returns
A return value < 0 indicates an error.

◆ isSuperClassFrom()

int glo::Base::isSuperClassFrom ( bool & rbRetVal,
unsigned long ulClassIDSuperClass,
unsigned long ulClassIDSubClass,
const std::string & rstrBaseName = "" ) const

Checks whether a class is a superclass of another class.

Parameters
[in,out]rbRetValIf true, ulClassIDSuperClass is a superclass of ulClassIDSubClass.
[in]ulClassIDSuperClassThe class ID of the superclass to be checked.
[in]ulClassIDSubClassThe class ID of the subclass to be checked.
[in]rstrBaseNameThe name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName.
Returns
A return value < 0 indicates an error.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ lockLot()

int glo::Base::lockLot ( const BaseLot & rObjIdLot,
EnLockMode eLockMode,
EnDeepMode eDeepMode ) const

The objects in the transferred container are locked in the database.

Parameters
[in]rObjIdLotThe container with the objects to be locked.
[in]eLockModeThe lock mode.
[in]eDeepModeThe lock depth mode.
Returns
A return value < 0 indicates an error.
Note
To unlock the lock, the corresponding method Base::unlockLot(const BaseLot&, EnLockMode, EnDeepMode) with the same parameter values must be used.
See also
Locking multiple persistent objects.

◆ lockObject()

int glo::Base::lockObject ( const ObjID & rObjId,
EnLockMode eLockMode,
EnDeepMode eDeepMode ) const

The object with the transferred object ID is locked in the database.

Parameters
[in]rObjIdThe object ID of the object to be locked.
[in]eLockModeThe lock mode.
[in]eDeepModeThe lock depth mode.
Returns
A return value < 0 indicates an error.
Note
To unlock the lock, the corresponding method Base::unlockObject(const ObjID&, EnLockMode, EnDeepMode) with the same parameter values must be used.
See also
Locking a persistent object.

◆ lockObjIdList()

int glo::Base::lockObjIdList ( std::list< ObjID > * pObjIDList,
EnLockMode eLockMode,
EnDeepMode eDeepMode ) const

The objects with transferred object IDs are locked in the database.

Parameters
[in]pObjIDListThe list with the object IDs of the objects to be locked.
[in]eLockModeThe lock mode.
[in]eDeepModeThe lock depth mode.
Returns
A return value < 0 indicates an error.
Note
To unlock the lock, the corresponding method Base::unlockObjIdList( std::list<ObjID>*, EnLockMode, EnDeepMode) with the same parameter values must be used.
See also
Locking multiple persistent objects.

◆ notifyAsWritten()

int glo::Base::notifyAsWritten ( const std::list< ObjID > & rObjIDList) const

When the objects with passed object IDs are watched, a notification is sent to all watching instances as if the objects were changed in the database.

Parameters
[in]rObjIDListThe list with the object IDs.
Returns
A return < 0 indicates an error.
Note
This method sends without waiting (fire and forget).
See also
Watch and notify.

◆ objIDInAllSet()

int glo::Base::objIDInAllSet ( const ObjID & rObjID,
const BaseAllSet & rAllSet ) const

Checks whether an object with a passed object ID in the passed AllSet exists in the opened database.

Parameters
[in]rObjIDThe object ID.
[in]rAllSetThe AllSet to be checked.
Returns
A return value < 0 indicates an error.

◆ open()

int glo::Base::open ( const std::string & rstrBaseName,
CallBack * pProgressNotificationCallBack = nullptr )

The database with the transferred name is opened for editing.

Parameters
[in]rstrBaseNameThe name of the database respectively schema.
[in]pProgressNotificationCallBackWhen a valid pointer to an object is passed, the progress of reading indexes is sent via a notification to the CallBack object (see also CallBack::notify(NotifyNote&) ).
Returns
A return value < 0 indicates an error.
Note
If a database is opened with this method, it must be closed again with the method Base::close(CallBack*).
Attention
Without previous connection (see Base::connect(CallBack*) ) the method fails.

◆ openAllSet()

int glo::Base::openAllSet ( BaseAllSet * pAllSet) const

Opens an AllSet in the open database. This allows an AllSet in the application to iterate through the AllSet in the database and fetch objects.

Parameters
[in,out]pAllSetThe AllSet. If generic (GenericAllSet) the class ID has must be set in it.
Returns
A return value < 0 indicates an error.

◆ openBase()

int glo::Base::openBase ( CallBack * pProgressNotificationCallBack = nullptr,
CallBack * pServerCrashNotificationCallBack = nullptr )

The database is opened. It connects implicitly to the database.

Parameters
[in]pProgressNotificationCallBackWhen a valid pointer to an object is passed, the progress of reading indexes is sent via a notification to the CallBack object (see also CallBack::notify(NotifyNote&) ).
[in]pServerCrashNotificationCallBackIf a valid pointer to a CallBack object is passed and a connection to a GloServer is to be established, a notification is sent to the CallBack object if the connection is lost (see also CallBack::notify(NotifyNote&) ).
Returns
A return value < 0 indicates an error.
Note
If a database is opened with this method, it must be closed again with the method Base::close(CallBack*).
Attention
Base must have been instantiated with a valid ObjCreator.

◆ openBaseComfortably()

int glo::Base::openBaseComfortably ( CallBack * pProgressNotificationCallBack = nullptr,
CallBack * pServerCrashNotificationCallBack = nullptr )

The database is opened. It connects implicitly to the database.
If index files are not available, they are created automatically.

Parameters
[in]pProgressNotificationCallBackWhen a valid pointer to an object is passed, the progress of reading indexes is sent via a notification to the CallBack object (see also CallBack::notify(NotifyNote&) ).
[in]pServerCrashNotificationCallBackIf a valid pointer to a CallBack object is passed and a connection to a GloServer is to be established, a notification is sent to the CallBack object if the connection is lost (see also CallBack::notify(NotifyNote&) ).
Returns
A return value < 0 indicates an error.
Note
If a database is opened with this method, it must be closed again with the method Base::close(CallBack*).
Attention
Base must have been instantiated with a valid ObjCreator.

◆ operator=()

Base & glo::Base::operator= ( const Base & )
private

The assignment operator is not available.

◆ reconnect()

int glo::Base::reconnect ( CallBack * pServerCrashNotificationCallBack = nullptr)

Terminates and re-establishes a connection to Manager.

Parameters
[in]pServerCrashNotificationCallBackIf a valid pointer to a CallBack object is passed and a connection to a GloServer is to be established, a notification is sent to the CallBack object if the connection is lost (see also CallBack::notify(NotifyNote&) ).
Returns
A return value < 0 indicates an error.
See also
Base::disconnect() and Base::connect(CallBack*).

◆ refreshObject()

int glo::Base::refreshObject ( BasePersistent * pObject) const

Refreshes the transferred object respectively its persistent attributes from the open database (reads in the current attribute data)

Parameters
[in,out]pObjectThe pointer to the object.
Returns
A return value < 0 indicates an error.
Note
If the object is in an unfinished transaction, the values are retrieved from the transaction.
See also
GlobalObjects Transaction.

◆ reindexBase() [1/2]

int glo::Base::reindexBase ( CallBack * pProgressNotificationCallBack = nullptr)

The database is reindexed with the name that was previously passed in a constructor or via Base::setBaseName (...).

Parameters
[in]pProgressNotificationCallBackIf a valid pointer to an object is passed, the progress of the reindexing is sent to the CallBack object via a notification (see also CallBack::notify(NotifyNote&) ).
Returns
A return value < 0 indicates an error.
Attention
The desired will only succeed if the database is not opened by any instance.
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ reindexBase() [2/2]

int glo::Base::reindexBase ( const std::string & rstrBaseName,
CallBack * pProgressNotificationCallBack = nullptr )

The database is reindexed with the transferred name.

Parameters
[in]rstrBaseNameThe name of the database whose indexes are newly should be written.
[in]pProgressNotificationCallBackIf a valid pointer to an object is passed the progress of the re-indexing via a notification to the CallBack object (see also CallBack::notify(NotifyNote&) ).
Returns
A return value < 0 indicates an error.
Attention
The desired result will only be achieved if the database is not accessed by any instance.
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ relockObject()

int glo::Base::relockObject ( const ObjID & rObjId,
EnLockMode eLockMode,
EnDeepMode eDeepMode ) const

The already locked object with the passed object ID is released in the database and immediately locked again, meaning that, depending on the locking mode, newly referenced objects are also locked, if possible, and previously locked referenced objects are released. If newly referenced objects cannot be locked, the previous locked state is retained.

Parameters
[in]rObjIdThe object ID of the object to be locked.
[in]eLockModeThe lock mode.
[in]eDeepModeThe lock depth mode.
Returns
A return value < 0 indicates an error.
Note
To renew the lock, the same parameter values must be used as for the original lock. To remove the lock, the corresponding method Base::unlock(EnLockMode, EnDeepMode) must be used with the same parameter values.
No action takes place if eDeepMode is glo::DM_NONE or glo::DM_FLAT.
See also
Locking a persistent object.

◆ removeIndexFilter()

int glo::Base::removeIndexFilter ( const BaseAllSet & rAllSet) const

Removes a filter that may have been set.

Parameters
[in]rAllSetThe AllSet whose index filter is removed.
Returns
A return value < 0 indicates an error.

◆ repairBase() [1/2]

int glo::Base::repairBase ( CallBack * pProgressNotificationCallBack = nullptr)
Attention
This method is not yet unlocked! The database is repaired with the name that was previously passed in a constructor or via Base::setBaseName (...). The following actions are performed:
  • For each class it is checked if all attribute directories exist and if not, they are created.
  • Each table is run through, and checks whether an object is entered in all other necessary tables. Chopped up objects are added to the4 tables where they are missing, with default values.
  • All unique indexes are checked for consistency. If an index entry occurs twice, it is changed so that it is unique.
  • All references are checked for the presence of an object. If a reference points to a non-existent object, the reference is set to nullptr or removed.
  • All repairs are entered into a log file.
Parameters
[in]pProgressNotificationCallBackIf a valid pointer to an object is passed the progress of the compression via a notification to the CallBack object (see also CallBack::notify(NotifyNote&) ).
Returns
A return value < 0 indicates an error.
Note
If finished without errors, the index has been rebuilt.
Attention
The desired will only succeed if the database is not opened by any instance.
Without previous connection (see also Base::connect(CallBack*) ) the method fails.

◆ repairBase() [2/2]

int glo::Base::repairBase ( const std::string & rstrBaseName,
CallBack * pProgressNotificationCallBack = nullptr )

The database with the transferred name is repaired. The following actions are performed:

  • For each class it is checked if all attribute directories exist and if not, they are created.
  • Each table is run through, and checks whether an object is entered in all other necessary tables. Chopped up objects are added to the4 tables where they are missing, with default values.
  • All unique indexes are checked for consistency. If an index entry occurs twice, it is changed so that it is unique.
  • All references are checked for the presence of an object. If a reference points to a non-existent object, the reference is set to nullptr or removed.
  • All repairs are entered into a log file.
Parameters
[in]rstrBaseNameThe name of the database to be repaired.
[in]pProgressNotificationCallBackIf a valid pointer to an object is passed the progress of the compression via a notification to the CallBack object (see also CallBack::notify(NotifyNote&) ).
Returns
A return value < 0 indicates an error.
Note
If finished without errors, the index has been rebuilt.
Attention
The desired will only succeed if the database is not opened by any instance.
Without previous connection (see also Base::connect() ) the method fails.

◆ rollBackTransaction()

int glo::Base::rollBackTransaction ( ) const

A transaction is aborted or rolled back.

The database actions of the current transaction stack up to the last Base::beginTransaction() are discarded.

Returns
A return < 0 indicates an error.
See also
description of the GlobalObjects Transaktion.
Base::beginTransaction() and Base::commitTransaction()

◆ setBaseName()

int glo::Base::setBaseName ( const std::string & rstrBaseName)

Sets the name of the database.

Parameters
[in]rstrBaseNameThe name of the schema respectively database.
Returns
A return value < 0 indicates an error, e.g. if already connected.

◆ setClientName()

int glo::Base::setClientName ( const std::string & rstrClientName)

Set a client name.

Parameters
[in]rstrClientNameThe client name.
Returns
A return value < 0 indicates an error, e.g. if already connected.

◆ setCurrentObjectInAllSet()

int glo::Base::setCurrentObjectInAllSet ( const ObjID & rObjID,
const BaseAllSet & rAllSet ) const

Sets the iterator of the AllSet in the opened database to the object that has the passed object ID.

Parameters
[in]rObjIDThe object ID.
[in]rAllSetThe AllSet whose iterator is to be set.
Returns
A return value < 0 indicates an error.

◆ setDbIniName()

int glo::Base::setDbIniName ( const std::string & rstrDbIniName)

As a rule, the settings are read from DB.ini. See GlobalObjects initialization file GlobalObjects "Initialization file" in the manual.
The settings file name can be overwritten using this method. But this only works if there is no connection to a database yet.

Parameters
[in]rstrDbIniNameThe name of the new initialization file; e.g. “MyDB.ini”.
Returns
A return value < 0 indicates an error.
See also

◆ setIndexFilter() [1/3]

int glo::Base::setIndexFilter ( const BaseAllSet & rAllSet,
const std::string & rsIndexFilter ) const

Sets a filter that controls the output of the passed AllSet in relation to the passed parameters.

Parameters
[in]rAllSetThe AllSet whose index filter is set.
[in]rsIndexFilterThe index filter can contain the placeholders '*' and '?', which are taken into account in the evaluation.
Returns
A return value < 0 indicates an error.
Note
The IndexName must be set in AllSet.
Indexes are only determined after opening the AllSet.

◆ setIndexFilter() [2/3]

int glo::Base::setIndexFilter ( const BaseAllSet & rAllSet,
const std::string & rsIndexFilter,
EnComparisionOp eComparisionOp ) const

Sets a filter that controls the output of the passed AllSet in relation to the passed parameters. The result can be defined using the parameter eComparisionOp. If e.g. parameter sIndex has the value "123" and parameter eComparisionOp has the value LESS, only all objects with the index lower than 123 will be delivered.

Parameters
[in]rAllSetThe AllSet whose index filter is set.
[in]rsIndexFilterThe index filter.
[in]eComparisionOpThe comparison operator. For example, if rsIndex has the value "123" and eComparisionOp has the value LESS, all objects with the index less than 123 are returned.
Returns
A return value < 0 indicates an error.
Note
Any placeholders '*' and '?' in the parameter rsIndexSearchValue are NOT taken into account.
The IndexName must be set in AllSet.
Indexes are only determined after opening the AllSet.

◆ setIndexFilter() [3/3]

int glo::Base::setIndexFilter ( const BaseAllSet & rAllSet,
const std::string & rsRangeStartIndexFilter,
const std::string & rsRangeEndIndexFilter ) const

Sets a filter that controls the output of the passed AllSet in relation to the passed parameters. The result can be defined with a range specification. For example, if parameter rsRangeStartIndexFilter has the value "123" and parameter rsRangeEndIndexFilter has the value "155", only all objects with an index greater than/equal to 123 and less than/equal to 155 will be delivered.

Parameters
[in]rAllSetThe AllSet whose index filter is set.
[in]rsRangeStartIndexFilterThe start index value.
[in]rsRangeEndIndexFilterThe end index value.
Returns
A return value < 0 indicates an error.
Note
Any placeholders '*' and '?' in the parameter rsIndexSearchValue are NOT taken into account.
The IndexName must be set in AllSet.
Indexes are only determined after opening the AllSet.

◆ setKnownSchemes()

int glo::Base::setKnownSchemes ( const std::string & rstrKnownSchemes)

Sets the names of the known databases (e.g. "Name1|Name2")

Parameters
[in]rstrKnownSchemesThe names of the known databases.
Returns
A return value < 0 indicates an error, e.g. if already connected.

◆ setPositionInAllSet()

int glo::Base::setPositionInAllSet ( std::size_t nPosition,
const BaseAllSet & rAllSet ) const

Sets the iterator of the AllSet in the opened database to the position passed.

Parameters
[in]nPositionThe desired position.
[in]rAllSetThe AllSet whose iterator is to be set.
Returns
A return value < 0 indicates an error.

◆ setSchemaPath()

int glo::Base::setSchemaPath ( const std::string & rstrSchemaPath)

Sets the directory path to the database.

Parameters
[in]rstrSchemaPathThe directory path to the database (e.g. "C:/Path/").
Returns
A return value < 0 indicates an error, e.g. if already connected.

◆ setWatchClass()

int glo::Base::setWatchClass ( unsigned long ulClassID,
TdWatchNotifyMode ulWatchMode,
CallBack * pCallBack ) const

The allset of the class with the passed class ID and all contained objects are monitored in the database.

Parameters
[in]ulClassIDThe class ID of the AllSet.
[in]ulWatchModeThe watch mode.
Allowed watch modes:
[in]pCallBackThe CallBack object that is notified via its method CallBack::notify(NotifyNote&).
Returns
A return value < 0 indicates an error.
Note
To remove the monitoring, the corresponding method unsetWatchClass(unsigned long, TdWatchNotifyMode, CallBack*) const with same parameter values should be used.
In principle, it is possible to cancel individual watching modes. Care should then be taken that all individual watching modes are also applied so that no watching remains in the memory until the program is terminated.
Attention
Basically pCallBack must not be destroyed before the monitoring has been cancelled.
See also
Watch and notify.

◆ setWatchClient()

int glo::Base::setWatchClient ( TdWatchNotifyMode ulWatchMode,
CallBack * pCallBack ) const

You can monitor the login and logout to the GloServer and the opening and closing of a database of clients.

Parameters
[in]ulWatchModeThe observation mode.
Allowed watch modes:
[in]pCallBackDas CallBack-Objekt, welches über seine Methode. CallBack::notify(NotifyNote&) benachrichtigt wird.
Returns
A return value < 0 indicates an error.
Note
To remove the monitoring, the corresponding method unsetWatchClient(TdWatchNotifyMode, CallBack*) const with same parameter values should be used.
In principle, it is possible to cancel individual watching modes. Care should then be taken that all individual watching modes are also applied so that no watching remains in the memory until the program is terminated.
Attention
Without previous connection (see also Base::connect(CallBack*) ) the method fails.
Basically pCallBack must not be destroyed before the monitoring has been reset!
See also
Watch and notify.

◆ setWatchIndex()

int glo::Base::setWatchIndex ( TdWatchNotifyMode ulWatchMode,
CallBack * pCallBack ) const

The reading respectively writing or reindexing of the indexes of the database is monitored.

Parameters
[in]ulWatchModeThe watch mode.
Allowed watch modes:
[in]pCallBackThe CallBack object that is notified via its method CallBack::notify(NotifyNote&).
Returns
A return value < 0 indicates an error.
Note
To remove the monitoring, the corresponding method unsetWatchIndex(TdWatchNotifyMode, CallBack*) const with same parameter values should be used.
In principle, it is possible to cancel individual watching modes. Care should then be taken that all individual watching modes are also applied so that no watching remains in the memory until the program is terminated.
Attention
Basically pCallBack must not be destroyed before the monitoring has been cancelled!
See also
Watch and notify.

◆ setWatchLot()

int glo::Base::setWatchLot ( const BaseLot & rObjIdLot,
TdWatchNotifyMode ulWatchMode,
EnDeepMode eDeepMode,
CallBack * pCallBack ) const

The objects in the transferred container are monitored in the database.

Parameters
[in]rObjIdLotThe container with the objects to be monitored.
[in]ulWatchModeThe watch mode.
Allowed watch modes:
[in]eDeepModeThe watching depth mode.
[in]pCallBackThe CallBack object that is notified via its method CallBack::notify(NotifyNote&).
Returns
A return value < 0 indicates an error.
Note
To remove the monitoring, the corresponding method unsetWatchSet(const BaseLot&, TdWatchNotifyMode, EnDeepMode, CallBack*) const with same parameter values should be used.
In principle, it is possible to cancel individual watching modes. Care should then be taken that all individual watching modes are also applied so that no watching remains in the memory until the program is terminated.
Attention
Basically pCallBack must not be destroyed before the monitoring has been cancelled.
See also
Watch and notify.

◆ setWatchObject()

int glo::Base::setWatchObject ( const ObjID & rObjId,
TdWatchNotifyMode ulWatchMode,
EnDeepMode eDeepMode,
CallBack * pCallBack ) const

The object with transferred object ID is monitored in the database.

Parameters
[in]rObjIdThe object ID of the object to be monitored.
[in]ulWatchModeThe watch mode.
Allowed watch modes:
[in]eDeepModeThe watching depth mode.
[in]pCallBackThe CallBack object that is notified via its method CallBack::notify(NotifyNote&).
Returns
A return value < 0 indicates an error.
Note
To remove the monitoring, the corresponding method unsetWatchObject(const ObjID&, TdWatchNotifyMode, EnDeepMode, CallBack*) const with same parameter values should be used.
In principle, it is possible to cancel individual watching modes. Care should then be taken that all individual watching modes are also applied so that no watching remains in the memory until the program is terminated.
Attention
Basically pCallBack must not be destroyed before the monitoring has been cancelled.
See also
Watch and notify.

◆ setWatchServer()

int glo::Base::setWatchServer ( CallBack * pCallBack) const

If there is a connection to a GloServer, an unforeseen disconnection is monitored.

Parameters
[in]pCallBackThe CallBack object that is notified via its method CallBack::notify(NotifyNote&).
Returns
A return value < 0 indicates an error.
Note
To cancel watching, a nullptr can be passed. Watching is automatically terminated on a Base::disconnect().
Attention
Basically pCallBack must not be destroyed before the monitoring has been cancelled!
See also
Watch and notify.

◆ storeObject()

int glo::Base::storeObject ( BasePersistent * pObject,
EnDeepMode eDeepMode ) const

Saves passed persistent object in the database.

Parameters
[in]pObjectA pointer to the object to be stored.
[in]eDeepModeThe storage depth mode.
Returns
A return value < 0 indicates an error.
Attention
The object to be stored must already be logged into the database (see Base::assignObject (...) ).

◆ unlockLot()

int glo::Base::unlockLot ( const BaseLot & rObjIdLot,
EnLockMode eLockMode,
EnDeepMode eDeepMode ) const

The objects in the transferred container are released again in the database after a lock. A lock release must be called with the same parameters as the previous lock.

Parameters
[in]rObjIdLotThe container with the objects to be released.
[in]eLockModeThe original lock mode.
[in]eDeepModeThe original lock depth mode.
Returns
A return < 0 indicates an error.
Note
Removes the lock initiated by the corresponding method Base::lockLot(const BaseLot&, EnLockMode, EnDeepMode) if the parameters have the same values.
See also
Locking multiple persistent objects.

◆ unlockObject()

int glo::Base::unlockObject ( const ObjID & rObjId,
EnLockMode eLockMode,
EnDeepMode eDeepMode ) const

The object with the transferred object ID is released again in the database after a lock. A lock release must be called with the same parameters as the previous lock.

Parameters
[in]rObjIdThe object ID of the object to be released.
[in]eLockModeThe original lock mode.
[in]eDeepModeThe original lock depth mode.
Returns
A return < 0 indicates an error.
Note
Removes the lock initiated by the corresponding method Base::lockObject(const ObjID&, EnLockMode, EnDeepMode) if the parameters have the same values.
See also
Locking a persistent object.

◆ unlockObjIdList()

int glo::Base::unlockObjIdList ( std::list< ObjID > * pObjIDList,
EnLockMode eLockMode,
EnDeepMode eDeepMode ) const

The objects with transferred object IDs are released again in the database after a lock. A lock release must be called with the same parameters as the previous lock.

Parameters
[in]pObjIDListThe list of object IDs of the objects to be released.
[in]eLockModeThe original lock mode.
[in]eDeepModeThe original lock depth mode.
Returns
A return < 0 indicates an error.
Note
Removes the lock initiated by the corresponding method Base::lockObjIdList(std::list<ObjID>*, EnLockMode, EnDeepMode) if the parameters have the same values.
See also
Locking multiple persistent objects.

◆ unsetWatchClass()

int glo::Base::unsetWatchClass ( unsigned long ulClassID,
TdWatchNotifyMode ulWatchMode,
CallBack * pCallBack ) const

Monitoring of the allset of the class with the passed class ID and all contained objects is terminated in the database. A monitoring termination should be called with the same parameters as the previous monitoring.

Parameters
[in]ulClassIDThe class ID of the AllSet.
[in]ulWatchModeThe original watch mode.
Allowed watch modes:
[in]pCallBackThe CallBack object, which should be notified via its method CallBack::notify(NotifyNote&).
Returns
A return value < 0 indicates an error.
Note
Clears the monitoring initiated by the corresponding method setWatchClass(unsigned long, TdWatchNotifyMode, CallBack*) const if the parameters have the same values.
In principle, it is possible to cancel individual watching modes. Care should then be taken that all individual watching modes are also applied so that no watching remains in the memory until the program is terminated.
See also
Watch and notify.

◆ unsetWatchClient()

int glo::Base::unsetWatchClient ( TdWatchNotifyMode ulWatchMode,
CallBack * pCallBack ) const

You can stop the monitoring the login and logout to the GloServer and opening and closing a database of a client. A monitoring termination should be called with the same parameters as the previous monitoring.

Parameters
[in]ulWatchModeThe original watch mode.
Allowed watch modes:
[in]pCallBackThe CallBack object, which should be notified via its method CallBack::notify(NotifyNote&).
Returns
A return value < 0 indicates an error.
Note
Clears the monitoring initiated by the corresponding method setWatchClient(TdWatchNotifyMode, CallBack*) const if the parameters have the same values.
In principle, it is possible to cancel individual watching modes. Care should then be taken that all individual watching modes are also applied so that no watching remains in the memory until the program is terminated.
See also
Watch and notify.

◆ unsetWatchIndex()

int glo::Base::unsetWatchIndex ( TdWatchNotifyMode ulWatchMode,
CallBack * pCallBack ) const

The monitoring of reading respectively writing or reindexing the indexes of the database is terminated. A monitoring termination should be called with the same parameters as the previous monitoring.

Parameters
[in]ulWatchModeThe original watch mode.
Allowed watch modes:
[in]pCallBackThe CallBack object, which should be notified via its method CallBack::notify(NotifyNote&).
Returns
A return value < 0 indicates an error.
Note
Clears the monitoring initiated by the corresponding method setWatchIndex(TdWatchNotifyMode, CallBack*) const if the parameters have the same values.
In principle, it is possible to cancel individual watching modes. Care should then be taken that all individual watching modes are also applied so that no watching remains in the memory until the program is terminated.
See also
Watch and notify.

◆ unsetWatchLot()

int glo::Base::unsetWatchLot ( const BaseLot & rObjIdLot,
TdWatchNotifyMode ulWatchMode,
EnDeepMode eDeepMode,
CallBack * pCallBack ) const

The monitoring of the objects in the transferred container is terminated in the database. A monitoring termination should be called with the same parameters as the previous monitoring.

Parameters
[in]rObjIdLotThe container with the monitored objects.
[in]ulWatchModeThe original watch mode.
Allowed watch modes:
[in]eDeepModeThe original watching depth mode.
[in]pCallBackThe CallBack object, which should be notified via its method CallBack::notify(NotifyNote&).
Returns
A return value < 0 indicates an error.
Note
Clears the monitoring initiated by the corresponding method setWatchLot(const BaseLot&, TdWatchNotifyMode, EnDeepMode, CallBack*) const if the parameters have the same values.
In principle, it is possible to cancel individual watching modes. Care should then be taken that all individual watching modes are also applied so that no watching remains in the memory until the program is terminated.
See also
Watch and notify.

◆ unsetWatchObject()

int glo::Base::unsetWatchObject ( const ObjID & rObjId,
TdWatchNotifyMode ulWatchMode,
EnDeepMode eDeepMode,
CallBack * pCallBack ) const

The monitoring of the object with passed object ID is terminated in the database. A monitoring termination should be called with the same parameters as the previous monitoring.

Parameters
[in]rObjIdThe object ID of the monitored object.
[in]ulWatchModeThe original watch mode.
Allowed watch modes:
[in]eDeepModeThe original watching depth mode.
[in]pCallBackThe CallBack object, which should be notified via its method CallBack::notify(NotifyNote&).
Returns
A return value < 0 indicates an error.
Note
Clears the monitoring initiated by the corresponding method setWatchObject(const ObjID&, TdWatchNotifyMode, EnDeepMode, CallBack*) const if the parameters have the same values.
In principle, it is possible to cancel individual watching modes. Care should then be taken that all individual watching modes are also applied so that no watching remains in the memory until the program is terminated.
See also
Watch and notify.

Friends And Related Symbol Documentation

◆ EmbeddedRecordAttribute

friend class EmbeddedRecordAttribute
friend

◆ ObjectMaker

friend class ObjectMaker
friend

◆ Persistent

friend class Persistent
friend

Member Data Documentation

◆ m_LocalCriticalSection

eut::CriticalSection glo::Base::m_LocalCriticalSection
private

So that several threads can access the methods of this class without a collision, the access is synchronized with this CriticalSection.

◆ m_pOpenedDatabases

OpenedDatabases* glo::Base::m_pOpenedDatabases
private

Here all databases log in when opened and log out again automatically when closed.

◆ m_spPrivateBase

std::shared_ptr<PrivateBase> glo::Base::m_spPrivateBase
private

The class in the background with the non-public functions.


The documentation for this class was generated from the following file: