CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
FieldHandlerBase< TOutput > Class Template Referenceabstract

#include <RecordHelper.h>

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

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

◆ AttributeList

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

Definition at line 30 of file RecordHelper.h.

Constructor & Destructor Documentation

◆ FieldHandlerBase()

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.

32 : name_(name) {}
std::string name_
Definition: RecordHelper.h:50

◆ ~FieldHandlerBase()

template<class TOutput >
virtual FieldHandlerBase< TOutput >::~FieldHandlerBase ( )
inlinevirtual

Virtual destructor for children.

Definition at line 46 of file RecordHelper.h.

46 {}

Member Function Documentation

◆ extractValue()

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 ASCIIBoolFieldHandler< TOutput, FalseCharacter >, FieldHandler< TOutput, TCField, TDBField >, and FieldHandler< TOutput, bool, char >.

◆ getColumnName()

template<class TOutput >
virtual const std::string FieldHandlerBase< TOutput >::getColumnName ( )
inlinevirtual

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().

39 { return upcaseString(name_); }
std::string upcaseString(std::string aString)
Definition: RecordHelper.cc:8
std::string name_
Definition: RecordHelper.h:50

◆ getName()

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 plotting.Plot::draw(), and FieldHandler< TOutput, bool, char >::extractValue().

35 { return name_; }
std::string name_
Definition: RecordHelper.h:50

Member Data Documentation

◆ name_

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