GlobalObjects
Loading...
Searching...
No Matches
ini Namespace Reference

Classes

class  File
 An INI file contains information for programs. More...
 
class  Key
 A variable with value possibly also in a section like "Pixel=1024". Variable and value are separated by a "=". More...
 
class  Line
 Is a comment line, but also superclass for Section and Key. More...
 
class  LineFactory
 This class turns lines of an INI file into objects of the types Line, Section or Key. More...
 
class  Section
 A section can only appear once in an INI file, is enclosed in square brackets and usually has variables with values. More...
 

Typedefs

typedef bool TdOpenInifileMode
 

Enumerations

enum  ERRORS {
  READ_ERROR = -15501 , WRITE_ERROR = -15502 , PARAMETER_NULL_FORBIDDEN = -15503 , CREATE = -15504 ,
  CAST = -15505 , KEY_NOT_EXISTING = -15506 , SECTION_NOT_EXISTING = -15507 , SECTION_ALLREADY_EXISTING = -15508 ,
  NO_FILENAME = -15509 , UNKNOWN = -15600
}
 Error range = -15501 to -15600 More...
 
enum  LINE_TYPE {
  IniUNDEFINED , IniSECTION , IniCOMMENT , IniVARIABLE ,
  IniEMPTY_LINE
}
 

Variables

const TdOpenInifileMode bCreateInifile = false
 
const TdOpenInifileMode bOpenInifile = true
 
const std::string g_sEOL = "\n"
 
const std::string g_sIniFileVersion = "1.0.2"
 

Typedef Documentation

◆ TdOpenInifileMode

typedef bool ini::TdOpenInifileMode

To make the bOpenMode parameter in the constructor of ini::File more readable.

See also
ini::File::File( const std::string & rsFullFileName, TdOpenInifileMode openMode )

Enumeration Type Documentation

◆ ERRORS

Error range = -15501 to -15600

Enumerator
READ_ERROR 

-15501: An ini-file could not be opened or read

WRITE_ERROR 

-15502: An ini-file could not be written

PARAMETER_NULL_FORBIDDEN 

-15503: An invalid parameter or nullptr was passed

CREATE 

-15504: No object could be created

CAST 

-15505: No valid conversion of an object could be performed

KEY_NOT_EXISTING 

-15506: The searched key could not be found

SECTION_NOT_EXISTING 

-15507: The searched section could not be found

SECTION_ALLREADY_EXISTING 

-15508: A section to be inserted already exists

NO_FILENAME 

-15509: An expected file name was not passed

UNKNOWN 

-15600: Unknown error

◆ LINE_TYPE

The type of an entry in an ini file is defined by LINE_TYPE.

Enumerator
IniUNDEFINED 

Entry not specified

IniSECTION 

Entry is a section -> [Section 1]

IniCOMMENT 

Entry is a comment -> start of line ';' or '#'.

IniVARIABLE 

Entry is a variable possibly with value -> woafont=app850.fon

IniEMPTY_LINE 

Eintrag ist eine Leerzeile

Variable Documentation

◆ bCreateInifile

const TdOpenInifileMode ini::bCreateInifile = false

Signals the constructor to create a new ini file.

See also
ini::File::File( const std::string & rsFullFileName, TdOpenInifileMode openMode )

◆ bOpenInifile

const TdOpenInifileMode ini::bOpenInifile = true

Signals the constructor that an existing ini file should be read.

See also
ini::File::File( const std::string & rsFullFileName, TdOpenInifileMode openMode )

◆ g_sEOL

const std::string ini::g_sEOL = "\n"

Different operating systems probably have different line separators in Files. So here for everything "\n"!

◆ g_sIniFileVersion

const std::string ini::g_sIniFileVersion = "1.0.2"

The version. If new, change it here.

The file names of the DLL or LIB file are composed of the project name + the compiler identification + the version of the library.

For example, for Visual Studio 2015 = "$(ProjectName)$(PlatformToolset)101" as the target name; if the compile target is "INIFILE", the name becomes "INIFILEv140101.dll" and "INIFILEv140101.lib".