Main Page Class Hierarchy Compound List File List Compound Members File Members

# ConfigSource Class Reference

`#include <configsource.h>`

Inheritance diagram for ConfigSource:

List of all members.

## Public Member Functions
| ConfigSource ()
| ~ConfigSource ()
virtual void | Close ()
virtual int | ReadLine ()
const char * | GetCurrentLine ()
char * | NextToken ()
const char * | GetCurrentToken ()
char * | GetToken (int n, int off)
char * | GetToken (int n)
int | Load (const char *p_cmd)
int | Error (char **p_textual=NULL)
bool | IsTokenNull ()
char * | String ()
int | Int ()
int | Int (int n)
int | Int (int n, int off)
long | Long ()
long | Long (int n)
long | Long (int n, int off)
double | Double ()
double | Double (int n)
double | Double (int n, int off)
bool | Its (const char *p_str)
## Static Public Attributes
int | INVALID_INT = INT_MIN
long | INVALID_LONG = LONG_MIN
double | INVALID_DOUBLE = DBL_MIN
## Protected Attributes
int | ReadMode
char | curr_token [MAX_TOKEN_LENGTH+1]
int | LastError
int | LineParseIndex
char | CurrentLine [MAX_LINE_LENGTH+1]
char | Token [100]
bool | TokenIsNull
char | LastMessage [120]

## Constructor & Destructor Documentation

ConfigSource::ConfigSource | ( |  | ) |

| Definition at line 15 of file configsource.cpp. References CS_MODE_COMMAND, LastError, LineParseIndex, ReadMode, and TokenIsNull.

ConfigSource::~ConfigSource | ( |  | ) |

| Definition at line 26 of file configsource.cpp. References Close().

## Member Function Documentation

virtual void ConfigSource::Close | ( |  | ) | `[inline, virtual]`

| Reimplemented in TComFileParser. Definition at line 61 of file configsource.h. Referenced by ~ConfigSource().

double ConfigSource::Double | ( | int | n,
|  | int | off
| ) |

| Definition at line 268 of file configsource.cpp. References GetToken(), and INVALID_DOUBLE.

double ConfigSource::Double | ( | int | n | ) |

| Definition at line 264 of file configsource.cpp. References Double().

double ConfigSource::Double | ( |  | ) |

| Definition at line 254 of file configsource.cpp. References INVALID_DOUBLE, and NextToken(). Referenced by Double().

int ConfigSource::Error | ( | char ** | p_textual = NULL | ) |

| Definition at line 192 of file configsource.cpp. References LastError, and LastMessage. Referenced by TGlobalUtils::LoadFiles(), and TModuleBase::Run().

const char* ConfigSource::GetCurrentLine | ( |  | ) | `[inline]`

| Definition at line 66 of file configsource.h. Referenced by WormServerBase::HandleConfigLine(), TModuleBase::HandleConfigLine(), CMFCDialogModuleBase::HandleConfigLine(), TGlobalUtils::HandleConfigLine(), TGlobalUtils::LoadFiles(), and TModuleBase::Run().

const char* ConfigSource::GetCurrentToken | ( |  | ) | `[inline]`

| Definition at line 68 of file configsource.h.

char * ConfigSource::GetToken | ( | int | n | ) |

| Definition at line 173 of file configsource.cpp. References GetToken().

char * ConfigSource::GetToken | ( | int | n,
|  | int | off
| ) |

| Definition at line 142 of file configsource.cpp. References CurrentLine, LineParseIndex, and Token. Referenced by Double(), GetToken(), Int(), and Long().

int ConfigSource::Int | ( | int | n,
|  | int | off
| ) |

| Definition at line 222 of file configsource.cpp. References GetToken(), and INVALID_INT.

int ConfigSource::Int | ( | int | n | ) |

| Definition at line 218 of file configsource.cpp. References Int().

int ConfigSource::Int | ( |  | ) |

| Definition at line 208 of file configsource.cpp. References INVALID_INT, and NextToken(). Referenced by WormServerBase::HandleConfigLine(), RingReaderServer::HandleConfigLine(), MutableServerBase::HandleConfigLine(), TModuleBase::HandleConfigLine(), CMFCDialogModuleBase::HandleConfigLine(), TGlobalUtils::HandleConfigLine(), ServerTemplate::HandleParameterLine(), Int(), and TGlobalUtils::ParseLookupLine().

bool ConfigSource::IsTokenNull | ( |  | ) | `[inline]`

| Definition at line 73 of file configsource.h. Referenced by ServerTemplate::HandleConfigLine(), ServerTemplate::HandleParameterLine(), and TGlobalUtils::LoadFiles().

bool ConfigSource::Its | ( | const char * | p_str | ) |

| Definition at line 277 of file configsource.cpp. Referenced by WormServerBase::HandleConfigLine(), ServerTemplate::HandleConfigLine(), RingReaderServer::HandleConfigLine(), MutableServerBase::HandleConfigLine(), TModuleBase::HandleConfigLine(), CMFCDialogModuleBase::HandleConfigLine(), TGlobalUtils::HandleConfigLine(), DBMutableServer::HandleConfigLine(), ServerTemplate::HandleParameterLine(), and TGlobalUtils::ParseLookupLine().

