oos::attribute_reader< T > Class Template Reference

Set an attribute value of an object. More...

#include <attribute_serializer.hpp>

Inherits oos::generic_object_reader< attribute_reader< T > >.

Public Member Functions

 attribute_reader (const std::string &id, const T &from)
 Creates an attribute_reader. More...
 
bool success () const
 True if value was set. More...
 
- Public Member Functions inherited from oos::object_reader
virtual void read (const char *, char &)=0
 Read a single character from the atomizer. More...
 
virtual void read (const char *, float &)=0
 Read a float from the atomizer. More...
 
virtual void read (const char *, double &)=0
 Read a double from the atomizer. More...
 
virtual void read (const char *, short &)=0
 Read an short from the atomizer. More...
 
virtual void read (const char *, int &)=0
 Read an integer from the atomizer. More...
 
virtual void read (const char *, long &)=0
 Read a long from the atomizer. More...
 
virtual void read (const char *, unsigned char &)=0
 Read an unsigned char from the atomizer. More...
 
virtual void read (const char *, unsigned short &)=0
 Read an unsigned short from the atomizer. More...
 
virtual void read (const char *, unsigned int &)=0
 Read an unsigned integer from the atomizer. More...
 
virtual void read (const char *, unsigned long &)=0
 Read an unsigned long from the atomizer. More...
 
virtual void read (const char *, bool &)=0
 Read a bool from the atomizer. More...
 
virtual void read (const char *, char *, int)=0
 Read a const char pointer from the atomizer. More...
 
virtual void read (const char *, std::string &)=0
 Read a std::string from the atomizer. More...
 
virtual void read (const char *, varchar_base &)=0
 Read a varchar from the atomizer. More...
 
virtual void read (const char *, object_base_ptr &)=0
 Read an object_base_ptr from the atomizer. More...
 
virtual void read (const char *, object_container &)=0
 Read an object_container from the atomizer. More...
 

Friends

class generic_object_reader< attribute_reader< T > >
 

Additional Inherited Members

- Protected Member Functions inherited from oos::generic_object_reader< attribute_reader< T > >
 generic_object_reader (attribute_reader< T > *reader)
 

Detailed Description

template<class T>
class oos::attribute_reader< T >

Set an attribute value of an object.

Template Parameters
TThe type of the attribute to set.

A given attribute value of a template type is tried to set into an object. Therefor the attribute with given name must be found and the value must be convertible into the objects attribute.

Constructor & Destructor Documentation

template<class T >
oos::attribute_reader< T >::attribute_reader ( const std::string &  id,
const T &  from 
)
inline

Creates an attribute_reader.

Creates an attribute_reader for an attribute id of type T where id is the name of the attribute.

Template Parameters
TThe type of the attribute.
Parameters
idThe name of the attribute.
fromThe attribute value to set.

Member Function Documentation

template<class T >
bool oos::attribute_reader< T >::success ( ) const
inline

True if value was set.

Returns true if the value could be set successfully.

Returns
True if value was set.

The documentation for this class was generated from the following file:
  • object/attribute_serializer.hpp