Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

DbColumn Class Reference

Db objects: DbColumn. More...

#include <DbColumn.h>

List of all members.

Public Types

typedef std::vector<DbColumn*> Container
typedef Container::iterator iterator
 Iterator type. More...

typedef Container::const_iterator const_iterator
 Const iterator type. More...

enum  Options {
  PRIMARY_KEY = 1 << 0, NOT_NULL = 1 << 1, UNIQUE = 1 << 2, CLUSTERED = 1 << 3,
  NONCLUSTERED = 1 << 4
}

Public Methods

 DbColumn (const std::string& nam, long offset, const long typ, unsigned long opt=0)
 Standard constructor. More...

 DbColumn (const std::string& nam, long offset, const std::type_info& typ, unsigned long opt=0)
 Standard constructor. More...

virtual ~DbColumn ()
 Standard destructor. More...

bool isValid () const
 Is it a valid (known) data type ? More...

const std::string& name () const
 Access to column name. More...

const std::string& typeName () const
 Access to OS independent type name. More...

const std::type_info& type () const
 Access to RTTI type info. More...

unsigned long options () const
 Access to options. More...

long typeID () const
 Access to variable type. More...

long offset () const
 Offset of column from this pointer. More...

void setOffset (unsigned long off)
 Update Offset of column. More...

void setAddress (char* address) const
 Offset typer (absolute or relative). More...

const char* address () const
 Object base address (CONST). More...

char* address ()
 Object base address. More...

char* data () const
 Access data. More...

char* data (char* ptr) const
 Access data. More...


Protected Methods

DbColumn* i_check (bool flag = true)
 Check if the column is valid; otherwise delete the column if the flag is set. More...


Protected Attributes

std::string m_name
 Column name. More...

std::string m_typeName
 OS independent type name. More...

const std::type_info& m_type
 RTTI type info. More...

unsigned long m_opt
 Column options. More...

long m_offset
 Offset from object pointer. More...

long m_typeID
 Variable Type. More...

char* m_address
 Address value for data. This is a volatile value! More...


Detailed Description

Db objects: DbColumn.

Description: Definition of the generic column in a (relational) database.

Dependencies:

History :

    +---------+----------------------------------------------+--------+
    |    Date |                 Comment                      | Who    |
    +---------+----------------------------------------------+--------+
    | 21/04/00| Initial version.                             | MF     |
    +---------+----------------------------------------------+--------+
    
Author: M.Frank Version: 1.0

Definition at line 40 of file DbColumn.h.


Member Typedef Documentation

typedef std::vector<DbColumn*> DbColumn::Container
 

Definition at line 49 of file DbColumn.h.

typedef Container::const_iterator DbColumn::const_iterator
 

Const iterator type.

Definition at line 53 of file DbColumn.h.

typedef Container::iterator DbColumn::iterator
 

Iterator type.

Definition at line 51 of file DbColumn.h.


Member Enumeration Documentation

enum DbColumn::Options
 

Enumeration values:
PRIMARY_KEY  
NOT_NULL  
UNIQUE  
CLUSTERED  
NONCLUSTERED  

Definition at line 42 of file DbColumn.h.


Constructor & Destructor Documentation

DbColumn::DbColumn ( const std::string & nam,
long offset,
const long typ,
unsigned long opt = 0 )
 

Standard constructor.

Definition at line 33 of file DbColumn.cpp.

DbColumn::DbColumn ( const std::string & nam,
long offset,
const std::type_info & typ,
unsigned long opt = 0 )
 

Standard constructor.

Definition at line 26 of file DbColumn.cpp.

DbColumn::~DbColumn ( ) [virtual]
 

Standard destructor.

Definition at line 40 of file DbColumn.cpp.


Member Function Documentation

char * DbColumn::address ( ) [inline]
 

Object base address.

Definition at line 121 of file DbColumn.h.

const char * DbColumn::address ( ) const [inline]
 

Object base address (CONST).

Definition at line 117 of file DbColumn.h.

Referenced by DbTypeInfo::makeDescription().

char * DbColumn::data ( char * ptr ) const [inline]
 

Access data.

Definition at line 129 of file DbColumn.h.

char * DbColumn::data ( ) const [inline]
 

Access data.

Definition at line 125 of file DbColumn.h.

DbColumn * DbColumn::i_check ( bool flag = true ) [protected]
 

Check if the column is valid; otherwise delete the column if the flag is set.

Definition at line 44 of file DbColumn.cpp.

bool DbColumn::isValid ( ) const [inline]
 

Is it a valid (known) data type ?

Definition at line 81 of file DbColumn.h.

Referenced by i_check().

const std::string & DbColumn::name ( ) const [inline]
 

Access to column name.

Definition at line 85 of file DbColumn.h.

Referenced by DbNTupleCnv::createRep(), and DbTypeInfo::makeDescription().

long DbColumn::offset ( ) const [inline]
 

Offset of column from this pointer.

Definition at line 105 of file DbColumn.h.

Referenced by DbTypeInfo::makeDescription().

unsigned long DbColumn::options ( ) const [inline]
 

Access to options.

Definition at line 97 of file DbColumn.h.

Referenced by DbTypeInfo::makeDescription().

void DbColumn::setAddress ( char * address ) const [inline]
 

Offset typer (absolute or relative).

Definition at line 113 of file DbColumn.h.

Referenced by DbNTupleCnv::createRep().

void DbColumn::setOffset ( unsigned long off ) [inline]
 

Update Offset of column.

Definition at line 109 of file DbColumn.h.

const std::type_info & DbColumn::type ( ) const [inline]
 

Access to RTTI type info.

Definition at line 93 of file DbColumn.h.

long DbColumn::typeID ( ) const [inline]
 

Access to variable type.

Definition at line 101 of file DbColumn.h.

Referenced by DbTypeInfo::makeDescription().

const std::string & DbColumn::typeName ( ) const [inline]
 

Access to OS independent type name.

Definition at line 89 of file DbColumn.h.

Referenced by isValid().


Member Data Documentation

char * DbColumn::m_address [mutable, protected]
 

Address value for data. This is a volatile value!

Definition at line 68 of file DbColumn.h.

std::string DbColumn::m_name [protected]
 

Column name.

Definition at line 56 of file DbColumn.h.

long DbColumn::m_offset [protected]
 

Offset from object pointer.

Definition at line 64 of file DbColumn.h.

unsigned long DbColumn::m_opt [protected]
 

Column options.

Definition at line 62 of file DbColumn.h.

const std::type_info & DbColumn::m_type [protected]
 

RTTI type info.

Definition at line 60 of file DbColumn.h.

long DbColumn::m_typeID [protected]
 

Variable Type.

Definition at line 66 of file DbColumn.h.

std::string DbColumn::m_typeName [protected]
 

OS independent type name.

Definition at line 58 of file DbColumn.h.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 12:22:21 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000