|
libRocket
|
#include <DataSource.h>
Public Member Functions | |
| DataSource (const Rocket::Core::String &name="") | |
| virtual | ~DataSource () |
| const Rocket::Core::String & | GetDataSourceName () |
| virtual void | GetRow (Rocket::Core::StringList &row, const Rocket::Core::String &table, int row_index, const Rocket::Core::StringList &columns)=0 |
| virtual int | GetNumRows (const Rocket::Core::String &table)=0 |
| void | AttachListener (DataSourceListener *listener) |
| void | DetachListener (DataSourceListener *listener) |
| virtual void * | GetScriptObject () const |
Static Public Member Functions | |
| static DataSource * | GetDataSource (const Rocket::Core::String &data_source_name) |
Static Public Attributes | |
| static const Rocket::Core::String | CHILD_SOURCE |
| static const Rocket::Core::String | DEPTH |
| static const Rocket::Core::String | NUM_CHILDREN |
Protected Types | |
| typedef std::map < Rocket::Core::String, Rocket::Core::String > | RowMap |
| Helper function for building a result set. More... | |
Protected Member Functions | |
| void | NotifyRowAdd (const Rocket::Core::String &table, int first_row_added, int num_rows_added) |
| void | NotifyRowRemove (const Rocket::Core::String &table, int first_row_removed, int num_rows_removed) |
| void | NotifyRowChange (const Rocket::Core::String &table, int first_row_changed, int num_rows_changed) |
| void | NotifyRowChange (const Rocket::Core::String &table) |
| void | BuildRowEntries (Rocket::Core::StringList &row, const RowMap &row_map, const Rocket::Core::StringList &columns) |
Generic object that provides a database-like interface for requesting rows from a table.
|
protected |
Helper function for building a result set.
| Rocket::Controls::DataSource::DataSource | ( | const Rocket::Core::String & | name = "" | ) |
|
virtual |
| void Rocket::Controls::DataSource::AttachListener | ( | DataSourceListener * | listener | ) |
|
protected |
| void Rocket::Controls::DataSource::DetachListener | ( | DataSourceListener * | listener | ) |
|
static |
| const Rocket::Core::String& Rocket::Controls::DataSource::GetDataSourceName | ( | ) |
|
pure virtual |
Fetches the number of rows within one of this data source's tables.
| [in] | table | The name of the table to query. |
|
pure virtual |
Fetches the contents of one row of a table within the data source.
| [out] | row | The list of values in the table. |
| [in] | table | The name of the table to query. |
| [in] | row_index | The index of the desired row. |
| [in] | columns | The list of desired columns within the row. |
|
virtual |
|
protected |
Tells all attached listeners that one or more rows have been added to the data source.
| [in] | table | The name of the table to have rows added to it. |
| [in] | first_row_added | The index of the first row added. |
| [in] | num_rows_added | The number of rows added (including the first row). |
|
protected |
Tells all attached listeners that one or more rows have been changed in the data source.
| [in] | table | The name of the table to have rows changed in it. |
| [in] | first_row_changed | The index of the first row changed. |
| [in] | num_rows_changed | The number of rows changed (including the first row). |
|
protected |
Tells all attached listeners that the row structure has completely changed in the data source.
| [in] | table | The name of the table to have rows changed in it. |
|
protected |
Tells all attached listeners that one or more rows have been removed from the data source.
| [in] | table | The name of the table to have rows removed from it. |
| [in] | first_row_removed | The index of the first row removed. |
| [in] | num_rows_removed | The number of rows removed (including the first row). |
|
static |
|
static |
|
static |
1.8.8