int ConfigSource::Load | ( | const char * | p_cmd | ) |

| Definition at line 178 of file configsource.cpp. References CS_MODE_COMMAND, LastError, LineParseIndex, MAX_LINE_LENGTH, and ReadMode. Referenced by ServerTemplate::ProcessRequest().

long ConfigSource::Long | ( | int | n,
|  | int | off
| ) |

| Definition at line 245 of file configsource.cpp. References GetToken(), and INVALID_INT.

long ConfigSource::Long | ( | int | n | ) |

| Definition at line 241 of file configsource.cpp. References Long().

long ConfigSource::Long | ( |  | ) |

| Definition at line 231 of file configsource.cpp. References INVALID_LONG, and NextToken(). Referenced by TGlobalUtils::HandleConfigLine(), Long(), and TGlobalUtils::ParseLookupLine().

char * ConfigSource::NextToken | ( |  | ) |

| Definition at line 31 of file configsource.cpp. References CurrentLine, LastError, LineParseIndex, Token, and TokenIsNull. Referenced by Double(), Int(), TGlobalUtils::LoadFiles(), Long(), main(), CMFCDialogAppBase::ParseCommandFile(), TGlobalUtils::ParseLookupLine(), TComFileParser::ReadLine(), TModuleBase::Run(), and String().

virtual int ConfigSource::ReadLine | ( |  | ) | `[inline, virtual]`

| Reimplemented in TComFileParser, and OracleConfigSource. Definition at line 64 of file configsource.h. References COMFILE_EOF.

char * ConfigSource::String | ( |  | ) |

| Definition at line 203 of file configsource.cpp. References NextToken(). Referenced by WormServerBase::HandleConfigLine(), ServerTemplate::HandleConfigLine(), RingReaderServer::HandleConfigLine(), MutableServerBase::HandleConfigLine(), TModuleBase::HandleConfigLine(), CMFCDialogModuleBase::HandleConfigLine(), TGlobalUtils::HandleConfigLine(), DBMutableServer::HandleConfigLine(), ServerTemplate::HandleParameterLine(), and TGlobalUtils::ParseLookupLine().

## Member Data Documentation

char ConfigSource::curr_token[MAX_TOKEN_LENGTH+1]`[protected]`

| Definition at line 44 of file configsource.h.

char ConfigSource::CurrentLine[MAX_LINE_LENGTH+1]`[protected]`

| Definition at line 50 of file configsource.h. Referenced by GetToken(), and NextToken().

double ConfigSource::INVALID_DOUBLE = DBL_MIN`[static]`

| Definition at line 9 of file configsource.cpp. Referenced by Double().

int ConfigSource::INVALID_INT = INT_MIN`[static]`

| Definition at line 7 of file configsource.cpp. Referenced by TModuleBase::CheckConfig(), WormServerBase::HandleConfigLine(), MutableServerBase::HandleConfigLine(), TModuleBase::HandleConfigLine(), TGlobalUtils::HandleConfigLine(), ServerTemplate::HandleParameterLine(), Int(), Long(), and TGlobalUtils::ParseLookupLine().

long ConfigSource::INVALID_LONG = LONG_MIN`[static]`

| Definition at line 8 of file configsource.cpp. Referenced by TGlobalUtils::HandleConfigLine(), Long(), and TGlobalUtils::ParseLookupLine().

int ConfigSource::LastError`[protected]`

| Definition at line 46 of file configsource.h. Referenced by ConfigSource(), Error(), Load(), OracleConfigSource::LoadFromDB(), NextToken(), TComFileParser::Open(), OracleConfigSource::ReadLine(), and TComFileParser::ReadLine().

char ConfigSource::LastMessage[120]`[protected]`

| Definition at line 55 of file configsource.h. Referenced by Error(), OracleConfigSource::LoadFromDB(), and OracleConfigSource::ReadLine().

int ConfigSource::LineParseIndex`[protected]`

| Definition at line 48 of file configsource.h. Referenced by ConfigSource(), GetToken(), Load(), OracleConfigSource::LoadFromDB(), NextToken(), OracleConfigSource::ReadLine(), and TComFileParser::ReadLine().

int ConfigSource::ReadMode`[protected]`

| Definition at line 42 of file configsource.h. Referenced by ConfigSource(), TComFileParser::DesignateArchive(), Load(), TComFileParser::Open(), and TComFileParser::TComFileParser().

char ConfigSource::Token[100]`[protected]`

| Definition at line 52 of file configsource.h. Referenced by GetToken(), OracleConfigSource::LoadFromDB(), NextToken(), and OracleConfigSource::ReadLine().

bool ConfigSource::TokenIsNull`[protected]`

| Definition at line 53 of file configsource.h. Referenced by ConfigSource(), and NextToken().

The documentation for this class was generated from the following files:

- configsource.h
- configsource.cpp