#include <optionfile.h>

Definition at line 54 of file optionfile.h.
Public Member Functions | |
| virtual | ~OptionFile () |
| OptionFile destructor. | |
| OptionFile () | |
| The default constructor. | |
| OptionFile (OptionFile &rhs) | |
| The disabled copy constructor. | |
| bool | ReadOptionFile (const std::string OptionFilePath) |
| Reads in the options. | |
| bool | GetValue (const std::string Field, std::string &Value) |
| Get data from a field. | |
| bool | GetValue (const std::string Field, double &value) |
| Get data from a field. | |
| bool | GetValue (const std::string Field, float &value) |
| Get data from a field. | |
| bool | GetValue (const std::string Field, short &value) |
| Get data from a field. | |
| bool | GetValue (const std::string Field, unsigned short &value) |
| Get data from a field. | |
| bool | GetValue (const std::string Field, int &value) |
| Get data from a field. | |
| bool | GetValue (const std::string Field, unsigned int &value) |
| Get data from a field. | |
| bool | GetValue (const std::string Field, bool &value) |
| Get data from a field. | |
| bool | GetValueArray (const std::string Field, int *intArray, const unsigned maxItems, unsigned &nrItems) |
| Get an array of integers up to a maximum number of items. | |
| bool | GetValueArray (const std::string Field, double *dArray, const unsigned maxItems, unsigned &nrItems) |
| Get an array of double up to a maximum number of items. | |
| bool | GetDMSValue (const std::string Field, double &dms) |
| Get a double value in degress from a Degree Minutes Seconds value. | |
| bool | GetComment (const std::string Field, std::string &Comment) |
| Get the comment for the field specified. | |
| bool | GetPostValueComment (const std::string Field, std::string &PostValueComment) |
| Get the comment for the field specified present after the VALUE field. i.e. FIELD, COMMENT = VALUE ; POST-VALUE-COMMENT. | |
| unsigned | GetNumberOfOptions () |
| Get the number of options available. | |
| const OptionFile & | operator= (const OptionFile &src) |
| Disabled operator= overload. | |
Protected Member Functions | |
| bool | DoesFileExist (const std::string &OptionFilePath) |
| |
| bool | FindField (const std::string &Field, std::string &Comment, std::string &Value, std::string &PostValueComment) |
| |
Protected Attributes | |
| stOption * | m_Options |
| The array of options. | |
| unsigned | m_nrOptions |
| The number of valid options. | |
| std::string | m_OptionFilePathUsed |
| The path to the option file. | |
| OptionFile::~OptionFile | ( | ) | [virtual] |
| OptionFile::OptionFile | ( | ) |
| OptionFile::OptionFile | ( | OptionFile & | rhs | ) | [inline] |
| bool OptionFile::ReadOptionFile | ( | const std::string | OptionFilePath | ) |
Reads in the options.
Definition at line 70 of file OptionFile.cpp.
| bool OptionFile::GetValue | ( | const std::string | Field, | |
| std::string & | Value | |||
| ) |
Get data from a field.
Definition at line 268 of file OptionFile.cpp.
| bool OptionFile::GetValue | ( | const std::string | Field, | |
| double & | value | |||
| ) |
Get data from a field.
Definition at line 282 of file OptionFile.cpp.
| bool OptionFile::GetValue | ( | const std::string | Field, | |
| float & | value | |||
| ) |
Get data from a field.
Definition at line 300 of file OptionFile.cpp.
| bool OptionFile::GetValue | ( | const std::string | Field, | |
| short & | value | |||
| ) |
Get data from a field.
Definition at line 318 of file OptionFile.cpp.
| bool OptionFile::GetValue | ( | const std::string | Field, | |
| unsigned short & | value | |||
| ) |
Get data from a field.
Definition at line 342 of file OptionFile.cpp.
| bool OptionFile::GetValue | ( | const std::string | Field, | |
| int & | value | |||
| ) |
Get data from a field.
Definition at line 367 of file OptionFile.cpp.
| bool OptionFile::GetValue | ( | const std::string | Field, | |
| unsigned int & | value | |||
| ) |
Get data from a field.
Definition at line 389 of file OptionFile.cpp.
| bool OptionFile::GetValue | ( | const std::string | Field, | |
| bool & | value | |||
| ) |
Get data from a field.
Definition at line 412 of file OptionFile.cpp.
| bool OptionFile::GetValueArray | ( | const std::string | Field, | |
| int * | intArray, | |||
| const unsigned | maxItems, | |||
| unsigned & | nrItems | |||
| ) |
Get an array of integers up to a maximum number of items.
| Field | The field identifier |
| intArray | The pointer to the integer array. |
| maxItems | The maximum number of elements in the array. |
| nrItems | The number of valid items read into the array. |
Definition at line 477 of file OptionFile.cpp.
| bool OptionFile::GetValueArray | ( | const std::string | Field, | |
| double * | dArray, | |||
| const unsigned | maxItems, | |||
| unsigned & | nrItems | |||
| ) |
Get an array of double up to a maximum number of items.
| Field | The field identifier |
| dArray | The pointer to the integer array. |
| maxItems | The maximum number of elements in the array. |
| nrItems | The number of valid items read into the array. |
Definition at line 536 of file OptionFile.cpp.
| bool OptionFile::GetDMSValue | ( | const std::string | Field, | |
| double & | dms | |||
| ) |
Get a double value in degress from a Degree Minutes Seconds value.
Definition at line 625 of file OptionFile.cpp.
| bool OptionFile::GetComment | ( | const std::string | Field, | |
| std::string & | Comment | |||
| ) |
Get the comment for the field specified.
Definition at line 596 of file OptionFile.cpp.
| bool OptionFile::GetPostValueComment | ( | const std::string | Field, | |
| std::string & | PostValueComment | |||
| ) |
Get the comment for the field specified present after the VALUE field. i.e. FIELD, COMMENT = VALUE ; POST-VALUE-COMMENT.
Definition at line 610 of file OptionFile.cpp.
| unsigned OptionFile::GetNumberOfOptions | ( | ) | [inline] |
Get the number of options available.
Definition at line 149 of file optionfile.h.
| const OptionFile& OptionFile::operator= | ( | const OptionFile & | src | ) | [inline] |
| bool OptionFile::DoesFileExist | ( | const std::string & | OptionFilePath | ) | [protected] |
| bool OptionFile::FindField | ( | const std::string & | Field, | |
| std::string & | Comment, | |||
| std::string & | Value, | |||
| std::string & | PostValueComment | |||
| ) | [protected] |
Definition at line 665 of file OptionFile.cpp.
stOption* OptionFile::m_Options [protected] |
unsigned OptionFile::m_nrOptions [protected] |
std::string OptionFile::m_OptionFilePathUsed [protected] |