libhomegear-base  0.7
Base library for Homegear and Homegear family modules.
BaseLib::Database::DataColumn Class Reference

Class to store data of a database column in. More...

#include <DatabaseTypes.h>

Classes

struct  DataType
 Enumeration of the data types which can be stored in this class. More...
 

Public Member Functions

 DataColumn ()
 Default constructor. More...
 
 DataColumn (int64_t value)
 Constructor to create a data column of type INTEGER. More...
 
 DataColumn (uint64_t value)
 Constructor to create a data column of type INTEGER. More...
 
 DataColumn (int32_t value)
 Constructor to create a data column of type INTEGER. More...
 
 DataColumn (uint32_t value)
 Constructor to create a data column of type INTEGER. More...
 
 DataColumn (std::string value)
 Constructor to create a data column of type TEXT. More...
 
 DataColumn (double value)
 Constructor to create a data column of type FLOAT. More...
 
 DataColumn (std::shared_ptr< std::vector< char >> value)
 Constructor to create a data column of type BLOB. More...
 
 DataColumn (const std::vector< char > &value)
 Constructor to create a data column of type BLOB. More...
 
 DataColumn (const std::vector< uint8_t > &value)
 Constructor to create a data column of type BLOB. More...
 
virtual ~DataColumn ()
 Destructor. More...
 

Public Attributes

DataType::Enum dataType = DataType::Enum::NODATA
 The data type of the column. More...
 
int32_t index = 0
 The column index. More...
 
int64_t intValue = 0
 The integer value. More...
 
double floatValue = 0
 The float value. More...
 
std::string textValue
 The text value. More...
 
std::shared_ptr< std::vector< char > > binaryValue
 The binary value. More...
 

Detailed Description

Class to store data of a database column in.

Constructor & Destructor Documentation

§ DataColumn() [1/10]

BaseLib::Database::DataColumn::DataColumn ( )
inline

Default constructor.

§ DataColumn() [2/10]

BaseLib::Database::DataColumn::DataColumn ( int64_t  value)
inline

Constructor to create a data column of type INTEGER.

Parameters
valueThe column data.

§ DataColumn() [3/10]

BaseLib::Database::DataColumn::DataColumn ( uint64_t  value)
inline

Constructor to create a data column of type INTEGER.

Parameters
valueThe column data.

§ DataColumn() [4/10]

BaseLib::Database::DataColumn::DataColumn ( int32_t  value)
inline

Constructor to create a data column of type INTEGER.

Parameters
valueThe column data.

§ DataColumn() [5/10]

BaseLib::Database::DataColumn::DataColumn ( uint32_t  value)
inline

Constructor to create a data column of type INTEGER.

Parameters
valueThe column data.

§ DataColumn() [6/10]

BaseLib::Database::DataColumn::DataColumn ( std::string  value)
inline

Constructor to create a data column of type TEXT.

Parameters
valueThe column data.

§ DataColumn() [7/10]

BaseLib::Database::DataColumn::DataColumn ( double  value)
inline

Constructor to create a data column of type FLOAT.

Parameters
valueThe column data.

§ DataColumn() [8/10]

BaseLib::Database::DataColumn::DataColumn ( std::shared_ptr< std::vector< char >>  value)
inline

Constructor to create a data column of type BLOB.

Parameters
valueThe column data. It is not copied! So make sure to not modify it as long as the DataColumn object exists.

§ DataColumn() [9/10]

BaseLib::Database::DataColumn::DataColumn ( const std::vector< char > &  value)
inline

Constructor to create a data column of type BLOB.

Parameters
valueThe column data. The data is copied.

§ DataColumn() [10/10]

BaseLib::Database::DataColumn::DataColumn ( const std::vector< uint8_t > &  value)
inline

Constructor to create a data column of type BLOB.

Parameters
valueThe column data. The data is copied.

§ ~DataColumn()

virtual BaseLib::Database::DataColumn::~DataColumn ( )
inlinevirtual

Destructor.

It does nothing.

Member Data Documentation

§ binaryValue

std::shared_ptr<std::vector<char> > BaseLib::Database::DataColumn::binaryValue

The binary value.

§ dataType

DataType::Enum BaseLib::Database::DataColumn::dataType = DataType::Enum::NODATA

The data type of the column.

§ floatValue

double BaseLib::Database::DataColumn::floatValue = 0

The float value.

§ index

int32_t BaseLib::Database::DataColumn::index = 0

The column index.

§ intValue

int64_t BaseLib::Database::DataColumn::intValue = 0

The integer value.

§ textValue

std::string BaseLib::Database::DataColumn::textValue

The text value.


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