abstract class manages a map with keys matching fields of a gofiguredatabase table and values of the map matching a row of a gofiguredatabase table
More...
#include <Code/IO/GoDBRow/GoDBRow.h>
Public Member Functions |
| StringMapConstIterator | ConstMapBegin () |
| StringMapConstIterator | ConstMapEnd () |
| void | DeleteFromDB (vtkMySQLDatabase *iDatabaseConnector) |
| | delete from the database the row which has the same TableID
|
| 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.
|
| 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
|
| | GoDBRow () |
| StringMapIterator | MapBegin () |
| StringMapIterator | MapEnd () |
| std::string | PrintColumnNames () |
| | put all the keys of the map in a string separated by ','
|
| std::string | PrintColumnNamesWithValues () |
| | put all the keys and values of the map in a string as map[key] = value separated by ','
|
| std::vector< std::string > | PrintColumnsAndValues () |
| std::string | PrintValues () |
| | put all the values of the map in a string separated by ','
|
| 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
|
| 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" "
|
| virtual bool | SetValuesForSpecificID (int ID, vtkMySQLDatabase *iDatabaseConnector) |
| | get the data from the database corresponding to the specific ID and put them in the map
|
| virtual | ~GoDBRow () |
Protected Member Functions |
| 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
|
| virtual void | InitializeMap ()=0 |
| | virtual pure. initialize all the values of the map
|
Friends |
| std::ostream & | operator<< (std::ostream &os, const GoDBRow &c) |
| | print the keys and values of the map in a cout
|
Detailed Description
abstract class manages a map with keys matching fields of a gofiguredatabase table and values of the map matching a row of a gofiguredatabase table
Definition at line 55 of file GoDBRow.h.
Member Typedef Documentation
Constructor & Destructor Documentation
Member Function Documentation
| void GoDBRow::AddConditions |
( |
const std::string & |
iNameOfField, |
|
|
std::vector< FieldWithValue > & |
ioFieldWithValue |
|
) |
| |
|
protected |
add as an element of ioFieldWithValue the name and value of the map with the key iNameOfField
- Parameters
-
| [in] | iNameOfField | key of the map |
| [in,out] | ioFieldWithValue | vector of FieldWithValue |
Definition at line 263 of file GoDBRow.cxx.
- Returns
- the iterator at the beginning of the class map as a const
Definition at line 157 of file GoDBRow.cxx.
- Returns
- the iterator at the end of the class map as a const
Definition at line 166 of file GoDBRow.cxx.
| void GoDBRow::DeleteFromDB |
( |
vtkMySQLDatabase * |
iDatabaseConnector | ) |
|
delete from the database the row which has the same TableID
- Parameters
-
| [in] | iDatabaseConnector | connection to the database |
Definition at line 273 of file GoDBRow.cxx.
| std::string GoDBRow::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.
- Parameters
-
| [in] | key | key of the map for which the value is needed |
- Returns
- the corresponding value without "" if the value was a string
Definition at line 174 of file GoDBRow.cxx.
template<typename T >
| T GoDBRow::GetMapValue |
( |
const std::string & |
key | ) |
|
|
inline |
| std::string GoDBRow::GetTableIDName |
( |
| ) |
|
| std::string GoDBRow::GetTableName |
( |
| ) |
|
| std::vector< std::string > GoDBRow::GetVectorColumnNames |
( |
| ) |
|
put all the keys of the map in a vector
- Returns
- all the map keys in a vector
Definition at line 123 of file GoDBRow.cxx.
| virtual void GoDBRow::InitializeMap |
( |
| ) |
|
|
protectedpure virtual |
virtual pure. initialize all the values of the map
Implemented in GoDBMeshRow, GoDBTraceRow, GoDBTrackRow, GoDBContourRow, GoDBNameDescRow, GoDBLineageRow, GoDBBookmarkRow, GoDBIntensityRow, GoDBTrackFamilyRow, GoDBColorRow, GoDBCoordinateRow, GoDBImgSessionRow, GoDBSubCellTypeRow, GoDBAuthorRow, GoDBChannelRow, GoDBCellTypeRow, GoDBImageRow, and GoDBProjectRow.
- Returns
- the iterator at the beginning of the class map
Definition at line 139 of file GoDBRow.cxx.
- Returns
- the iterator at the end of the class map
Definition at line 148 of file GoDBRow.cxx.
| std::string GoDBRow::PrintColumnNames |
( |
| ) |
|
put all the keys of the map in a string separated by ','
- Returns
- all the map keys separated by ',' but without a ',' at the end of the string
Definition at line 87 of file GoDBRow.cxx.
| std::string GoDBRow::PrintColumnNamesWithValues |
( |
| ) |
|
put all the keys and values of the map in a string as map[key] = value separated by ','
- Returns
- all the map [key] = value separated by ',' but without a ',' at the end of the string
Definition at line 103 of file GoDBRow.cxx.
| std::vector< std::string > GoDBRow::PrintColumnsAndValues |
( |
| ) |
|
| std::string GoDBRow::PrintValues |
( |
| ) |
|
put all the values of the map in a string separated by ','
- Returns
- all the map values separated by ',' but without a ',' at the end of the string
Definition at line 71 of file GoDBRow.cxx.
template<typename T >
| void GoDBRow::SetField |
( |
const std::string & |
key, |
|
|
const T & |
value |
|
) |
| |
|
inline |
convert the value into a string and assign it to the key in the map
- Parameters
-
| [in] | key | key of the map |
| [in] | value | value to be assigned to key |
- Template Parameters
-
| T | type of the value, anything but string |
Definition at line 73 of file GoDBRow.h.
| void GoDBRow::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" "
- Parameters
-
| [in] | key | key of the map |
| [in] | value | value to be assigned to key which is a string |
Definition at line 52 of file GoDBRow.cxx.
| bool GoDBRow::SetValuesForSpecificID |
( |
int |
ID, |
|
|
vtkMySQLDatabase * |
iDatabaseConnector |
|
) |
| |
|
virtual |
get the data from the database corresponding to the specific ID and put them in the map
- Parameters
-
| [in] | ID | ID for which the data are needed |
| [in] | iDatabaseConnector | connection to the database |
- Returns
- false if the ID hasn't been found in the database
Reimplemented in GoDBTraceRow.
Definition at line 209 of file GoDBRow.cxx.
Friends And Related Function Documentation
| std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const GoDBRow & |
c |
|
) |
| |
|
friend |
print the keys and values of the map in a cout
- Parameters
-
| [in,out] | os | |
| [in,out] | c | the row to print |
Definition at line 180 of file GoDBRow.h.
Member Data Documentation
| std::string GoDBRow::m_TableIDName |
|
protected |
| std::string GoDBRow::m_TableName |
|
protected |
The documentation for this class was generated from the following files: