GlobalObjects
|
In objects of this class, the information for GlobalObjects is how a persistent class attribute is structured. More...
#include <GloClassInfoAttribute.h>
Classes | |
class | Type |
Summarized type information for a ClassInfoAttribute. More... | |
Public Member Functions | |
ClassInfoAttribute () | |
ClassInfoAttribute (const ClassInfoAttribute &rT) | |
ClassInfoAttribute (const std::string &rsName, const std::string &rsTableName, const std::string &rsFieldName, int iFieldPos, const std::string &rsAttributeType, const std::string &rsInfo) | |
virtual | ~ClassInfoAttribute () |
std::string | _DEBUG_ToString () |
std::string | formatAnIndexString (const std::string &rsStringToBeFormatted, const std::vector< eut::LanguageFunctions::EnLanguageKey > &rLanguageKeys, bool bCaseSensitive, void *pIndexAttributeItem) const |
std::string | formatAnSearchIndexString (const std::string &rsStringToBeFormatted, const std::vector< eut::LanguageFunctions::EnLanguageKey > &rLanguageKeys, bool bCaseSensitive, void *pIndexAttributeItem) const |
AttributeID | getAttributeID () const |
std::string | getClassAttributeName () const |
EnDataType | getDataType () const |
std::string | getDataTypeInfo () const |
std::string | getDataTypeSubType () const |
unsigned long | getDataTypeSubTypeClassID () const |
std::string | getDeveloperAccessControl () const |
std::string | getFieldName () const |
int | getFieldPos () const |
std::string | getFieldPosAsString () const |
EnDataTypeGroup | getInfoType () |
int | getSignificantCharacter () const |
std::string | getTableFieldName () const |
std::string | getTableName () const |
ClassInfoAttribute::Type | getType () const |
std::string | getTypeAsCppString () const |
std::string | getTypeAsString () const |
bool | isCrossreferenceType () const |
bool | isCrossreferenceType (std::string &rsCrossRefFileName) const |
bool | isCrossreferenceType (unsigned long &rulBaseID) const |
bool | isNum () const |
ClassInfoAttribute & | operator= (const ClassInfoAttribute &rT) |
void | setDataType (EnDataType eType) |
void | setDataTypeInfo (const std::string &rsInfo) |
void | setDataTypeSubType (const std::string &rsSubType) |
void | setDataTypeSubTypeClassID (unsigned long ulSubTypeClassID) |
void | setDeveloperAccessControl (const std::string &rsAccessControl) |
void | setFieldName (const std::string &rsName) |
void | setFieldPos (int iFieldPos) |
void | setTableName (const std::string &rsName) |
bool | operator== (const ClassInfoAttribute &rT) const |
Comparison operator, all attributes are compared. | |
bool | operator!= (const ClassInfoAttribute &rT) const |
Comparison operator, all attributes are compared. | |
Public Member Functions inherited from glo::ClassInfoItem | |
ClassInfoItem () | |
ClassInfoItem (const ClassInfoItem &rT) | |
ClassInfoItem (const std::string &rsName) | |
virtual | ~ClassInfoItem () |
unsigned long | getClassID () const |
std::string | getClassName () const |
std::string | getDeveloperDescription () const |
std::string | getName () const |
ClassInfo * | getParent () |
ClassInfoItem & | operator= (const ClassInfoItem &rT) |
void | setDeveloperDescription (const std::string &rsDeveloperDescription) |
void | setMyClassInfo (ClassInfo *pMyClassInfo) |
void | setName (const std::string &rsName) |
bool | operator== (const ClassInfoItem &rT) const |
Comparison operator, all attributes are compared. | |
bool | operator!= (const ClassInfoItem &rT) const |
Comparison operator, all attributes are compared. | |
Static Public Member Functions | |
static unsigned int | getDataTypesCount () |
static EnDataTypeGroup | getInfoType (EnDataType eType) |
static int | getRecordAttributeLimits (const ClassInfoAttribute::Type &rDataType, std::string &rsMin, std::string &rsMax, std::string &rsDataFieldSize) |
static int | getSignificantCharacter (EnDataType eDataType) |
static std::string | getTypeAsCppString (EnDataType eType, const std::string &rsSubType) |
static std::string | getTypeAsString (EnDataType eType, bool bSimple=true) |
static EnDataType | getTypeFromString (const std::string &rsType) |
static bool | isNum (EnDataType eDataType) |
Private Member Functions | |
void | convertAttributeType (const std::string &rsType, const std::string &rsTypeInfo) |
std::string | formatAnyIndexString (const std::string &rsStringToBeFormatted, const std::vector< eut::LanguageFunctions::EnLanguageKey > &rLanguageKeys, bool bCaseSensitive, bool bIsSearchString, void *pIndexAttributeItem) const |
Private Attributes | |
int | m_iFieldPos |
std::string | m_sDeveloperAccessControl |
std::string | m_sFieldName |
std::string | m_sTableName |
ClassInfoAttribute::Type | m_Type |
Friends | |
class | ClassInfo |
class | SchemaInterface |
In objects of this class, the information for GlobalObjects is how a persistent class attribute is structured.
In order to be able to build objects from tables and tables from objects, we need these class information attributes.
glo::ClassInfoAttribute::ClassInfoAttribute | ( | ) |
Standard construktor.
glo::ClassInfoAttribute::ClassInfoAttribute | ( | const std::string & | rsName, |
const std::string & | rsTableName, | ||
const std::string & | rsFieldName, | ||
int | iFieldPos, | ||
const std::string & | rsAttributeType, | ||
const std::string & | rsInfo ) |
Constructor with parameter passing.
[in] | rsName | The attribute name. |
[in] | rsTableName | The table name in which attributes of this class information attribute are stored. |
[in] | rsFieldName | The table field name in which the attributes of this class information attribute are stored. |
[in] | iFieldPos | The column position in the table. |
[in] | rsAttributeType | The attribute type as string (see also SchemaTypeString). |
[in] | rsInfo | The info like a number for a string length or an expression like dependent etc. (see also EnDataTypeGroup). |
eut::ErrorNException | An exception is thrown if an error occurs. |
glo::ClassInfoAttribute::ClassInfoAttribute | ( | const ClassInfoAttribute & | rT | ) |
Copy constructor.
[in] | rT | The data is copied from this object. |
|
virtual |
Destructor.
std::string glo::ClassInfoAttribute::_DEBUG_ToString | ( | ) |
|
private |
Sets the own type from the passed parameters.
[in] | rsType | The attribute type as string (see also SchemaTypeString). |
[in] | rsTypeInfo | The info like a number for a string length or a Expression like dependent etc. |
eut::ErrorNException | An exception is thrown if an error occurs. |
std::string glo::ClassInfoAttribute::formatAnIndexString | ( | const std::string & | rsStringToBeFormatted, |
const std::vector< eut::LanguageFunctions::EnLanguageKey > & | rLanguageKeys, | ||
bool | bCaseSensitive, | ||
void * | pIndexAttributeItem ) const |
Returns a formatted index string.
[in] | rsStringToBeFormatted | The string to format. |
[in] | rLanguageKeys | The language keys in a vector. |
[in] | bCaseSensitive | If false, all characters in rsStringToBeFormatted are converted to uppercase. |
[in] | pIndexAttributeItem | The information which index is meant. Will casted in ClassInfoIndex::IndexAttributeItem. |
std::string glo::ClassInfoAttribute::formatAnSearchIndexString | ( | const std::string & | rsStringToBeFormatted, |
const std::vector< eut::LanguageFunctions::EnLanguageKey > & | rLanguageKeys, | ||
bool | bCaseSensitive, | ||
void * | pIndexAttributeItem ) const |
Returns a formatted index string. The difference to the method ClassInfoAttribute::formatAnIndexString (...) is that in this method, the search string is not shortened if it is too long due to placeholders '*'.
[in] | rsStringToBeFormatted | The string to format. |
[in] | rLanguageKeys | The language keys in a vector. |
[in] | bCaseSensitive | If false, all characters in rsStringToBeFormatted are converted to uppercase. |
[in] | pIndexAttributeItem | The information which index is meant. Will casted in ClassInfoIndex::IndexAttributeItem. |
|
private |
Returns a formatted search index string.
[in] | rsStringToBeFormatted | The string to format. |
[in] | rLanguageKeys | The language keys in a vector. |
[in] | bCaseSensitive | If false, all characters in rsStringToBeFormatted are converted to uppercase. |
[in] | bIsSearchString | If set, the difference is that the search string is not truncated if it is too long due to placeholders '*'. |
[in] | pIndexAttributeItem | The information which index is meant. Is cast in ClassInfoIndex::IndexAttributeItem. |
AttributeID glo::ClassInfoAttribute::getAttributeID | ( | ) | const |
std::string glo::ClassInfoAttribute::getClassAttributeName | ( | ) | const |
Returns the attribute description with class name separated by a period. For example, "MyClass.m_MyAttributes".
EnDataType glo::ClassInfoAttribute::getDataType | ( | ) | const |
std::string glo::ClassInfoAttribute::getDataTypeInfo | ( | ) | const |
|
static |
Returns the number of supported attribute types. Can be used to display all data types as string by passing values one by one to ClassInfoAttribute::getTypeAsString(EnDataType, bool).
std::string glo::ClassInfoAttribute::getDataTypeSubType | ( | ) | const |
unsigned long glo::ClassInfoAttribute::getDataTypeSubTypeClassID | ( | ) | const |
std::string glo::ClassInfoAttribute::getDeveloperAccessControl | ( | ) | const |
std::string glo::ClassInfoAttribute::getFieldName | ( | ) | const |
int glo::ClassInfoAttribute::getFieldPos | ( | ) | const |
std::string glo::ClassInfoAttribute::getFieldPosAsString | ( | ) | const |
EnDataTypeGroup glo::ClassInfoAttribute::getInfoType | ( | ) |
|
static |
Returns the group type of the passed attribute type.
[in] | eType | The attribute type |
|
static |
Returns the limits of the passed class information attribute type.
[in] | rDataType | The RecordAttributeType. |
[in,out] | rsMin | Minimum value of the attribute of the passed type. |
[in,out] | rsMax | Maximum value of the attribute of the transferred type. |
[in,out] | rsDataFieldSize | Length of the data field . |
int glo::ClassInfoAttribute::getSignificantCharacter | ( | ) | const |
|
static |
Returns the default length of the passed attribute type.
[in] | eDataType | The attribute type to be checked. |
std::string glo::ClassInfoAttribute::getTableFieldName | ( | ) | const |
Returns the table name and table field name separated by a period. For example, "TableName.FieldName".
std::string glo::ClassInfoAttribute::getTableName | ( | ) | const |
ClassInfoAttribute::Type glo::ClassInfoAttribute::getType | ( | ) | const |
std::string glo::ClassInfoAttribute::getTypeAsCppString | ( | ) | const |
|
static |
Returns the passed type attribute type in conjunction with the SubString as it appears in the header and source file.
[in] | eType | The attribute type |
[in] | rsSubType | The SubType. |
std::string glo::ClassInfoAttribute::getTypeAsString | ( | ) | const |
Returns the type of attribute supported by GlobalObjects as it appears in the schema.
|
static |
Returns the passed attribute type as a string as it appears in the schema.
[in] | eType | The attribute type |
[in] | bSimple | If true, 'unsigned' numbers are returned without "unsigned". |
|
static |
Returns the passed attribute type.
[in] | rsType | The attribute type in a string (GLORA_SCHEMATYPESTRING). |
bool glo::ClassInfoAttribute::isCrossreferenceType | ( | ) | const |
Returns true if the attribute is a reference that can be found in another database.
bool glo::ClassInfoAttribute::isCrossreferenceType | ( | std::string & | rsCrossRefFileName | ) | const |
Returns true if the attribute is a reference that can be found in another database, and the corresponding file name of the referenced object.
[in,out] | rsCrossRefFileName | If the return value == true, the corresponding file name of the referenced object can be found here. |
bool glo::ClassInfoAttribute::isCrossreferenceType | ( | unsigned long & | rulBaseID | ) | const |
Returns true if the attribute is a reference that can be found in another database, and the corresponding database ID.
[in,out] | rulBaseID | If the return value == true, this is the corresponding database-id. |
bool glo::ClassInfoAttribute::isNum | ( | ) | const |
|
static |
Checks if the passed attribute type is a number.
[in] | eDataType | The attribute type to be checked. |
bool glo::ClassInfoAttribute::operator!= | ( | const ClassInfoAttribute & | rT | ) | const |
Comparison operator, all attributes are compared.
[in] | rT | The object to be compared with this one. |
ClassInfoAttribute & glo::ClassInfoAttribute::operator= | ( | const ClassInfoAttribute & | rT | ) |
Assignment operator.
[in] | rT | The data is transferred from this object. |
bool glo::ClassInfoAttribute::operator== | ( | const ClassInfoAttribute & | rT | ) | const |
Comparison operator, all attributes are compared.
[in] | rT | The object to be compared with this one. |
void glo::ClassInfoAttribute::setDataType | ( | EnDataType | eType | ) |
Sets the unique supported attribute type.
[in] | eType | The attribute type. |
void glo::ClassInfoAttribute::setDataTypeInfo | ( | const std::string & | rsInfo | ) |
Sets the info like a number for a string length or an expression like dependent etc. See also GloClassInfoAttributes::Type::setTypeInfo() and EnDataTypeGroup.
[in] | rsInfo | The Info. |
void glo::ClassInfoAttribute::setDataTypeSubType | ( | const std::string & | rsSubType | ) |
Sets a possible subtype.
[in] | rsSubType | The SubType. |
void glo::ClassInfoAttribute::setDataTypeSubTypeClassID | ( | unsigned long | ulSubTypeClassID | ) |
Sets a possible subtype class ID.
[in] | ulSubTypeClassID | The SubType class ID. |
void glo::ClassInfoAttribute::setDeveloperAccessControl | ( | const std::string & | rsAccessControl | ) |
Sets the access control for the attribute.
[in] | rsAccessControl | Sets the access control for the attribute. |
void glo::ClassInfoAttribute::setFieldName | ( | const std::string & | rsName | ) |
Sets the table field name in which attributes of this class information attribute are stored.
[in] | rsName | The table field name. |
void glo::ClassInfoAttribute::setFieldPos | ( | int | iFieldPos | ) |
Sets the column position in the table.
[in] | iFieldPos | The column position. |
void glo::ClassInfoAttribute::setTableName | ( | const std::string & | rsName | ) |
Sets the table name in which attributes of this class information attribute are stored.
[in] | rsName | The table name. |
|
friend |
|
friend |
|
private |
The the column position in the table (starting at 0) where the value of this class information attribute is stored.
|
private |
The access control to assign the attributes to 'private', 'protected' or 'public' when generating the header files.
Is only set and evaluated by the schema interface if it is in developer mode.
|
private |
The table field name in which the value of this class information attribute is stored.
|
private |
The table name in which the value of this class information attribute is stored.
|
private |
The summarized type information.