GlobalObjects
|
A section can only appear once in an INI file, is enclosed in square brackets and usually has variables with values. More...
#include <IniSection.h>
Public Member Functions | |
Section (const std::string &sCharLine) | |
virtual | ~Section () |
int | getKeyLine (Line *&prRetVal, const std::string &sValueVariable) |
int | getKeyValue (std::string &rsValue, const std::string sValueVariable) |
std::string | getName () const |
int | getSectionLine (Line *&prRetVal, std::size_t nPosition, ptl::SeekMode eMode) |
std::size_t | getSectionSize () |
int | insertSectionLine (Line *pIniLine, ptl::InsertPosition eInsertPosition=ptl::InsertCURRENT, ptl::VH eBeforeBehind=ptl::BEHIND) |
void | removeAllSectionLines () |
int | removeSectionLine (ptl::ElementPosition eFirstLastCurrent=ptl::CURRENT_POS) |
void | setName (const std::string &sName) |
Public Member Functions inherited from ini::Line | |
Line (const std::string &sCharLine) | |
virtual | ~Line () |
std::size_t | getLineSizeWithEOL () const |
std::string | getText () const |
LINE_TYPE | getType () const |
void | setText (std::string sCharLine) |
Protected Member Functions | |
Section () | |
Section (const std::string &sCharLine, LINE_TYPE eLineType) | |
int | insertSectionInBlob (eut::Blob &rBlob) |
Protected Member Functions inherited from ini::Line | |
Line () | |
Line (const std::string &sCharLine, LINE_TYPE eLineType) | |
char * | getTextWithEOL () const |
Private Member Functions | |
Section (const Section &) | |
Section & | operator= (const Section &) |
Private Attributes | |
ptl::TDVList< Line > | m_SektionList |
Friends | |
class | File |
class | LineFactory |
Additional Inherited Members | |
Protected Attributes inherited from ini::Line | |
LINE_TYPE | m_eLineType |
LineFactory | m_LineFactory |
std::string | m_sText |
A section can only appear once in an INI file, is enclosed in square brackets and usually has variables with values.
ini::Section::Section | ( | const std::string & | sCharLine | ) |
Constructor with parameter passing.
[in] | sCharLine | The text of the entry. |
|
virtual |
Destructor.
|
protected |
This constructor with parameter passing is not publicly available.
[in] | sCharLine | The text of the entry. |
[in] | eLineType | The type of the entry, the calling instance must have determined the correct type, here IniSECTION. |
|
protected |
The standard constructor is not publicly available.
|
private |
The copy constructor is not available.
int ini::Section::getKeyLine | ( | Line *& | prRetVal, |
const std::string & | sValueVariable ) |
This method returns a pointer to a Line from this section.
[in,out] | prRetVal | The found Line |
[in] | sValueVariable | The searched variable or value [386enh]
woafont=app850.fon <- Variable (woafont) with value
Test123 <- Value
|
int ini::Section::getKeyValue | ( | std::string & | rsValue, |
const std::string | sValueVariable ) |
This method returns a string corresponding to the value of the variable from the second parameter, from this section.
[in,out] | rsValue | The found KeyValue as string. |
[in] | sValueVariable | The searched variable or value |
std::string ini::Section::getName | ( | ) | const |
Returns the name of the INI section.
int ini::Section::getSectionLine | ( | Line *& | prRetVal, |
std::size_t | nPosition, | ||
ptl::SeekMode | eMode ) |
Returns an Line from the m_SektionList with respect to the pass parameters.
[in,out] | prRetVal | passed reference into which the found object "comes". |
[in] | nPosition | Offset relative to... |
[in] | eMode | ...Position |
Parameter examples:
std::size_t ini::Section::getSectionSize | ( | ) |
Returns the section size from the current entries and itself (including the EOLines).
|
protected |
Appends its own section text and its own entries to the blob passed.
[in,out] | rBlob | This blob is expanded. |
int ini::Section::insertSectionLine | ( | Line * | pIniLine, |
ptl::InsertPosition | eInsertPosition = ptl::InsertCURRENT, | ||
ptl::VH | eBeforeBehind = ptl::BEHIND ) |
Inserts the transferred entry into the m_SektionList.
[in] | pIniLine | The object of the class Line to be inserted, |
[in] | eInsertPosition | Shows where the data object is inserted in the list is to be inserted. Possible parameters are ptl::InsertHEAD (on start), ptl::InsertLAST (at the end) or ptl::InsertCURRENT (at the current element). |
[in] | eBeforeBehind | Specifies whether the new element is before or after the, element specified in the eInsertPosition parameter. Possible Parameters are ptl::BEHIND and ptl::BEFORE |
The assignment operator is not available.
void ini::Section::removeAllSectionLines | ( | ) |
Removes all entries from the m_SektionList. The destructor is called from each entry.
int ini::Section::removeSectionLine | ( | ptl::ElementPosition | eFirstLastCurrent = ptl::CURRENT_POS | ) |
Removes the entry from the m_SektionList.
If a subsequent element exists, it becomes the current element, otherwise the previous element, if it exists. The destructor is called from the remote entry.
[in] | eFirstLastCurrent | The following values are possible: ptl::FIRST_POS, ptl::LAST_POS, (default) ptl::CURRENT_POS, ptl::NEXT_POS and ptl::PREVIOUS_POS. |
void ini::Section::setName | ( | const std::string & | sName | ) |
Sets the text of the INI entry.
[in] | sName | The name as string without "[" and "]". |
|
friend |
|
friend |
|
private |
List of entries in this section.