
#include <Util/readConfig.H>
Collaboration diagram for readConfig:

This class works to open a file for parsing which has name value key pairs. Each pair is seperated and loaded into a vector. Values can then be retrieved by either calling a values item number or name. This will then return the value. Comments can be handeled in the config file so long as they are in the form '# words #'. That is place a # with a space before and after each comment.
Definition at line 64 of file readConfig.H.
Public Member Functions | |
| readConfig () | |
| constructor with initial size = 25 | |
| readConfig (int size) | |
| constructor with initial size | |
| ~readConfig () | |
| destructor for readConfig | |
| void | openFile (const char *filename, bool echo=false) |
| open a config file with filename | |
| void | writeFile () |
| write the file back to disk as filename | |
| void | writeFile (const char *filename) |
| write the file back to disk with a new file name | |
| bool | readFileTrue (int itemNumber) |
| returns true if item number itemNumber exists | |
| int | readFileValueI (int itemNumber) |
| return value of item as an integer | |
| float | readFileValueF (int itemNumber) |
| return value of item as a float | |
| std::string | readFileValueS (int itemNumber) |
| return value of item as a string | |
| const char * | readFileValueC (int itemNumber) |
| return value of item as a C style char* | |
| std::string | readFileValueName (int itemNumber) |
| return the item name | |
| const char * | readFileValueNameC (int itemNumber) |
| return item name as a C style char* | |
| float | readFileValueNameF (int itemNumber) |
| return item name as a float | |
| float | getItemValueF (std::string itemName) |
| return the float value of a number with name itemName | |
| std::string | getItemValueS (std::string itemName) |
| return the string value of a number with name itemName | |
| bool | getItemValueB (std::string itemName) |
| return a bool representation of the value 1 = true else false | |
| const char * | getItemValueC (std::string itemName) |
| return the char* value of a number with name itemName | |
| void | setItemValue (std::string itemName, float _set) |
| Set the item with string name itemName to a float _set. | |
| void | setItemValue (std::string itemName, std::string _set) |
| Set the item with string name itemName to a string _set. | |
| void | setItemValue (std::string itemName, const char *_set) |
| Set the item with string name itemName to a const char* _set. | |
| void | setFileValue (int itemNumber, float _set) |
| Set the item signified by its number to a float. | |
| void | setFileValue (int itemNumber, std::string _set) |
| Set the item signified by its number to a string. | |
| void | setFileValue (int itemNumber, const char *_set) |
| Set the item signified by its number to a const char*. | |
| int | addItemValue (std::string itemName, float _set) |
| Set the item with string name itemName to a float _set. | |
| int | addItemValue (std::string itemName, std::string _set) |
| Set the item with string name itemName to a string _set. | |
| int | addItemValue (std::string itemName, const char *_set) |
| Set the item with string name itemName to a string _set. | |
| int | itemCount () |
| returns how many items exist | |
|
|
constructor with initial size = 25
Definition at line 51 of file readConfig.C. |
|
|
constructor with initial size
Definition at line 60 of file readConfig.C. |
|
|
destructor for readConfig
Definition at line 68 of file readConfig.C. |
|
||||||||||||
|
Set the item with string name itemName to a string _set.
Definition at line 361 of file readConfig.C. References addItemValue(). |
|
||||||||||||
|
Set the item with string name itemName to a string _set.
Definition at line 344 of file readConfig.C. References LINFO. |
|
||||||||||||
|
Set the item with string name itemName to a float _set.
Definition at line 339 of file readConfig.C. References sformat(). Referenced by addItemValue(). |
|
|
return a bool representation of the value 1 = true else false
Definition at line 239 of file readConfig.C. Referenced by featureClusterVision< FLOAT >::fCVsetUpfCV(), ScaleRemoveSurprise< FLOAT >::ScaleRemoveSurprise(), segmentImageTrackMC::segmentImageTrackMC(), and ScaleSurpriseControl< FLOAT >::SSCreadConfig(). |
|
|
return the char* value of a number with name itemName
Definition at line 259 of file readConfig.C. Referenced by main(). |
|
|
return the float value of a number with name itemName
Definition at line 205 of file readConfig.C. Referenced by ContourNeuronCreate< TC2 >::CreateNeuron(), featureClusterVision< FLOAT >::fCVsetUpfCV(), SimulationViewerNerdCam::init(), ColorSegmenter::isolateOrange(), main(), NPclassify::NPclassify(), NPclassify2< FLOAT >::NPsetup(), segmentImageMerge2::resetAll(), Omni< T >::run(), ScaleRemoveSurprise< FLOAT >::ScaleRemoveSurprise(), segmentImageMerge2::segmentImageMerge2(), segmentImageTrackMC::segmentImageTrackMC(), CINNICstatsRun::setConfig(), BeoSubCross::setupOrangeTracker(), and ScaleSurpriseControl< FLOAT >::SSCreadConfig(). |
|
|
return the string value of a number with name itemName
Definition at line 222 of file readConfig.C. Referenced by featureClusterVision< FLOAT >::fCVsetUpfCV(), SimulationViewerNerdCam::init(), and CINNICstatsRun::setConfig(). |
|
|
returns how many items exist
Definition at line 367 of file readConfig.C. Referenced by main(), CINNICstatsRun::runStandardStats(), and CINNICstatsRun::setStuff(). |
|
||||||||||||
|
|
returns true if item number itemNumber exists
Definition at line 151 of file readConfig.C. Referenced by main(), CINNICstatsRun::runPointAndFlood(), and CINNICstatsRun::runStandardStats(). |
|
|
return value of item as a C style char*
Definition at line 181 of file readConfig.C. References ASSERT. Referenced by CINNICstatsRun::runPointAndFlood(), and CINNICstatsRun::runStandardStats(). |
|
|
return value of item as a float
Definition at line 169 of file readConfig.C. References ASSERT. Referenced by main(). |
|
|
return value of item as an integer
Definition at line 163 of file readConfig.C. References ASSERT. |
|
|
return the item name
Definition at line 187 of file readConfig.C. References ASSERT. Referenced by main(). |
|
|
return item name as a C style char*
Definition at line 193 of file readConfig.C. References ASSERT. Referenced by CINNICstatsRun::runPointAndFlood(), and CINNICstatsRun::runStandardStats(). |
|
|
return item name as a float
Definition at line 199 of file readConfig.C. References ASSERT. Referenced by main(). |
|
|
return value of item as a string
Definition at line 175 of file readConfig.C. References ASSERT. |
|
||||||||||||
|
Set the item signified by its number to a const char*.
Definition at line 333 of file readConfig.C. References ASSERT. |
|
||||||||||||
|
Set the item signified by its number to a string.
Definition at line 327 of file readConfig.C. References ASSERT. |
|
||||||||||||
|
Set the item signified by its number to a float.
Definition at line 321 of file readConfig.C. |
|
||||||||||||
|
Set the item with string name itemName to a const char* _set.
Definition at line 306 of file readConfig.C. |
|
||||||||||||
|
Set the item with string name itemName to a string _set.
Definition at line 291 of file readConfig.C. |
|
||||||||||||
|
Set the item with string name itemName to a float _set.
Definition at line 276 of file readConfig.C. |
|
|
write the file back to disk with a new file name
Definition at line 138 of file readConfig.C. |
|
|
write the file back to disk as filename
Definition at line 125 of file readConfig.C. |
1.4.4