Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray::cIniReader Struct Reference

#include <cIniSection.h>

Inheritance diagram for Gray::cIniReader:
Gray::cIniSectionData GrayLib::cScriptFileReader Gray::cIniSection Gray::cIniSectionEntry GrayLib::cScriptSection

Static Public Member Functions

static bool __stdcall IsSectionHeader (const IniChar_t *pszLine)
 
static bool __stdcall IsLineComment (const IniChar_t *pszLine)
 
static IniChar_t *__stdcall FindLineArg (const IniChar_t *pszLine, bool bAllowSpace=false)
 
static StrLen_t __stdcall FindScriptLineEnd (const IniChar_t *pLineStr)
 
static cStringI __stdcall GetLineParse2 (const IniChar_t *pszLine, IniChar_t **ppszArgs=nullptr)
 
static cStringI __stdcall GetLineParse3 (const IniChar_t *pszLine, OUT cStringI &rsArgs)
 

Detailed Description

Helper for reading/parsing an INI file/stream.

Member Function Documentation

◆ FindLineArg()

IniChar_t *GRAYCALL Gray::cIniReader::FindLineArg ( const IniChar_t pszLine,
bool  bAllowSpace = false 
)
static

Find the argument/value portion of a line. "TAG=Args", "TAG: Args" (for HTTP) or "Tag Args" (if bAllowSpace)

Note
this does not strip comments from the end of the line !

◆ FindScriptLineEnd()

StrLen_t GRAYCALL Gray::cIniReader::FindScriptLineEnd ( const IniChar_t pLineStr)
static

Now parse the line for comments and trailing whitespace junk comments are #; as first char or // comment at end of line be careful not to strip http://xx so we require a space after // for comments. Similar to StrT::FindBlockEnd()

Returns
new length of the line. (without ending whitespace and comments)

◆ GetLineParse2()

cStringI GRAYCALL Gray::cIniReader::GetLineParse2 ( const IniChar_t pszLine,
IniChar_t **  ppszArgs = nullptr 
)
static

Parse the pszLine into 2 parts. "TAG=Args" or "Tag Args"

Note
Does NOT clip // comment from end of line.
Returns
Tag/Property/Key text.

◆ GetLineParse3()

cStringI GRAYCALL Gray::cIniReader::GetLineParse3 ( const IniChar_t pszLine,
OUT cStringI rsArgs 
)
static

Parse a line in the format of: "TAG=Value // comments." Clip comments off the end of the arg.

Returns
Tag/Property/Key text. rsArgs = Value.

◆ IsLineComment()

bool GRAYCALL Gray::cIniReader::IsLineComment ( const IniChar_t pszLine)
static

Whole line is just a comment? DOS Bat files might use REM XXX (NOT supported here) :: Comment line

◆ IsSectionHeader()

bool GRAYCALL Gray::cIniReader::IsSectionHeader ( const IniChar_t pszLine)
static

is this line a [section header] of some sort ?


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