#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 303 of file OptionFile.cpp.
bool OptionFile::GetValue | ( | const std::string | Field, | |
double & | value | |||
) |
Get data from a field.
Definition at line 317 of file OptionFile.cpp.
bool OptionFile::GetValue | ( | const std::string | Field, | |
float & | value | |||
) |
Get data from a field.
Definition at line 335 of file OptionFile.cpp.
bool OptionFile::GetValue | ( | const std::string | Field, | |
short & | value | |||
) |
Get data from a field.
Definition at line 353 of file OptionFile.cpp.
bool OptionFile::GetValue | ( | const std::string | Field, | |
unsigned short & | value | |||
) |
Get data from a field.
Definition at line 377 of file OptionFile.cpp.
bool OptionFile::GetValue | ( | const std::string | Field, | |
int & | value | |||
) |
Get data from a field.
Definition at line 402 of file OptionFile.cpp.
bool OptionFile::GetValue | ( | const std::string | Field, | |
unsigned int & | value | |||
) |
Get data from a field.
Definition at line 424 of file OptionFile.cpp.
bool OptionFile::GetValue | ( | const std::string | Field, | |
bool & | value | |||
) |
Get data from a field.
Definition at line 447 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 512 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 571 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 660 of file OptionFile.cpp.
bool OptionFile::GetComment | ( | const std::string | Field, | |
std::string & | Comment | |||
) |
Get the comment for the field specified.
Definition at line 631 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 645 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 700 of file OptionFile.cpp.
stOption* OptionFile::m_Options [protected] |
unsigned OptionFile::m_nrOptions [protected] |
std::string OptionFile::m_OptionFilePathUsed [protected] |