Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Related Pages | Examples

SimpleDB::Column Class Reference

The abstract base class for the SimpleDB types. More...

#include <Column.h>

Inheritance diagram for SimpleDB::Column:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual bool isNull ()
 Tests if the current value is NULL.
virtual void bind (SQLHSTMT statementHandle, int columnNumber)=0
 This abstract function is called by Query when the Query.bind function is invoked.
virtual std::ostream & oStream (std::ostream &oStream)=0
 Function called to write a column value to the output stream.
virtual ~Column ()
 A virtual destructor that can be overridden if required.
 Column ()
 Constructor used to set initial value of columnBound variable.
void value ()
 This method is to be called by all derived classes to make sure the column was bound.

Protected Attributes

SQLINTEGER lengthOrIndex
 The lengthOrIndex variable to be sent to the SQLBindCol function.
bool bound
 Indicates weather this column has been bound to a query.
std::string name
 Name that can be used.

Classes

class  UnboundException
 Exception class. More...

Detailed Description

The abstract base class for the SimpleDB types.

This type contains the actual data as well as meta-data.

Examples:

complete.cpp, factory.cpp, and simple.cpp.


Constructor & Destructor Documentation

virtual SimpleDB::Column::~Column  )  [inline, virtual]
 

A virtual destructor that can be overridden if required.

This can be used, for example, to deallocate memory.


Member Function Documentation

virtual void SimpleDB::Column::bind SQLHSTMT  statementHandle,
int  columnNumber
[pure virtual]
 

This abstract function is called by Query when the Query.bind function is invoked.

This function has an implementation that handles making sure columns are bound. This function should be called by any derived objects.

Parameters:
statementHandle The statementHandle columns are being bound to
columnNumber The column number to bind this column to..

Implemented in SimpleDB::StringColumn, SimpleDB::LongColumn, and SimpleDB::BoolColumn.

virtual bool SimpleDB::Column::isNull  )  [virtual]
 

Tests if the current value is NULL.

Returns:
True if the value is NULL.

virtual std::ostream& SimpleDB::Column::oStream std::ostream &  oStream  )  [pure virtual]
 

Function called to write a column value to the output stream.

This function is implemented by each column type to write the value in a suitable form to the output stream.

Parameters:
oStream Output stream object.
Returns:
Output stream object to which data was written.

Implemented in SimpleDB::StringColumn, SimpleDB::LongColumn, and SimpleDB::BoolColumn.

void SimpleDB::Column::value  ) 
 

This method is to be called by all derived classes to make sure the column was bound.

It will cause an exception to be thrown if the column wasn't bound.

Reimplemented in SimpleDB::StringColumn, SimpleDB::LongColumn, and SimpleDB::BoolColumn.


The documentation for this class was generated from the following file:
Copyright (C) 2005 Eminence Technology Pty Ltd.
Documentation pages generated by doxygen.

SourceForge.net Logo