#include <TypedField.h>
Inheritance diagram for MySQLaux::TypedField
Public Methods | |
TypedField (std::string const &name, std::string const &data) | |
Constructor. More... | |
TypedField (string const &name) | |
Constructor for null fields. More... | |
T const& | value () const throw (NullFieldIndicator) |
Get value. More... | |
std::string | to_string () const throw (NullFieldIndicator) |
Get value as string. More... | |
std::size_t | size () const |
Get storage size of value. More... |
T | type |
Definition at line 39 of file TypedField.h.
|
Constructor.
Definition at line 65 of file TypedField.h. 00067 : Field (name) 00068 { 00069 std::istringstream is (data); 00070 is >> _value; 00071 |
|
Constructor for null fields.
Definition at line 77 of file TypedField.h. 00078 : Field (name, true) 00079 { 00080 |
|
Get storage size of value.
Reimplemented from MySQLaux::Field. Definition at line 110 of file TypedField.h. 00110 { return sizeof(_value); } 00111 |
|
Get value as string.
Reimplemented from MySQLaux::Field. Definition at line 96 of file TypedField.h. 00098 { 00099 if (_is_null) 00100 throw NullFieldIndicator (); 00101 00102 std::ostringstream os; 00103 os << _value; 00104 return os.str(); 00105 |
|
Get value.
Definition at line 85 of file TypedField.h. 00087 { 00088 if (_is_null) 00089 throw NullFieldIndicator (); 00090 return _value; 00091 |