CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

FieldHandlerBase< TOutput > Class Template Reference

#include <RecordHelper.h>

Inheritance diagram for FieldHandlerBase< TOutput >:
FieldHandler< TOutput, TCField, TDBField > FieldHandler< TOutput, bool, char > ASCIIBoolFieldHandler< TOutput, FalseCharacter >

List of all members.

Public Types

typedef coral::AttributeList AttributeList

Public Member Functions

virtual void extractValue (const AttributeList &src, TOutput &dest)=0
 FieldHandlerBase (const std::string &name)
virtual const std::string getColumnName ()
const std::string & getName ()
virtual ~FieldHandlerBase ()

Private Attributes

std::string name_

Detailed Description

template<class TOutput>
class FieldHandlerBase< TOutput >

A base class for all field handlers that create TOutput C++ objects.

Definition at line 28 of file RecordHelper.h.


Member Typedef Documentation

template<class TOutput >
typedef coral::AttributeList FieldHandlerBase< TOutput >::AttributeList

Constructor & Destructor Documentation

template<class TOutput >
FieldHandlerBase< TOutput >::FieldHandlerBase ( const std::string &  name) [inline]

Construct a new field handler with the C++ field name as its argument

Definition at line 32 of file RecordHelper.h.

: name_(name) { }
template<class TOutput >
virtual FieldHandlerBase< TOutput >::~FieldHandlerBase ( ) [inline, virtual]

Virtual destructor for children.

Definition at line 46 of file RecordHelper.h.

{ } 

Member Function Documentation

template<class TOutput >
virtual void FieldHandlerBase< TOutput >::extractValue ( const AttributeList src,
TOutput &  dest 
) [pure virtual]

The actual extraction function. src contains a CORAL attribute list representing a query result row, dest is the output object to be filled.

Implemented in FieldHandler< TOutput, TCField, TDBField >, ASCIIBoolFieldHandler< TOutput, FalseCharacter >, and FieldHandler< TOutput, bool, char >.

template<class TOutput >
virtual const std::string FieldHandlerBase< TOutput >::getColumnName ( ) [inline, virtual]

Return the name of the associated database field. For the GMT database, this simply corresponds to the uppercased field name.

Definition at line 39 of file RecordHelper.h.

References FieldHandlerBase< TOutput >::name_, and upcaseString().

Referenced by FieldHandler< TOutput, bool, char >::extractValue(), and ASCIIBoolFieldHandler< TOutput, FalseCharacter >::extractValue().

{ return upcaseString(name_); }
template<class TOutput >
const std::string& FieldHandlerBase< TOutput >::getName ( void  ) [inline]

Return the name of the field handled by this object.

Definition at line 35 of file RecordHelper.h.

References FieldHandlerBase< TOutput >::name_.

Referenced by FieldHandler< TOutput, bool, char >::extractValue().

{ return name_ ; }

Member Data Documentation

template<class TOutput >
std::string FieldHandlerBase< TOutput >::name_ [private]