GlobalObjects
|
Class for the DateTime attributes of a Record. Represents an attribute of the type 'std::time_t' of a persistent object. More...
#include <GloDateTimeRecordAttribute.h>
Public Member Functions | |
DateTimeRecordAttribute (ClassInfoAttribute *pType, const std::streampos &rFilePos) | |
DateTimeRecordAttribute (ClassInfoAttribute *pType, std::time_t dtValue, const std::streampos &rFilePos) | |
virtual bool | dataIsFieldContent () const |
virtual BaseRecordAttribute * | getCopy () |
virtual unsigned short | getDataFieldLength () const |
void | getValue (int &riYear, int &riMonth, int &riDay, int &riHour, int &riMin, int &riSec) const |
virtual std::string | getValueAsDataString () const |
virtual std::string | getValueAsDisplayString () const |
virtual void | getValueAsPartStrings (std::string &rsYear, std::string &rsMonth, std::string &rsDay, std::string &rsHour, std::string &rsMinute, std::string &rsSecond) const |
virtual std::string | getValueAsStreamString () const |
virtual std::string | getValueAsString () const |
virtual void * | getValueAsVoidPointer () |
const std::time_t & | getValueRef () const |
virtual void | initNew () |
void | setValue (std::time_t dtValue) |
void | setValue (unsigned int uiYear, unsigned int uiMonth, unsigned int uiDay, unsigned int uiHour, unsigned int uiMin, unsigned int uiSec) |
virtual void | setValueFromVoid (void *pValue) |
virtual int | takeValue (const BaseRecordAttribute &rT) |
bool | operator== (const DateTimeRecordAttribute &rT) const |
Comparison operator, all attributes are compared. | |
bool | operator!= (const DateTimeRecordAttribute &rT) const |
Comparison operator, all attributes are compared. | |
Public Member Functions inherited from glo::INumRecordAttribute | |
INumRecordAttribute (ClassInfoAttribute *pType, const std::streampos &rFilePos) | |
template<typename T > | |
std::string | getTValueAsString (const T &rTValue, bool bFillBlanks) const |
bool | operator== (const INumRecordAttribute &rT) const |
Comparison operator, all attributes are compared. | |
bool | operator!= (const INumRecordAttribute &rT) const |
Comparison operator, all attributes are compared. | |
Public Member Functions inherited from glo::BaseRecordAttribute | |
BaseRecordAttribute (ClassInfoAttribute *pClassInfoAttribut, const std::streampos &rFilePos) | |
virtual | ~BaseRecordAttribute () |
unsigned int | forget () |
AttributeID | getAttributeID () const |
virtual int | getAttributeValueBlob (eut::Blob &rBlob) const |
ClassInfoAttribute * | getClassInfoAttribute () const |
std::string | getClassMemberName () const |
std::string | getClassName () const |
virtual std::string | getDataReference () const |
EnDataType | getDataType () const |
std::string | getFieldName () const |
int | getFieldPos () |
std::streampos | getFilePosition () const |
virtual int | getFormattedFieldContents (std::string &rsRetVal, DATA_REFERENCE_INFO &rRetValInfo, ObjID ObjID) |
EnDataTypeGroup | getInfoType () |
unsigned int | getReferenceCount () const |
std::string | getTableFieldName () const |
std::string | getTableName () const |
ClassInfoAttribute::Type | getType () const |
std::string | getTypeAsCppString () const |
std::string | getTypeAsString () const |
std::string | getTypeInfo () const |
unsigned int | remember () |
virtual void | setDataReference (const std::string &rsDataReference) |
void | setFilePosition (const std::streampos &rFilePos) |
virtual int | setValueFromObjectAttributeID (Persistent &rObject, const AttributeID &rAttributeID) |
virtual int | updateDataReference (const std::string &rsDataPath, DATA_REFERENCE_INFO MethodInfo) |
bool | operator== (const BaseRecordAttribute &rT) const |
Comparison operator, all attributes are compared. | |
bool | operator!= (const BaseRecordAttribute &rT) const |
Comparison operator, all attributes are compared. | |
Protected Member Functions | |
DateTimeRecordAttribute () | |
DateTimeRecordAttribute (const DateTimeRecordAttribute &rT) | |
virtual | ~DateTimeRecordAttribute () |
Protected Member Functions inherited from glo::INumRecordAttribute | |
INumRecordAttribute () | |
INumRecordAttribute (const INumRecordAttribute &rT) | |
virtual | ~INumRecordAttribute () |
Protected Member Functions inherited from glo::BaseRecordAttribute | |
BaseRecordAttribute () | |
BaseRecordAttribute (const BaseRecordAttribute &rT) | |
Private Member Functions | |
DateTimeRecordAttribute & | operator= (const DateTimeRecordAttribute &) |
Private Attributes | |
std::time_t | m_dtValue |
Class for the DateTime attributes of a Record. Represents an attribute of the type 'std::time_t' of a persistent object.
|
protected |
The standard constructor is not available.
|
protectedvirtual |
The destructor is not available. The object may only be removed from memory using forget().
glo::DateTimeRecordAttribute::DateTimeRecordAttribute | ( | ClassInfoAttribute * | pType, |
const std::streampos & | rFilePos ) |
Constructor with parameter passing.
[in] | pType | A class information attribute is expected. |
[in] | rFilePos | The file position. |
eut::ErrorNException | An exception will be thrown if an error occurs. |
glo::DateTimeRecordAttribute::DateTimeRecordAttribute | ( | ClassInfoAttribute * | pType, |
std::time_t | dtValue, | ||
const std::streampos & | rFilePos ) |
Constructor with parameter passing.
[in] | pType | A class information attribute is expected. |
[in] | dtValue | The value of the attribute. |
[in] | rFilePos | The file position. |
eut::ErrorNException | An exception will be thrown if an error occurs. |
|
protected |
|
virtual |
Returns true, because the attribute data is stored as field content.
Implements glo::BaseRecordAttribute.
|
virtual |
Returns a copy of the object. Sometimes a copy of an attribute is needed, e.g. if a deep-copied record (with copied attributes) is needed.
Implements glo::BaseRecordAttribute.
|
virtual |
Returns the record field length of the attribute value.
Implements glo::BaseRecordAttribute.
void glo::DateTimeRecordAttribute::getValue | ( | int & | riYear, |
int & | riMonth, | ||
int & | riDay, | ||
int & | riHour, | ||
int & | riMin, | ||
int & | riSec ) const |
Returns the value of the attribute.
[in,out] | riYear | The year four digits from 1970 - 2038. only values from 01.01.1970 - 18.01.2038 are supplied |
[in,out] | riMonth | The month from 1-12. |
[in,out] | riDay | The day from 1-31. |
[in,out] | riHour | The hours from 0-23. |
[in,out] | riMin | The minutes from 0-59. |
[in,out] | riSec | The seconds from 0-59. |
|
virtual |
Returns the value as a formatted data string with the correct length with the correct length for the entry in the table file.
Implements glo::BaseRecordAttribute.
|
virtual |
Returns the value as it can be displayed for the GUI.
Implements glo::BaseRecordAttribute.
|
virtual |
Returns the value of the attribute in strings.
[in,out] | rsYear | The year four digits from 1970 - 2038. only values from 01.01.1970 - 18.01.2038 are supplied |
[in,out] | rsMonth | The month from 1-12. |
[in,out] | rsDay | The day from 1-31. |
[in,out] | rsHour | The hours from 0-23. |
[in,out] | rsMinute | The minutes from 0-59. |
[in,out] | rsSecond | The seconds from 0-59. |
|
virtual |
Returns the value as string for the DataStreamer.
Implements glo::BaseRecordAttribute.
|
virtual |
|
virtual |
Returns a raw pointer to the value.
Implements glo::BaseRecordAttribute.
const std::time_t & glo::DateTimeRecordAttribute::getValueRef | ( | ) | const |
Returns the reference to the value.
|
virtual |
Reinitializes the attribute, the value is set to 0.
Implements glo::BaseRecordAttribute.
bool glo::DateTimeRecordAttribute::operator!= | ( | const DateTimeRecordAttribute & | rT | ) | const |
Comparison operator, all attributes are compared.
[in] | rT | The object to be compared with this one. |
|
private |
The assignment operator is not available.
bool glo::DateTimeRecordAttribute::operator== | ( | const DateTimeRecordAttribute & | rT | ) | const |
Comparison operator, all attributes are compared.
[in] | rT | The object to be compared with this one. |
void glo::DateTimeRecordAttribute::setValue | ( | std::time_t | dtValue | ) |
Sets the value of the attribute.
[in] | dtValue | The new value. |
void glo::DateTimeRecordAttribute::setValue | ( | unsigned int | uiYear, |
unsigned int | uiMonth, | ||
unsigned int | uiDay, | ||
unsigned int | uiHour, | ||
unsigned int | uiMin, | ||
unsigned int | uiSec ) |
Sets the value of the attribute.
[in] | uiYear | The year four digits from 1970 - 2038. only values from 01.01.1970 - 18.01.2038 are taken respectively adjusted to the nearest date; so no exception! |
[in] | uiMonth | The month from 1-12. |
[in] | uiDay | The day from 1-31. |
[in] | uiHour | The hours from 0-23. |
[in] | uiMin | The minutes from 0-59. |
[in] | uiSec | The seconds from 0-59. |
|
virtual |
Sets the value of the attribute. Is assigned via a static_cast.
[in] | pValue | The raw pointer to the value. |
Implements glo::BaseRecordAttribute.
|
virtual |
Adopts the value from transferred attribute, if possible. An attempt is made to cast the value in some way.
[in] | rT | The persistent attribute from which the values are to be taken. |
Reimplemented from glo::BaseRecordAttribute.
|
private |
The value of the attribute.