GlobalObjects
Loading...
Searching...
No Matches
IniLine.h
Go to the documentation of this file.
1#ifndef INC_INILINE_H
2#define INC_INILINE_H
3//-----------------------------------------------------------------------------
51//-----------------------------------------------------------------------------
52#include "IniFileTypes.h"
53#include "IniLineFactory.h"
54//-----------------------------------------------------------------------------
55#ifdef _MSC_VER
56 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
57 #pragma warning( disable : 4251 )
58#endif
59//-----------------------------------------------------------------------------
60namespace ini
61{
62 //---------------------------------------------------------------------------
77 {
78 private:
79 //============== Friends
80 //----------------------------------------------------------------------
81 friend class LineFactory;
82 friend class File;
83 friend class Section;
84 //----------------------------------------------------------------------
85
86 protected:
87 //============== Attribute ============
88 //-----------------------------------------------------------------------
98 std::string m_sText;
99 //-----------------------------------------------------------------------
110 //-----------------------------------------------------------------------
121 //-----------------------------------------------------------------------
122
123 public:
124 //============== Konstruktoren ============
125 //-----------------------------------------------------------------------
139 Line( const std::string & sCharLine );
140 //-----------------------------------------------------------------------
150 virtual ~Line();
151 //-----------------------------------------------------------------------
152
153 protected:
154 //-----------------------------------------------------------------------
170 Line( const std::string & sCharLine, LINE_TYPE eLineType );
171 //-----------------------------------------------------------------------
182 //-----------------------------------------------------------------------
183
184 private:
185 //============== Konstruktoren
186 //-----------------------------------------------------------------------
196 inline Line( const Line & );
197 //-----------------------------------------------------------------------
198
199 public:
200 //============== Methoden
201 //-----------------------------------------------------------------------
213 std::string getText() const;
214 //-----------------------------------------------------------------------
226 void setText( std::string sCharLine );
227 //-----------------------------------------------------------------------
240 //-----------------------------------------------------------------------
252 std::size_t getLineSizeWithEOL() const;
253 //-----------------------------------------------------------------------
254
255 protected:
256 //============== Methoden
257 //-----------------------------------------------------------------------
269 char * getTextWithEOL() const;
270 //-----------------------------------------------------------------------
271
272 private:
273 //============== Operatoren
274 //-----------------------------------------------------------------------
284 Line & operator= ( const Line & );
285 //-----------------------------------------------------------------------
286 };
287 //---------------------------------------------------------------------------
288 #ifdef _MSC_VER
289 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
290 #pragma warning( default : 4251 )
291 #endif
292 //---------------------------------------------------------------------------
293} // namespace ini
294//-----------------------------------------------------------------------------
295#endif
For each library, here 'IniFile' there is a type definition file.
#define __ini_file_export_dll
Definition IniFileTypes.h:68
Header for LineFactory
An INI file contains information for programs.
Definition IniFile.h:313
This class turns lines of an INI file into objects of the types Line, Section or Key.
Definition IniLineFactory.h:76
Is a comment line, but also superclass for Section and Key.
Definition IniLine.h:77
LINE_TYPE m_eLineType
Definition IniLine.h:109
LINE_TYPE getType() const
void setText(std::string sCharLine)
std::string getText() const
char * getTextWithEOL() const
LineFactory m_LineFactory
Definition IniLine.h:120
std::string m_sText
Definition IniLine.h:98
virtual ~Line()
Line(const std::string &sCharLine)
Line(const std::string &sCharLine, LINE_TYPE eLineType)
Line(const Line &)
std::size_t getLineSizeWithEOL() const
A section can only appear once in an INI file, is enclosed in square brackets and usually has variabl...
Definition IniSection.h:86
Definition IniFile.h:67
LINE_TYPE
Definition IniFileTypes.h:134