#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. | |
virtual void | initialise (pqxx::result::const_iterator row, pqxxobject::transaction &tran) |
Convert a row of an SQL result set into a Place object. | |
virtual void | insert (pqxxobject::transaction &tran) |
Insert a row into a table. | |
virtual void | update (pqxxobject::transaction &tran) |
Update a row from a table. | |
virtual void | erase (pqxxobject::transaction &tran) |
Remove a row from a table. | |
virtual void | refresh (pqxxobject::transaction &tran) |
Refresh a row from a table. | |
Private Attributes | |
pqxxobject::column< int > | m_id |
ID number. | |
pqxxobject::column< std::string > | m_name |
Name. | |
pqxxobject::column< std::string > | m_gridref |
Grid Reference. |
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 39 of file places.h.
|
The constructor.
|
|
The constructor.
|
|
The destructor.
|
|
Remove a row from a table.
Implements pqxxobject::rowconvert. Definition at line 117 of file places.cc. References get_id(), and pqxxobject::transaction::perform(). |
|
Get the place grid reference.
Definition at line 71 of file places.cc. References m_gridref. |
|
Get the place id number.
Definition at line 53 of file places.cc. References m_id. |
|
Get the place name.
Definition at line 59 of file places.cc. References m_name. |
|
Convert a row of an SQL result set into a Place object.
Implements pqxxobject::rowconvert. Definition at line 83 of file places.cc. References pqxxobject::column< int >::get_value(), m_gridref, m_id, and m_name. |
|
Insert a row into a table.
Implements pqxxobject::rowconvert. Definition at line 92 of file places.cc. References get_gridref(), get_name(), and pqxxobject::transaction::perform(). |
|
Refresh a row from a table.
Implements pqxxobject::rowconvert. |
|
Set the place grid reference.
Definition at line 77 of file places.cc. References m_gridref. |
|
Set the place name.
Definition at line 65 of file places.cc. References m_name. |
|
Update a row from a table.
Implements pqxxobject::rowconvert. Definition at line 104 of file places.cc. References get_gridref(), get_id(), get_name(), and pqxxobject::transaction::perform(). |
|
Grid Reference.
Definition at line 121 of file places.h. Referenced by get_gridref(), initialise(), and set_gridref(). |
|
ID number.
Definition at line 117 of file places.h. Referenced by get_id(), and initialise(). |
|
Name.
Definition at line 119 of file places.h. Referenced by get_name(), initialise(), and set_name(). |