#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. | |
pqxxobject::field_proxy_readonly< pqxxobject::field< int > > | field_id () |
const std::string & | get_name () const |
Get the place name. | |
void | set_name (const std::string &name) |
Set the place name. | |
pqxxobject::field_proxy< pqxxobject::field< std::string > > | field_name () |
const std::string & | get_gridref () const |
Get the place grid reference. | |
void | set_gridref (const std::string &gridref) |
Set the place grid reference. | |
pqxxobject::field_proxy< pqxxobject::field< std::string > > | field_gridref () |
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 58 of file places.h.
|
The constructor.
Definition at line 54 of file places.cc. References m_gridref, m_id, m_name, and pqxxobject::field_base::set_column_name(). |
|
The constructor.
Definition at line 64 of file places.cc. References m_gridref, m_id, m_name, and pqxxobject::field_base::set_column_name(). |
|
The destructor.
|
|
Definition at line 219 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 177 of file places.cc. References pqxxobject::transaction::begin(), pqxxobject::transaction::commit(), get_id(), m_id, and pqxxobject::transaction::perform(). |
|
Definition at line 122 of file places.cc. References m_gridref. |
|
Definition at line 86 of file places.cc. References m_id. |
|
Definition at line 104 of file places.cc. References m_name. |
|
Get the place grid reference.
Definition at line 110 of file places.cc. References m_gridref. |
|
Get the place id number.
Definition at line 80 of file places.cc. References m_id. Referenced by erase_impl(), and refresh_impl(). |
|
Get the place name.
Definition at line 92 of file places.cc. References m_name. |
|
Insert a row into a table.
Reimplemented from pqxxobject::row_base. Definition at line 128 of file places.cc. References pqxxobject::insert_query::add(), pqxxobject::transaction::begin(), pqxxobject::transaction::commit(), pqxxobject::transaction::exec(), pqxxobject::field< int >::get_value(), m_gridref, m_id, m_name, and pqxxobject::transaction::perform(). |
|
Refresh a row from a table.
Reimplemented from pqxxobject::row_base. Definition at line 194 of file places.cc. References pqxxobject::transaction::begin(), pqxxobject::transaction::commit(), convert_impl(), pqxxobject::transaction::exec(), get_id(), and m_id. |
|
Set the place grid reference.
Definition at line 116 of file places.cc. References m_gridref. |
|
Set the place name.
Definition at line 98 of file places.cc. References m_name. |
|
Update a row from a table.
Reimplemented from pqxxobject::row_base. Definition at line 156 of file places.cc. References pqxxobject::update_query::add(), pqxxobject::transaction::begin(), pqxxobject::transaction::commit(), m_gridref, m_id, m_name, pqxxobject::transaction::perform(), and pqxxobject::update_query::where(). |
|
|
|
Grid Reference.
Definition at line 144 of file places.h. Referenced by convert_impl(), field_gridref(), get_gridref(), insert_impl(), Place(), set_gridref(), and update_impl(). |
|
ID number.
Definition at line 140 of file places.h. Referenced by convert_impl(), erase_impl(), field_id(), get_id(), insert_impl(), Place(), refresh_impl(), and update_impl(). |
|
Name.
Definition at line 142 of file places.h. Referenced by convert_impl(), field_name(), get_name(), insert_impl(), Place(), set_name(), and update_impl(). |