#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. | |
Static Public Member Functions | |
row_ptr | create (pqxx::result::const_iterator row, pqxxobject::transaction &tran) |
Convert a row of an SQL result set into a Place object. | |
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. | |
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.
|
|
Convert a row of an SQL result set into a Place object.
|
|
Remove a row from a table.
Definition at line 119 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. Referenced by insert_impl(), and update_impl(). |
|
Get the place id number.
Definition at line 53 of file places.cc. References m_id. Referenced by erase_impl(), and update_impl(). |
|
Get the place name.
Definition at line 59 of file places.cc. References m_name. Referenced by insert_impl(), and update_impl(). |
|
Insert a row into a table.
Definition at line 94 of file places.cc. References get_gridref(), get_name(), and pqxxobject::transaction::perform(). |
|
Refresh a row from a table.
|
|
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.
Definition at line 106 of file places.cc. References get_gridref(), get_id(), get_name(), and pqxxobject::transaction::perform(). |
|
Grid Reference.
Definition at line 122 of file places.h. Referenced by get_gridref(), and set_gridref(). |
|
ID number.
Definition at line 118 of file places.h. Referenced by get_id(). |
|
Name.
Definition at line 120 of file places.h. Referenced by get_name(), and set_name(). |