#include <field.h>
Inheritance diagram for pqxxobject::field< T >:
Public Types | |
typedef T | value_type |
Public Member Functions | |
field (const value_type &value) | |
The constructor. | |
field (const field< value_type > &rhs) | |
The copy constructor. | |
virtual | ~field () |
const value_type * | operator-> () const |
Access member functions. | |
const value_type & | operator * () const |
field< value_type > & | operator= (const field< value_type > &rhs) |
Overloaded assignment operator. | |
field< value_type > & | operator= (const value_type &rhs) |
Overloaded assignment operator. | |
field< value_type > & | operator+= (const field< value_type > &rhs) |
field< value_type > & | operator-= (const field< value_type > &rhs) |
field< value_type > & | operator *= (const field< value_type > &rhs) |
field< value_type > & | operator/= (const field< value_type > &rhs) |
field< value_type > & | operator%= (const field< value_type > &rhs) |
field< value_type > & | operator++ () |
field< value_type > | operator++ (int) |
field< value_type > & | operator-- () |
field< value_type > | operator-- (int) |
operator const value_type & () const | |
Conversion operator. | |
value_type & | get_value () |
Get the contained value by reference. | |
const value_type & | get_value () const |
Get the contained value by constant reference. | |
void | set_value (const value_type &value) |
Set the contained value. | |
bool | is_null () const |
Check if the contained value is NULL. | |
bool | is_not_null () const |
Check if the contained value is not NULL. | |
Private Attributes | |
value_type | m_value |
The contained value. | |
Friends | |
field< value_type > | operator+ (const field< value_type > &lhs, const field< value_type > &rhs) |
field< value_type > | operator- (const field< value_type > &lhs, const field< value_type > &rhs) |
field< value_type > | operator * (const field< value_type > &lhs, const field< value_type > &rhs) |
field< value_type > | operator/ (const field< value_type > &lhs, const field< value_type > &rhs) |
field< value_type > | operator% (const field< value_type > &lhs, const field< value_type > &rhs) |
bool | operator== (const field< value_type > &lhs, const field< value_type > &rhs) |
bool | operator!= (const field< value_type > &lhs, const field< value_type > &rhs) |
field< value_type > | operator- (const field< value_type > &rhs) |
field< value_type > | operator+ (const field< value_type > &rhs) |
std::ostream & | operator<< (std::ostream &output_stream, const field< value_type > &rhs) |
This class is used to represent a single field in a row of a table. This is a single value belonging to a column in a row, rather than the whole column. The value may not be NULL.
The class has some similarity with std::auto_ptr, but the copying semantics are different: on copy, the value is copied, which may involve memory allocation. There is no transfer of pointer ownership. Contained objects must posess a copy constructor.
As well as storing value, the class has the ability to emit signals when the field value is changed. Listeners (e.g. user interface widgets) may connect to the signal and will receive notification of changes as they occur.
Definition at line 69 of file field.h.
|
Definition at line 72 of file field.h. Referenced by pqxxobject::field< T >::field(), pqxxobject::field< T >::get_value(), pqxxobject::field< T >::operator *(), pqxxobject::field< T >::operator->(), pqxxobject::field< T >::operator=(), and pqxxobject::field< T >::set_value(). |
|
The constructor.
Definition at line 75 of file field.h. References pqxxobject::field< T >::m_value, and pqxxobject::field< T >::value_type. |
|
The copy constructor.
Definition at line 83 of file field.h. References pqxxobject::field< T >::m_value. |
|
|
|
Get the contained value by constant reference.
Definition at line 235 of file field.h. References pqxxobject::field< T >::m_value, and pqxxobject::field< T >::value_type. |
|
Get the contained value by reference.
Definition at line 226 of file field.h. References pqxxobject::field< T >::m_value, and pqxxobject::field< T >::value_type. |
|
Check if the contained value is not NULL.
Implements pqxxobject::field_base. |
|
Check if the contained value is NULL.
Implements pqxxobject::field_base. |
|
Definition at line 100 of file field.h. References pqxxobject::field< T >::m_value, and pqxxobject::field< T >::value_type. |
|
Definition at line 134 of file field.h. References pqxxobject::field< T >::m_value. |
|
Conversion operator.
Definition at line 217 of file field.h. References pqxxobject::field< T >::m_value. |
|
Definition at line 148 of file field.h. References pqxxobject::field< T >::m_value. |
|
Definition at line 162 of file field.h. References pqxxobject::field< T >::m_value. |
|
Definition at line 155 of file field.h. References pqxxobject::field< T >::m_value. |
|
Definition at line 120 of file field.h. References pqxxobject::field< T >::m_value. |
|
Definition at line 177 of file field.h. References pqxxobject::field< T >::m_value. |
|
Definition at line 170 of file field.h. References pqxxobject::field< T >::m_value. |
|
Definition at line 127 of file field.h. References pqxxobject::field< T >::m_value. |
|
Access member functions.
Definition at line 95 of file field.h. References pqxxobject::field< T >::m_value, and pqxxobject::field< T >::value_type. |
|
Definition at line 141 of file field.h. References pqxxobject::field< T >::m_value. |
|
Overloaded assignment operator.
Definition at line 114 of file field.h. References pqxxobject::field< T >::set_value(), and pqxxobject::field< T >::value_type. |
|
Overloaded assignment operator.
Definition at line 106 of file field.h. References pqxxobject::field< T >::m_value, and pqxxobject::field< T >::set_value(). |
|
Set the contained value.
Definition at line 244 of file field.h. References pqxxobject::field< T >::m_value, and pqxxobject::field< T >::value_type. Referenced by pqxxobject::field< T >::operator=(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|