#include <RecordHelper.h>
Public Types | |
typedef coral::AttributeList | AttributeList |
typedef void(TOutput::* | TSetMethod )(const TCField) |
Public Member Functions | |
virtual void | extractValue (const AttributeList &src, TOutput &dest) |
FieldHandler (const std::string &fieldName, TSetMethod setter) | |
Protected Attributes | |
TSetMethod | setter_ |
A template field handler that simply
Definition at line 59 of file RecordHelper.h.
typedef coral::AttributeList FieldHandler< TOutput, TCField, TDBField >::AttributeList |
Reimplemented from FieldHandlerBase< TOutput >.
Reimplemented in ASCIIBoolFieldHandler< TOutput, FalseCharacter >.
Definition at line 61 of file RecordHelper.h.
typedef void(TOutput::* FieldHandler< TOutput, TCField, TDBField >::TSetMethod)(const TCField) |
Definition at line 62 of file RecordHelper.h.
FieldHandler< TOutput, TCField, TDBField >::FieldHandler | ( | const std::string & | fieldName, |
TSetMethod | setter | ||
) | [inline] |
Definition at line 64 of file RecordHelper.h.
: FieldHandlerBase<TOutput>(fieldName), setter_(setter) { }
virtual void FieldHandler< TOutput, TCField, TDBField >::extractValue | ( | const AttributeList & | src, |
TOutput & | dest | ||
) | [inline, virtual] |
Actual data extraction.
Implements FieldHandlerBase< TOutput >.
Reimplemented in ASCIIBoolFieldHandler< TOutput, FalseCharacter >.
Definition at line 69 of file RecordHelper.h.
{ #ifdef RECORDHELPER_DEBUG std::cout << "Parsing field " << this->getName() << " with type " << typeid(TCField).name() ; #endif typedef typename boost::remove_cv<typename boost::remove_reference<TDBField>::type>::type TDBFieldT; const TDBFieldT & value = src[this->getColumnName()].template data< TDBFieldT >(); ((dest).*setter_)(TCField(value)); #ifdef RECORDHELPER_DEBUG std::cout << "=" << TCField(value) << std::endl ; #endif }
TSetMethod FieldHandler< TOutput, TCField, TDBField >::setter_ [protected] |
Points to the setter method used to stuff the field's value into the destination object.
Definition at line 85 of file RecordHelper.h.
Referenced by FieldHandler< TOutput, bool, char >::extractValue().