#include <TableDef.h>
Public Member Functions | |
TableDef (std::string name) | |
Constructs a new TableDef with the specified name. | |
~TableDef () | |
Destructor, a noop. | |
cstring | getName () const |
Returns the name of this table. | |
void | addPK (const std::string &name) |
Adds a primary key with the specified name. | |
void | addFPK (TableDefPtr table) |
Adds a foreign key to the specified table. | |
void | addFPK (TableDefPtr table, const std::string &suffix) |
Adds a foreign key to the specified table with the specified suffix. | |
void | addValue (const std::string &name) |
Adds an integer value with the specified name. | |
void | addValue (const std::string &name, value_type defaultvalue) |
Adds an integer valueu with the specified name and default value. | |
void | addTextField (const std::string &name) |
Adds a text value with the specified name. | |
void | addLookupTextField (const std::string &name) |
Adds a text value with the specified name and provide lookup. | |
void | addTextField (const std::string &name, const std::string &defaulttext) |
Adds a text valueu with the specified name and default value. | |
void | addFK (TableDefPtr table) |
Adds a foreign key field. | |
void | addFK (TableDefPtr table, const std::string &suffix) |
Adds a foreign key field with the specified suffix. | |
const std::string & | tableForeignName () const |
Returns the foreign name of keys to this table. | |
FieldDefVector::const_iterator | begin () const |
Returns an iterator to the first element of the FieldDef's of this table. | |
FieldDefVector::const_iterator | end () const |
Return an iterator to the 'end' iterator of the FieldDef's of this table. | |
size_t | size () const |
Returns the size of the FieldDef's of this table. | |
size_t | primarykeysize () const |
Retursn the amount of primary keys this table has. |
Based on this class TableImpl's will be generated.
Definition at line 37 of file TableDef.h.
TableDef::TableDef | ( | std::string | name | ) |
Constructs a new TableDef with the specified name.
TableDef::~TableDef | ( | ) |
Destructor, a noop.
cstring TableDef::getName | ( | ) | const |
Returns the name of this table.
void TableDef::addPK | ( | const std::string & | name | ) |
Adds a primary key with the specified name.
void TableDef::addFPK | ( | TableDefPtr | table | ) |
Adds a foreign key to the specified table.
void TableDef::addFPK | ( | TableDefPtr | table, | |
const std::string & | suffix | |||
) |
Adds a foreign key to the specified table with the specified suffix.
void TableDef::addValue | ( | const std::string & | name | ) |
Adds an integer value with the specified name.
void TableDef::addValue | ( | const std::string & | name, | |
value_type | defaultvalue | |||
) |
Adds an integer valueu with the specified name and default value.
void TableDef::addTextField | ( | const std::string & | name | ) |
Adds a text value with the specified name.
void TableDef::addLookupTextField | ( | const std::string & | name | ) |
Adds a text value with the specified name and provide lookup.
This field should at all times be unique. However, this is not enforced and as such lookups based on this fields are not guaranteed to always return the same value.
void TableDef::addTextField | ( | const std::string & | name, | |
const std::string & | defaulttext | |||
) |
Adds a text valueu with the specified name and default value.
void TableDef::addFK | ( | TableDefPtr | table | ) |
Adds a foreign key field.
void TableDef::addFK | ( | TableDefPtr | table, | |
const std::string & | suffix | |||
) |
Adds a foreign key field with the specified suffix.
const std::string& TableDef::tableForeignName | ( | ) | const |
Returns the foreign name of keys to this table.
FieldDefVector::const_iterator TableDef::begin | ( | ) | const [inline] |
Returns an iterator to the first element of the FieldDef's of this table.
Definition at line 92 of file TableDef.h.
FieldDefVector::const_iterator TableDef::end | ( | ) | const [inline] |
Return an iterator to the 'end' iterator of the FieldDef's of this table.
Definition at line 95 of file TableDef.h.
size_t TableDef::size | ( | ) | const [inline] |
size_t TableDef::primarykeysize | ( | ) | const [inline] |