BankAndCustomer
Loading...
Searching...
No Matches
GloPersistent.h File Reference

Header for Persistent More...

#include "GloTypes.h"
#include "GloBasePersistent.h"
#include "GloPersObjectSpy.h"
#include "GloAttributeID.h"
#include "GloRecord.h"
#include "GloTOndemand.h"
#include "GloTPointerSet.h"
#include "GloTOndemandSet.h"
#include "GloTPointerList.h"
#include "GloTOndemandList.h"
#include "EuException.h"
#include <string>
#include <ctime>
#include <list>

Go to the source code of this file.

Classes

class  glo::Persistent
 The base class of the persistent classes. All persistent classes must be derived from this class to be able to process their objects in the database. More...
 

Namespaces

namespace  glo
 

Macros

#define GLO_OBJECT(...)
 
#define GLO_INDEX(...)
 
#define GLO_ANNOTATE_ACCESS_SPECIFIER(x)
 
#define GLO_PERSISTENT_AREA   GLO_ANNOTATE_ACCESS_SPECIFIER(x)
 
#define persistent   GLO_PERSISTENT_AREA
 
#define transient   GLO_PERSISTENT_AREA
 

Detailed Description

Header for Persistent

Author
Helmut Jakoby

Terms of License The source code in this file is licensed.

SPDX-License-Identifier: LicenseRef-Helmut-Jakoby-Commercial-License OR LicenseRef-Helmut-Jakoby-Adapted-Prosperity-Public-License

Helmut-Jakoby-Commercial-License
For OEMs (Original Equipment Manufacturers), ISVs (Independent Software Vendors), VARs (Value Added Resellers) and other distributors who combine commercially licensed software with Software © by Helmut Jakoby and distribute it as such or in conjunction with another product and do not wish to publish the source code of the commercially licensed software under any other license that may be offered, a commercial license is available for this purpose. Please review the following information to ensure the Commercial-License requirements will be met: https://globalobjects.de/hjacomlicense_en.html .

Helmut-Jakoby-Adapted-Prosperity-Public-License
For developers of free, non-commercial software applications who want to combine and distribute their application with Software © by Helmut Jakoby, this license is a good option. Please review the following information to ensure the Adapted-Prosperity-Public-License requirements will be met: https://globalobjects.de/hjappllicense_en.html .

Macro Definition Documentation

◆ GLO_ANNOTATE_ACCESS_SPECIFIER

#define GLO_ANNOTATE_ACCESS_SPECIFIER ( x)

◆ GLO_INDEX

#define GLO_INDEX ( ...)

To insert a GLO-specific index in the header of persistent classes. Examples:

  • GLO_INDEX( IndexName, ExampleClass.m_MyString20[20] );
    #define GLO_INDEX(...)
    Definition GloPersistent.h:134
    -> An index with the name 'IndexName' is created. The index is formed from the first 20 characters of the attribute ExampleClass.m_MyString.
  • GLO_INDEX( IndexName, ExampleClass.m_MyString[20] & ExampleClass.m_MyEmbedded.ExampleEmbeddedClass.m_MyValue[10], UNIQUE | DEU-1 | CASE_SENSITIVE | USE_DELIMITER );
    -> An index with the name 'IndexName' is created. The index is formed from the first 20 characters of the attribute ExampleClass.m_MyString and the first 10 characters of the attribute ExampleEmbeddedClass.m_MyValue of the embedded object ExampleClass.m_MyEmbedded.Furthermore, this index is unique (UNIQUE), the characters in the index are case-sensitive (CASE_SENSITIVE), all special characters of the German character set are converted to their ASCII equivalents (for example, 'Ä' becomes 'AE') (DEU-1) and the two strings are separated by a '|' (USE_DELIMITER).

See example in ExampleClass.h.

◆ GLO_OBJECT

#define GLO_OBJECT ( ...)
Value:
public: \
virtual unsigned long getGloClassID() const override; \
virtual int getTypeAsString( std::string & rsTypeName ) override; \
virtual int setGloAttribute( const glo::AttributeID & rAttributeID, void * pPara ) override; \
virtual void * getGloAttribute( const glo::AttributeID & rAttributeID ) override; \
virtual int setGloAttribute( const std::string & rstrAttributeName, void * pPara ) override; \
virtual void * getGloAttribute( const std::string & rstrAttributeName ) override; \
virtual bool isSameOrSuperClassFrom( const glo::Persistent * pPersistent ) const override; \
virtual bool isSameOrSuperClassFrom( const std::shared_ptr<glo::Persistent> spPersistent ) const override; \
virtual void _postAssign( glo::Base & rBase ) override; \
private:
The base class of the persistent classes. All persistent classes must be derived from this class to b...
Definition GloPersistent.h:242

It declares the virtual methodes for the subclasses. Examples:

  • GLO_OBJECT( MyTestClass:Persistent );
    #define GLO_OBJECT(...)
    Definition GloPersistent.h:82
    -> MyTestClass derived from Persistent
  • GLO_OBJECT( MyClass:Test,Rest );
    -> MyClass derived from Test und Rest
  • GLO_OBJECT( MyClass::MyNestedClass:Persistent );
    -> MyClass::MyNestedClass derived from Persistent

See example in ExampleClass.h.

◆ GLO_PERSISTENT_AREA

#define GLO_PERSISTENT_AREA   GLO_ANNOTATE_ACCESS_SPECIFIER(x)

◆ persistent

#define persistent   GLO_PERSISTENT_AREA

Start sequence for the persistent attributes area.
Within the start sequence 'persistent' and end sequence 'transient' all attributes are considered for storage in GlobalObjects.
See example in ExampleClass.h.

See also
transient

◆ transient

#define transient   GLO_PERSISTENT_AREA

End sequence for the range of persistent attributes.
See description of persistent.