#include <field.h>
Public Types | |
typedef T | value_type |
Public Member Functions | |
field () | |
The constructor. | |
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. | |
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. | |
SigC::Signal0< void > & | signal_changed () |
Signal emitted on value change. | |
Private Attributes | |
value_type | m_value |
The contained value. | |
SigC::Signal0< void > | m_signal_changed |
The changed signal. |
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.
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 58 of file field.h.
|
Definition at line 61 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 64 of file field.h. References pqxxobject::field< T >::m_value. |
|
The constructor.
Definition at line 69 of file field.h. References pqxxobject::field< T >::m_value, and pqxxobject::field< T >::value_type. |
|
The copy constructor.
Definition at line 74 of file field.h. References pqxxobject::field< T >::m_signal_changed, and pqxxobject::field< T >::m_value. |
|
|
|
Get the contained value by constant reference.
Definition at line 126 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 117 of file field.h. References pqxxobject::field< T >::m_value, and pqxxobject::field< T >::value_type. |
|
Definition at line 88 of file field.h. References pqxxobject::field< T >::m_value, and pqxxobject::field< T >::value_type. |
|
Conversion operator.
Definition at line 108 of file field.h. References pqxxobject::field< T >::m_value. |
|
Access member functions.
Definition at line 83 of file field.h. References pqxxobject::field< T >::m_value, and pqxxobject::field< T >::value_type. |
|
Overloaded assignment operator.
Definition at line 101 of file field.h. References pqxxobject::field< T >::set_value(), and pqxxobject::field< T >::value_type. |
|
Overloaded assignment operator.
Definition at line 94 of file field.h. References pqxxobject::field< T >::m_value, and pqxxobject::field< T >::set_value(). |
|
Set the contained value.
Definition at line 135 of file field.h. References pqxxobject::field< T >::m_signal_changed, pqxxobject::field< T >::m_value, and pqxxobject::field< T >::value_type. Referenced by pqxxobject::field< T >::operator=(). |
|
Signal emitted on value change.
field<int> col; someclass listener; col.signal_changed().connect ( SigC::slot(listener, &someclass::on_col_changed() ); Definition at line 155 of file field.h. References pqxxobject::field< T >::m_signal_changed. |
|
The changed signal.
Definition at line 164 of file field.h. Referenced by pqxxobject::field< T >::field(), pqxxobject::field< T >::set_value(), and pqxxobject::field< T >::signal_changed(). |
|
The contained value.
Definition at line 162 of file field.h. Referenced by pqxxobject::field< T >::field(), pqxxobject::field< T >::get_value(), pqxxobject::field< T >::operator *(), pqxxobject::field< T >::operator const value_type &(), pqxxobject::field< T >::operator->(), pqxxobject::field< T >::operator=(), and pqxxobject::field< T >::set_value(). |