#include <places.h>
Inheritance diagram for Place:
Public Member Functions | |
Place () | |
The constructor. | |
Place (const std::string &name, const std::string &gridref) | |
The constructor. | |
virtual | ~Place () |
The destructor. | |
int | get_id () const |
Get the place id number. | |
const std::string & | get_name () const |
Get the place name. | |
void | set_name (const std::string &name) |
Set the place name. | |
const std::string & | get_gridref () const |
Get the place grid reference. | |
void | set_gridref (const std::string &gridref) |
Set the place grid reference. | |
Protected Member Functions | |
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. | |
virtual void | refresh_impl (pqxxobject::transaction &tran) |
Refresh a row from a table. | |
virtual void | convert_impl (pqxx::result::const_iterator row, pqxxobject::transaction &tran) |
Private Attributes | |
pqxxobject::field< int > | m_id |
ID number. | |
pqxxobject::field< std::string > | m_name |
Name. | |
pqxxobject::field< std::string > | m_gridref |
Grid Reference. | |
Friends | |
class | pqxxobject::row< Place > |
This class stores the details of a single place. It represents a single row in the places database table. The place id number, name and OS grid reference are known. Each may be accessed and changed using the class methods, with the exception of setting the id number (which is set by the backend database).
Definition at line 57 of file places.h.
|
The constructor.
|
|
The constructor.
|
|
The destructor.
|
|
Definition at line 191 of file places.cc. References pqxxobject::field< int >::get_value(), m_gridref, m_id, and m_name. Referenced by refresh_impl(). |
|
Remove a row from a table.
Reimplemented from pqxxobject::row_base. Definition at line 149 of file places.cc. References pqxxobject::transaction::begin(), pqxxobject::transaction::commit(), get_id(), m_id, pqxxobject::row_base::m_state, pqxxobject::transaction::perform(), and pqxxobject::row_base::STATE_UNINITIALISED. |
|
Get the place grid reference.
Definition at line 90 of file places.cc. References m_gridref. Referenced by insert_impl(), and update_impl(). |
|
Get the place id number.
Definition at line 72 of file places.cc. References m_id. Referenced by erase_impl(), refresh_impl(), and update_impl(). |
|
Get the place name.
Definition at line 78 of file places.cc. References m_name. Referenced by insert_impl(), and update_impl(). |
|
Insert a row into a table.
Reimplemented from pqxxobject::row_base. Definition at line 102 of file places.cc. References pqxxobject::transaction::begin(), pqxxobject::transaction::commit(), pqxxobject::transaction::exec(), get_gridref(), get_name(), pqxxobject::field< int >::get_value(), m_id, and pqxxobject::transaction::perform(). |
|
Refresh a row from a table.
Reimplemented from pqxxobject::row_base. Definition at line 166 of file places.cc. References pqxxobject::transaction::begin(), pqxxobject::transaction::commit(), convert_impl(), pqxxobject::transaction::exec(), get_id(), m_id, pqxxobject::row_base::m_state, pqxxobject::row_base::STATE_INITIALISED, and pqxxobject::row_base::STATE_UNINITIALISED. |
|
Set the place grid reference.
Definition at line 96 of file places.cc. References m_gridref. |
|
Set the place name.
Definition at line 84 of file places.cc. References m_name. |
|
Update a row from a table.
Reimplemented from pqxxobject::row_base. Definition at line 132 of file places.cc. References pqxxobject::transaction::begin(), pqxxobject::transaction::commit(), get_gridref(), get_id(), get_name(), and pqxxobject::transaction::perform(). |
|
|
|
Grid Reference.
Definition at line 134 of file places.h. Referenced by convert_impl(), get_gridref(), and set_gridref(). |
|
ID number.
Definition at line 130 of file places.h. Referenced by convert_impl(), erase_impl(), get_id(), insert_impl(), and refresh_impl(). |
|
Name.
Definition at line 132 of file places.h. Referenced by convert_impl(), get_name(), and set_name(). |