GlobalObjects
|
#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 |
GenPersObjectSpy * | getGenPersObjectSpy () |
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 |
ObjectMaker * | getObjectMaker () |
int | getObjIdFromAllSet (ObjID &rObjID, const BaseAllSet &rAllSet, EnSeekMode eMode) const |
PersObjectSpy * | getPersObjectSpy () |
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< PrivateBase > | getPrivateBase () const |
Private Member Functions | |
Base (const Base &) | |
Base & | operator= (const Base &) |
Private Attributes | |
eut::CriticalSection | m_LocalCriticalSection |
OpenedDatabases * | m_pOpenedDatabases |
std::shared_ptr< PrivateBase > | m_spPrivateBase |
Friends | |
class | EmbeddedRecordAttribute |
class | ObjectMaker |
class | Persistent |
glo::Base::Base | ( | ) |
The standard constructor instantiates an object of this class in "LOCAL" mode, i.e. in single-user mode on the database.
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.
[in] | rstrClientName | The client name can be passed. |
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.
[in] | rstrClientName | The client name can be passed here. |
[in] | rstrSchemaPath | The directory path to the database is mandatory (e.g. "C:/Path/"). |
[in] | rstrBaseName | The name of the schema respectively database is mandatory. |
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 (...) ).
[in] | rstrClientName | The client name can be passed. |
[in] | rObjCreator | Reference to a valid ObjCreator (which knows the persistent classes and the database). |
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 *) )
[in] | rstrServerName | The server name or IP address is mandatory. If "LOCAL" is passed as server, the system operates in single user mode. |
[in] | rstrClientName | The client name can be passed. |
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.
[in] | rstrServerName | The 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] | rstrClientName | The client name can be passed. |
[in] | iTimeOutSec | The waiting time in seconds is mandatory. |
[in] | uiPort | The port (only mandatory for server operation!). |
[in] | rstrSchemaPath | The directory path to the database (e.g. "C:/Path/") is only mandatory for single user operation. |
[in] | rstrKnownSchemes | The names of the known database (e.g. "Name1|Name2") are only mandatory for single user operation. |
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.
[in] | rstrServerName | The 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] | rstrClientName | The client name can be passed. |
[in] | rObjCreator | Reference to a valid ObjCreator (which knows the persistent classes and the database). |
|
virtual |
Destructor, cleaning up. If the database is open, it will be closed first to write the indexes.
|
private |
The copy constructor is not available.
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.
int glo::Base::assignObject | ( | BasePersistent * | pObject | ) | const |
Registriert das übertragene Objekt in der geöffneten Datenbank. Dem Objekt wird eine Objekt-ID zugewiesen.
[in,out] | pObject | Zeiger auf das zu registrierende persistente Objekt. |
int glo::Base::beginTransaction | ( | ) | const |
A transaction is started. Database actions are not processed immediately, but end up on a transaction stack.
int glo::Base::close | ( | CallBack * | pProgressNotificationCallBack = nullptr | ) |
The open database is closed.
[in] | pProgressNotificationCallBack | When 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&) ). |
int glo::Base::closeAllSet | ( | BaseAllSet * | pAllSet | ) | const |
Closes an AllSet in the open database.
[in,out] | pAllSet | The AllSet. |
int glo::Base::closeBase | ( | CallBack * | pProgressNotificationCallBack = nullptr | ) |
The open database is closed.
The connection to the database is implicitly terminated.
[in] | pProgressNotificationCallBack | When 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&) ). |
int glo::Base::commitTransaction | ( | ) | const |
A transaction is confirmed. The database actions of the current transaction stack are processed.
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.
[in] | pProgressNotificationCallBack | If 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&) ). |
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.
[in] | rstrBaseName | The name of the database which compresses should be. |
[in] | pProgressNotificationCallBack | If 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&) ). |
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.
[in] | pServerCrashNotificationCallBack | If 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&) ). |
int glo::Base::deleteObject | ( | BasePersistent * | pObject, |
EnDeepMode | eDeepMode ) const |
Deletes passed persistent object in the database.
[in] | pObject | A pointer to the object to be deleted. |
[in] | eDeepMode | The delete depth mode. |
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.
[in] | rObjectIDs | Container with the object IDs of the objects to be deleted. |
[in] | eDeepMode | The delete depth mode. |
int glo::Base::disconnect | ( | ) |
Terminates a connection to Manager.
int glo::Base::getAllBases | ( | std::vector< std::string > *& | prRetValVector | ) | const |
Returns all names of known databases via Manager.
[in,out] | prRetValVector | The names of the known databases. |
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.
[in,out] | prAllClassInfoMap | The container with all class information. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
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.
[in,out] | rAllClassInfoMap | The container with all class information in std::shared_ptr. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
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.
[in,out] | prClientInfoVector | The ClientInfo's of the clients, which have opened the database with the given name. |
[in] | rstrBaseName | If the name of the database is not an empty string, the clients are delivered, which are connected to the database. |
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.
[in,out] | prSubClassInfoMap | The container with the class information of all subclasses of the class with passed class ID. |
[in] | ulClassID | The class ID. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
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.
[in,out] | rSubClassInfoMap | The container with the class information of all subclasses of the class with passed class ID in std::shared_ptr. |
[in] | ulClassID | The class ID. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
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.
[in,out] | prSuperClassInfoMap | The container with the class information of all superclasses of the class with passed class ID. |
[in] | ulClassID | The class ID. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
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.
[in,out] | rBaseClassInfoMap | The container with the class information of all superclasses of the class with passed class ID in std::shared_ptr. |
[in] | ulClassID | The class ID. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
int glo::Base::getAnObject | ( | BasePersistent *& | prObject, |
const ObjID & | rObjID, | ||
bool | bGeneric = false ) const |
Returns an object with passed object ID from the opened database.
[in,out] | prObject | The pointer to the fetched object. |
[in] | rObjID | The object ID. |
[in] | bGeneric | If false, an object of type Persistent or derived from it is returned. If true, a generic object of the type GenericPersistent is delivered. |
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.
[in,out] | rObject | The pointer to the fetched object in a std::shared_ptr. |
[in] | rObjID | The object ID. |
[in] | bGeneric | If false, an object of type Persistent or derived from it is returned. If true, a generic object of the type GenericPersistent is delivered. |
int glo::Base::getBaseCount | ( | std::vector< std::string >::size_type & | rBaseCount | ) | const |
Returns the number of known databases via Manager.
[in,out] | rBaseCount | The number of known databases. |
unsigned long glo::Base::getBaseID | ( | ) | const |
Returns the database ID.
std::string glo::Base::getBaseName | ( | ) | const |
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.
[in,out] | prClassInfo | The class information. |
[in] | rstrClassName | The class name. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
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.
[in,out] | prClassInfo | The class information. |
[in] | ulClassID | The class ID. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
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.
[in,out] | rRetVal | The class information in a std::shared_ptr. |
[in] | rstrClassName | The class name. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
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.
[in,out] | rRetVal | The class information in a std::shared_ptr. |
[in] | ulClassID | The class ID. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
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.
[in,out] | rClassInfoCount | The number of class information. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
std::string glo::Base::getClientName | ( | ) | const |
Returns a client name if set.
unsigned int glo::Base::getCommunicatorID | ( | ) | const |
std::string glo::Base::getDbIniName | ( | ) | const |
Returns the name of the initialization file.
int glo::Base::getDefaultLimits | ( | std::vector< LimitRecord > *& | prRetValVector | ) | const |
Returns the default limitations of the database.
[in,out] | prRetValVector | All limits of the database. |
GenPersObjectSpy * glo::Base::getGenPersObjectSpy | ( | ) |
Returns the pointers to the GenPersObjectSpy from its m_spPrivateBase
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.
[in,out] | rObjIDContainer | The object IDs found are returned to this list. |
[in] | rAllSet | The AllSet that is to provide the object ID. |
[in] | rsIndexName | The index name of the index to be searched. |
[in] | ulIndexClassID | The ID of the class indexed with the 'rsIndexName'. This allows you to use the index of a superclass. |
[in] | rsIndexSearchValue | The index value. |
[in] | eComparisionOp | The 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. |
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.
[in,out] | rObjIDContainer | The object IDs found are returned to this list. |
[in] | rAllSet | The AllSet that is to provide the object ID. |
[in] | rsIndexName | The index name of the index to be searched. |
[in] | ulIndexClassID | The ID of the class indexed with the 'rsIndexName'. This allows you to use the index of a superclass. |
[in] | rsIndexSearchValue | The 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] | eQuerryType | The query type. |
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.
[in,out] | rObjIDContainer | The object IDs found are returned to this list. |
[in] | rAllSet | The AllSet that is to provide the object ID. |
[in] | rsIndexName | The index name of the index to be searched. |
[in] | ulIndexClassID | The ID of the class indexed with the 'rsIndexName'. This allows you to use the index of a superclass. |
[in] | rsRangeStartIndexSearchValue | The start index value. |
[in] | rsRangeEndIndexSearchValue | The end index value. |
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.
[in,out] | rObjIDContainer | The object IDs found are returned to this list. |
[in] | rAllSet | The AllSet that is to provide the object ID. |
[in] | rsIndexSearchValue | The index value. |
[in] | eComparisionOp | The 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. |
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.
[in,out] | rObjIDContainer | The object IDs found are returned to this list. |
[in] | rAllSet | The AllSet that is to provide the object ID. |
[in] | rsIndexSearchValue | The 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] | eQuerryType | The query type. |
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.
[in,out] | rObjIDContainer | The object IDs found are returned to this list. |
[in] | rAllSet | The AllSet that is to provide the object ID. |
[in] | rsRangeStartIndexSearchValue | The start index value. |
[in] | rsRangeEndIndexSearchValue | The end index value. |
int glo::Base::getKnownSchemes | ( | std::vector< std::string > & | rRetVal | ) |
Returns the names of the known databases.
[in,out] | rRetVal | The names of the known databases. |
int glo::Base::getLimits | ( | LimitRecord *& | prLimitRecord, |
const ClassInfoAttribute::Type & | rClassInfoAttributeType ) const |
Returns the limits of the passed ClassInfoAttribute::Type.
[in,out] | prLimitRecord | The limits of the passed ClassInfoAttribute::Type. |
[in] | rClassInfoAttributeType | The ClassInfoAttribute::Type |
int glo::Base::getLimits | ( | std::shared_ptr< LimitRecord > & | rLimitRecord, |
const ClassInfoAttribute::Type & | rClassInfoAttributeType ) const |
Returns the limits of the passed ClassInfoAttribute::Type.
[in,out] | rLimitRecord | The limits of the passed ClassInfoAttribute::Type in a std::shared_ptr. |
[in] | rClassInfoAttributeType | The ClassInfoAttribute::Type |
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.
[in,out] | rObjID | In this object ID, the values are not set in case of an error. |
[in,out] | prObject | The pointer to the fetched object. Can be nullptr despite a valid rObjID, e.g. if 'read locked'. |
[in] | rAllSet | The AllSet that is to supply the object ID. |
[in] | eMode | The seek mode. |
Parameter examples:
[in] | bGeneric | If 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. |
ObjectMaker * glo::Base::getObjectMaker | ( | ) |
int glo::Base::getObjIdFromAllSet | ( | ObjID & | rObjID, |
const BaseAllSet & | rAllSet, | ||
EnSeekMode | eMode ) const |
Returns an object ID from the passed AllSet in relation to eMode.
[in,out] | rObjID | In this object ID, the values are not set in case of an error. |
[in] | rAllSet | The AllSet that is to supply the object ID. |
[in] | eMode | The seek mode. |
Parameter examples:
PersObjectSpy * glo::Base::getPersObjectSpy | ( | ) |
Returns the pointers to the PersObjectSpy from its m_spPrivateBase
int glo::Base::getPort | ( | unsigned int & | ruiPort | ) |
Returns the TCP port.
[in,out] | ruiPort | The TCP port. |
|
protected |
Returns a pointer to the m_spPrivateBase
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.
[in] | rObjId | The object ID of the object to be checked. |
[in,out] | rLockPossibleSpecification | The possibility response. |
[in] | eDeepMode | The depth mode to check. |
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.
[in,out] | prRecord | The pointer to the fetched record. |
[in] | rObjID | The object ID. |
[in] | ulClassID | The class ID from whose table is read. |
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.
[in,out] | rRecord | The pointer to the fetched record in a std::shared_ptr. |
[in] | rObjID | The object ID. |
[in] | ulClassID | The class ID from whose table is read. |
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.
[in,out] | prRootClassInfo | The class information. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
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.
[in,out] | rRootClassInfo | The class information in a std::shared_ptr. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
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.
[in,out] | rstrRetVal | Complete file name (e.g. "C:/Path/MyGloBase.ini"). |
int glo::Base::getSchemaPath | ( | std::string & | rstrRetVal | ) |
Returns the directory path to the database.
[in,out] | rstrRetVal | The directory path to the database. |
std::string glo::Base::getServerName | ( | ) | const |
int glo::Base::getSizeFromAllSet | ( | std::size_t & | rnSize, |
const BaseAllSet & | rAllSet ) const |
Returns the number of AllSet objects in the open database.
[in] | rnSize | The number of objects of the AllSet. |
[in] | rAllSet | The AllSet whose number is to be delivered. |
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.
[in,out] | prSubClassInfoMap | The container with the class information of the direct subclasses of the class with passed class ID. |
[in] | ulClassID | The class ID. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
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.
[in,out] | rSubClassInfoMap | The container with the class information of the direct subclasses of the class with passed class ID in std::shared_ptr. |
[in] | ulClassID | The class ID. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
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.
[in,out] | prSuperClassInfoMap | The container with the class information of the direct superclass(es) of the class with passed class ID. |
[in] | ulClassID | The class ID. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
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.
[in,out] | rBaseClassInfoMap | The container with the class information of the direct superclass(es) of the class with passed class ID in std::shared_ptr. |
[in] | ulClassID | The class ID. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
int glo::Base::getTimeOutSec | ( | int & | riTimeOutSec | ) |
Returns the seconds of the general timeout.
[in,out] | riTimeOutSec | The general specification of the wait time in seconds. |
int glo::Base::getTransactionLevel | ( | ) | const |
Returns the transaction level (nesting depth).
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.
[in] | rsIndexName | The index name to be checked. |
[in] | ulClassID | The class ID. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
bool glo::Base::isConnected | ( | ) | const |
bool glo::Base::isInTransaction | ( | ) | const |
Returns true if at least one transaction has been started.
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.
[in,out] | rbRetVal | If true, the passed class ID of this instance is known. |
[in] | ulClassID | The class ID to be checked. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
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.
[in] | rObjId | The object ID of the object to be checked. |
[in] | eLockMode | The lock mode to be checked. |
[in] | eDeepMode | The lock depth mode to be checked. |
bool glo::Base::isOpen | ( | ) | const |
Checks if the database is open.
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.
[in] | rObjId | The object ID of the object to be checked. |
[in] | bRead | If true, the read permission is checked. |
[in] | bWrite | If true, the write permission is checked. |
[in] | bDelete | If true, a check is made for delete permissions. |
[in] | eDeepMode | The depth mode for which it is checked. |
int glo::Base::isStoredObject | ( | bool & | rbRetVal, |
BasePersistent * | pObject ) const |
Checks if the passed object is stored in the open database.
[in,out] | rbRetVal | If true, the object is stored in the database. |
[in] | pObject | The pointer to the object to be checked. |
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.
[in,out] | rbRetVal | If true, ulClassIDSuperClass is a superclass of ulClassIDSubClass. |
[in] | ulClassIDSuperClass | The class ID of the superclass to be checked. |
[in] | ulClassIDSubClass | The class ID of the subclass to be checked. |
[in] | rstrBaseName | The name of the database respectively schema. If no name is passed, the value is taken from PrivateBase::m_strBaseName. |
int glo::Base::lockLot | ( | const BaseLot & | rObjIdLot, |
EnLockMode | eLockMode, | ||
EnDeepMode | eDeepMode ) const |
The objects in the transferred container are locked in the database.
[in] | rObjIdLot | The container with the objects to be locked. |
[in] | eLockMode | The lock mode. |
[in] | eDeepMode | The lock depth mode. |
int glo::Base::lockObject | ( | const ObjID & | rObjId, |
EnLockMode | eLockMode, | ||
EnDeepMode | eDeepMode ) const |
The object with the transferred object ID is locked in the database.
[in] | rObjId | The object ID of the object to be locked. |
[in] | eLockMode | The lock mode. |
[in] | eDeepMode | The lock depth mode. |
int glo::Base::lockObjIdList | ( | std::list< ObjID > * | pObjIDList, |
EnLockMode | eLockMode, | ||
EnDeepMode | eDeepMode ) const |
The objects with transferred object IDs are locked in the database.
[in] | pObjIDList | The list with the object IDs of the objects to be locked. |
[in] | eLockMode | The lock mode. |
[in] | eDeepMode | The lock depth mode. |
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.
[in] | rObjIDList | The list with the object IDs. |
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.
[in] | rObjID | The object ID. |
[in] | rAllSet | The AllSet to be checked. |
int glo::Base::open | ( | const std::string & | rstrBaseName, |
CallBack * | pProgressNotificationCallBack = nullptr ) |
The database with the transferred name is opened for editing.
[in] | rstrBaseName | The name of the database respectively schema. |
[in] | pProgressNotificationCallBack | When 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&) ). |
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.
[in,out] | pAllSet | The AllSet. If generic (GenericAllSet) the class ID has must be set in it. |
int glo::Base::openBase | ( | CallBack * | pProgressNotificationCallBack = nullptr, |
CallBack * | pServerCrashNotificationCallBack = nullptr ) |
The database is opened. It connects implicitly to the database.
[in] | pProgressNotificationCallBack | When 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] | pServerCrashNotificationCallBack | If 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&) ). |
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.
[in] | pProgressNotificationCallBack | When 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] | pServerCrashNotificationCallBack | If 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&) ). |
int glo::Base::reconnect | ( | CallBack * | pServerCrashNotificationCallBack = nullptr | ) |
Terminates and re-establishes a connection to Manager.
[in] | pServerCrashNotificationCallBack | If 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&) ). |
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)
[in,out] | pObject | The pointer to the object. |
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 (...).
[in] | pProgressNotificationCallBack | If 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&) ). |
int glo::Base::reindexBase | ( | const std::string & | rstrBaseName, |
CallBack * | pProgressNotificationCallBack = nullptr ) |
The database is reindexed with the transferred name.
[in] | rstrBaseName | The name of the database whose indexes are newly should be written. |
[in] | pProgressNotificationCallBack | If 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&) ). |
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.
[in] | rObjId | The object ID of the object to be locked. |
[in] | eLockMode | The lock mode. |
[in] | eDeepMode | The lock depth mode. |
int glo::Base::removeIndexFilter | ( | const BaseAllSet & | rAllSet | ) | const |
Removes a filter that may have been set.
[in] | rAllSet | The AllSet whose index filter is removed. |
int glo::Base::repairBase | ( | CallBack * | pProgressNotificationCallBack = nullptr | ) |
[in] | pProgressNotificationCallBack | If 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&) ). |
int glo::Base::repairBase | ( | const std::string & | rstrBaseName, |
CallBack * | pProgressNotificationCallBack = nullptr ) |
The database with the transferred name is repaired. The following actions are performed:
[in] | rstrBaseName | The name of the database to be repaired. |
[in] | pProgressNotificationCallBack | If 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&) ). |
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.
int glo::Base::setBaseName | ( | const std::string & | rstrBaseName | ) |
Sets the name of the database.
[in] | rstrBaseName | The name of the schema respectively database. |
int glo::Base::setClientName | ( | const std::string & | rstrClientName | ) |
Set a client name.
[in] | rstrClientName | The client name. |
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.
[in] | rObjID | The object ID. |
[in] | rAllSet | The AllSet whose iterator is to be set. |
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.
[in] | rstrDbIniName | The name of the new initialization file; e.g. “MyDB.ini”. |
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.
[in] | rAllSet | The AllSet whose index filter is set. |
[in] | rsIndexFilter | The index filter can contain the placeholders '*' and '?', which are taken into account in the evaluation. |
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.
[in] | rAllSet | The AllSet whose index filter is set. |
[in] | rsIndexFilter | The index filter. |
[in] | eComparisionOp | The 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. |
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.
[in] | rAllSet | The AllSet whose index filter is set. |
[in] | rsRangeStartIndexFilter | The start index value. |
[in] | rsRangeEndIndexFilter | The end index value. |
int glo::Base::setKnownSchemes | ( | const std::string & | rstrKnownSchemes | ) |
Sets the names of the known databases (e.g. "Name1|Name2")
[in] | rstrKnownSchemes | The names of the known databases. |
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.
[in] | nPosition | The desired position. |
[in] | rAllSet | The AllSet whose iterator is to be set. |
int glo::Base::setSchemaPath | ( | const std::string & | rstrSchemaPath | ) |
Sets the directory path to the database.
[in] | rstrSchemaPath | The directory path to the database (e.g. "C:/Path/"). |
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.
[in] | ulClassID | The class ID of the AllSet. |
[in] | ulWatchMode | The watch mode. Allowed watch modes:
|
[in] | pCallBack | The CallBack object that is notified via its method CallBack::notify(NotifyNote&). |
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.
[in] | ulWatchMode | The observation mode. Allowed watch modes:
|
[in] | pCallBack | Das CallBack-Objekt, welches über seine Methode. CallBack::notify(NotifyNote&) benachrichtigt wird. |
int glo::Base::setWatchIndex | ( | TdWatchNotifyMode | ulWatchMode, |
CallBack * | pCallBack ) const |
The reading respectively writing or reindexing of the indexes of the database is monitored.
[in] | ulWatchMode | The watch mode. Allowed watch modes:
|
[in] | pCallBack | The CallBack object that is notified via its method CallBack::notify(NotifyNote&). |
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.
[in] | rObjIdLot | The container with the objects to be monitored. |
[in] | ulWatchMode | The watch mode. Allowed watch modes:
|
[in] | eDeepMode | The watching depth mode. |
[in] | pCallBack | The CallBack object that is notified via its method CallBack::notify(NotifyNote&). |
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.
[in] | rObjId | The object ID of the object to be monitored. |
[in] | ulWatchMode | The watch mode. Allowed watch modes:
|
[in] | eDeepMode | The watching depth mode. |
[in] | pCallBack | The CallBack object that is notified via its method CallBack::notify(NotifyNote&). |
int glo::Base::setWatchServer | ( | CallBack * | pCallBack | ) | const |
If there is a connection to a GloServer, an unforeseen disconnection is monitored.
[in] | pCallBack | The CallBack object that is notified via its method CallBack::notify(NotifyNote&). |
int glo::Base::storeObject | ( | BasePersistent * | pObject, |
EnDeepMode | eDeepMode ) const |
Saves passed persistent object in the database.
[in] | pObject | A pointer to the object to be stored. |
[in] | eDeepMode | The storage depth mode. |
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.
[in] | rObjIdLot | The container with the objects to be released. |
[in] | eLockMode | The original lock mode. |
[in] | eDeepMode | The original lock depth mode. |
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.
[in] | rObjId | The object ID of the object to be released. |
[in] | eLockMode | The original lock mode. |
[in] | eDeepMode | The original lock depth mode. |
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.
[in] | pObjIDList | The list of object IDs of the objects to be released. |
[in] | eLockMode | The original lock mode. |
[in] | eDeepMode | The original lock depth mode. |
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.
[in] | ulClassID | The class ID of the AllSet. |
[in] | ulWatchMode | The original watch mode. Allowed watch modes:
|
[in] | pCallBack | The CallBack object, which should be notified via its method CallBack::notify(NotifyNote&). |
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.
[in] | ulWatchMode | The original watch mode. Allowed watch modes:
|
[in] | pCallBack | The CallBack object, which should be notified via its method CallBack::notify(NotifyNote&). |
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.
[in] | ulWatchMode | The original watch mode. Allowed watch modes:
|
[in] | pCallBack | The CallBack object, which should be notified via its method CallBack::notify(NotifyNote&). |
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.
[in] | rObjIdLot | The container with the monitored objects. |
[in] | ulWatchMode | The original watch mode. Allowed watch modes:
|
[in] | eDeepMode | The original watching depth mode. |
[in] | pCallBack | The CallBack object, which should be notified via its method CallBack::notify(NotifyNote&). |
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.
[in] | rObjId | The object ID of the monitored object. |
[in] | ulWatchMode | The original watch mode. Allowed watch modes:
|
[in] | eDeepMode | The original watching depth mode. |
[in] | pCallBack | The CallBack object, which should be notified via its method CallBack::notify(NotifyNote&). |
|
friend |
|
friend |
|
friend |
|
private |
So that several threads can access the methods of this class without a collision, the access is synchronized with this CriticalSection.
|
private |
Here all databases log in when opened and log out again automatically when closed.
|
private |
The class in the background with the non-public functions.