GOFIGURE2
0.9.0
|
manages a map with keys matching fields of the gofiguredatabase Coordinate table and values of the map matching a row of the Coordinate table More...
#include <Code/IO/GoDBRow/GoDBCoordinateRow.h>
Public Member Functions | |
int | DoesThisCoordinateExist (vtkMySQLDatabase *DatabaseConnector) |
return the CoordID of the coordinate with the same attributes already registered in the DB or -1 if not yet created More... | |
GoDBCoordinateRow () | |
int | SaveInDB (vtkMySQLDatabase *DatabaseConnector) |
save the coordinate in the database and return the ID of the new created coordinate or the ID of the existing one More... | |
~GoDBCoordinateRow () | |
![]() | |
StringMapConstIterator | ConstMapBegin () |
StringMapConstIterator | ConstMapEnd () |
void | DeleteFromDB (vtkMySQLDatabase *iDatabaseConnector) |
delete from the database the row which has the same TableID More... | |
std::string | GetMapValue (const std::string &key) |
return the value for the field map[key] after having removed the " at the beginning and at the end of the value if it is a string in order to get the original value. More... | |
template<typename T > | |
T | GetMapValue (const std::string &key) |
std::string | GetTableIDName () |
std::string | GetTableName () |
std::vector< std::string > | GetVectorColumnNames () |
put all the keys of the map in a vector More... | |
GoDBRow () | |
StringMapIterator | MapBegin () |
StringMapIterator | MapEnd () |
std::string | PrintColumnNames () |
put all the keys of the map in a string separated by ',' More... | |
std::string | PrintColumnNamesWithValues () |
put all the keys and values of the map in a string as map[key] = value separated by ',' More... | |
std::vector< std::string > | PrintColumnsAndValues () |
std::string | PrintValues () |
put all the values of the map in a string separated by ',' More... | |
template<typename T > | |
void | SetField (const std::string &key, const T &value) |
convert the value into a string and assign it to the key in the map More... | |
void | SetField (const std::string &key, const std::string &value) |
set value as the value of map[key] after having put " at the beginning and at the end of the string, as value is a string and it will be needed for the database queries. map[key] = " "value" " More... | |
virtual bool | SetValuesForSpecificID (int ID, vtkMySQLDatabase *iDatabaseConnector) |
get the data from the database corresponding to the specific ID and put them in the map More... | |
virtual | ~GoDBRow () |
Protected Member Functions | |
virtual void | InitializeMap () |
virtual pure. initialize all the values of the map More... | |
![]() | |
void | AddConditions (const std::string &iNameOfField, std::vector< FieldWithValue > &ioFieldWithValue) |
add as an element of ioFieldWithValue the name and value of the map with the key iNameOfField More... | |
Additional Inherited Members | |
![]() | |
typedef StringMapType::const_iterator | StringMapConstIterator |
typedef StringMapType::iterator | StringMapIterator |
typedef std::map< std::string, std::string > | StringMapType |
![]() | |
StringMapType | m_MapRow |
std::string | m_TableIDName |
std::string | m_TableName |
manages a map with keys matching fields of the gofiguredatabase Coordinate table and values of the map matching a row of the Coordinate table
Definition at line 49 of file GoDBCoordinateRow.h.
GoDBCoordinateRow::GoDBCoordinateRow | ( | ) |
Definition at line 38 of file GoDBCoordinateRow.cxx.
|
inline |
Definition at line 54 of file GoDBCoordinateRow.h.
int GoDBCoordinateRow::DoesThisCoordinateExist | ( | vtkMySQLDatabase * | DatabaseConnector | ) |
return the CoordID of the coordinate with the same attributes already registered in the DB or -1 if not yet created
Definition at line 66 of file GoDBCoordinateRow.cxx.
|
protectedvirtual |
virtual pure. initialize all the values of the map
Implements GoDBRow.
Definition at line 48 of file GoDBCoordinateRow.cxx.
int GoDBCoordinateRow::SaveInDB | ( | vtkMySQLDatabase * | DatabaseConnector | ) |
save the coordinate in the database and return the ID of the new created coordinate or the ID of the existing one
Definition at line 85 of file GoDBCoordinateRow.cxx.