#include <row_base.h>
Inheritance diagram for pqxxobject::row_base:
Public Types | |
enum | row_state { STATE_UNINITIALISED, STATE_INITIALISED, STATE_INCONSISTENT } |
The state of the row. More... | |
Public Member Functions | |
row_base () | |
The constructor. | |
row_base (row_state status, bool modified=false) | |
The constructor. | |
row_base (const row_base &rhs) | |
The copy constructor. | |
virtual | ~row_base () |
The destructor. | |
row_base & | operator= (const row_base &rhs) |
Overloaded assignment operator. | |
row_state | get_state () const |
Get the row status. | |
bool | is_modified () const |
Get the row modification status. | |
void | refresh (pqxxobject::transaction &tran) |
Refresh a row from a table. | |
void | insert (pqxxobject::transaction &tran) |
Insert a row into a table. | |
void | update (pqxxobject::transaction &tran) |
Update a row from a table. | |
void | erase (pqxxobject::transaction &tran) |
Remove a row from a table. | |
SigC::Signal0< void > & | signal_changed () |
Signal emitted on row change. | |
SigC::Signal0< void > & | signal_refreshed () |
Signal emitted on refresh. | |
SigC::Signal0< void > & | signal_inserted () |
Signal emitted on insertion. | |
SigC::Signal0< void > & | signal_updated () |
Signal emitted on update. | |
SigC::Signal0< void > & | signal_erased () |
Signal emitted on deletion. | |
Protected Member Functions | |
virtual void | refresh_impl (pqxxobject::transaction &tran) |
Refresh a row from a table. | |
virtual void | insert_impl (pqxxobject::transaction &tran) |
Insert a row into a table. | |
virtual void | update_impl (pqxxobject::transaction &tran) |
Update a row from a table. | |
virtual void | erase_impl (pqxxobject::transaction &tran) |
Remove a row from a table. | |
Protected Attributes | |
row_state | m_state |
The row state. | |
bool | m_modified |
The row modification state. | |
SigC::Signal0< void > | m_signal_changed |
The changed signal. | |
SigC::Signal0< void > | m_signal_refreshed |
The refreshed signal. | |
SigC::Signal0< void > | m_signal_inserted |
The inserted signal. | |
SigC::Signal0< void > | m_signal_updated |
The updated signal. | |
SigC::Signal0< void > | m_signal_erased |
The erased signal. |
This class provides the functionality common to all database rows of all types. Because it derives from SigC::Object, signals may be connected to it, and all classes which derive from it.
Definition at line 56 of file row_base.h.
|
The state of the row.
Definition at line 60 of file row_base.h. |
|
The constructor.
Definition at line 66 of file row_base.cc. |
|
The constructor.
Definition at line 72 of file row_base.cc. |
|
The copy constructor.
Definition at line 79 of file row_base.cc. |
|
The destructor.
Definition at line 86 of file row_base.cc. |
|
Remove a row from a table.
Definition at line 163 of file row_base.cc. References describe_status(), erase_impl(), m_signal_changed, m_signal_erased, m_state, STATE_INCONSISTENT, and STATE_INITIALISED. |
|
Remove a row from a table. This default method does nothing and should be overridden by derived classes.
Definition at line 222 of file row_base.cc. Referenced by erase(). |
|
Get the row status.
Definition at line 99 of file row_base.cc. References m_state. |
|
Insert a row into a table.
Definition at line 125 of file row_base.cc. References describe_status(), insert_impl(), m_modified, m_signal_inserted, m_state, pqxxobject::transaction::signal_abort(), pqxxobject::transaction::signal_commit(), STATE_INCONSISTENT, and STATE_UNINITIALISED. |
|
Insert a row into a table. This default method does nothing and should be overridden by derived classes.
Definition at line 212 of file row_base.cc. Referenced by insert(). |
|
Get the row modification status.
Definition at line 105 of file row_base.cc. References m_modified. |
|
Overloaded assignment operator.
Definition at line 91 of file row_base.cc. References m_modified, and m_state. |
|
Refresh a row from a table.
Definition at line 111 of file row_base.cc. References describe_status(), m_signal_changed, m_signal_refreshed, m_state, refresh_impl(), STATE_INCONSISTENT, and STATE_UNINITIALISED. |
|
Refresh a row from a table. This default method does nothing and should be overridden by derived classes.
Definition at line 207 of file row_base.cc. Referenced by refresh(). |
|
Signal emitted on row change.
Definition at line 177 of file row_base.cc. References m_signal_changed. |
|
Signal emitted on deletion.
Definition at line 201 of file row_base.cc. References m_signal_erased. |
|
Signal emitted on insertion.
Definition at line 189 of file row_base.cc. References m_signal_inserted. |
|
Signal emitted on refresh.
Definition at line 183 of file row_base.cc. References m_signal_refreshed. |
|
Signal emitted on update.
Definition at line 195 of file row_base.cc. References m_signal_updated. |
|
Update a row from a table.
Definition at line 144 of file row_base.cc. References describe_status(), m_modified, m_signal_updated, m_state, pqxxobject::transaction::signal_abort(), pqxxobject::transaction::signal_commit(), STATE_INCONSISTENT, STATE_INITIALISED, and update_impl(). |
|
Update a row from a table. This default method does nothing and should be overridden by derived classes.
Definition at line 217 of file row_base.cc. Referenced by update(). |
|
The row modification state.
Definition at line 204 of file row_base.h. Referenced by insert(), is_modified(), operator=(), and update(). |
|
The changed signal.
Definition at line 207 of file row_base.h. Referenced by erase(), refresh(), and signal_changed(). |
|
The erased signal.
Definition at line 215 of file row_base.h. Referenced by erase(), and signal_erased(). |
|
The inserted signal.
Definition at line 211 of file row_base.h. Referenced by insert(), and signal_inserted(). |
|
The refreshed signal.
Definition at line 209 of file row_base.h. Referenced by refresh(), and signal_refreshed(). |
|
The updated signal.
Definition at line 213 of file row_base.h. Referenced by signal_updated(), and update(). |
|
The row state.
Definition at line 202 of file row_base.h. Referenced by erase(), get_state(), insert(), operator=(), refresh(), and update(). |