IniFile
Lade ...
Suche ...
Keine Treffer
IniFile.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_INIFILE_H
2#define INC_INIFILE_H
3//-----------------------------------------------------------------------------
37//-----------------------------------------------------------------------------
38#include "IniFileTypes.h"
39#include "PtlTDVList.h"
40#include "IniLineFactory.h"
41#include "IniSection.h"
42#include "IniKey.h"
43#include "string"
44//-----------------------------------------------------------------------------
45// Forwards
46namespace eut
47{
48 class Blob;
49}
50//-----------------------------------------------------------------------------
51namespace ini
52{
53 //---------------------------------------------------------------------------
54 #ifdef _MSC_VER
55 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
56 #pragma warning( disable : 4251 )
57 #endif
58 //---------------------------------------------------------------------------
298 {
299 private:
300 //============== Attribute ============
301 //-----------------------------------------------------------------------
311 std::string m_sFileName;
312 //-----------------------------------------------------------------------
323 //-----------------------------------------------------------------------
334 //-----------------------------------------------------------------------
335
336 public:
337 //============== Konstruktoren ============
338 //-----------------------------------------------------------------------
362 File( const std::string & rsFullFileName, TdOpenInifileMode openMode );
363 //-----------------------------------------------------------------------
374 //-----------------------------------------------------------------------
384 virtual ~File();
385 //-----------------------------------------------------------------------
386
387 private:
388 //-----------------------------------------------------------------------
398 File( const File & );
399 //-----------------------------------------------------------------------
400
401 public:
402 //============== Datei-Methoden
403 //-----------------------------------------------------------------------
415 int store();
416 //-----------------------------------------------------------------------
430 int refresh();
431 //-----------------------------------------------------------------------
432
433 //============== Methoden
434 //-----------------------------------------------------------------------
447 void setFullFileName( const std::string & rsFullFileName );
448 //-----------------------------------------------------------------------
460 std::string getFileName();
461 //-----------------------------------------------------------------------
500 int getLine( Line *& prRetVal, std::size_t nPosition, ptl::SeekMode eMode );
501 //-----------------------------------------------------------------------
535 int insertLine( Line * pIniLine,
536 ptl::InsertPosition eInsertPosition = ptl::InsertCURRENT,
537 ptl::VH eBeforeBehind = ptl::BEHIND );
538 //-----------------------------------------------------------------------
565 //-----------------------------------------------------------------------
598 int getLine( Line *& prRetVal, std::string * psSection, std::string * psKey = 0 );
599 //-----------------------------------------------------------------------
650 int getKeyValue( std::string & rsValue, std::string * psSection, std::string * psKey );
651 //-----------------------------------------------------------------------
688 int setKeyValue( const std::string & rsSection,
689 const std::string & rsKey,
690 const std::string & rsValue );
691 //-----------------------------------------------------------------------
722 int removeKey( const std::string & rsSection, const std::string & rsKey );
723 //-----------------------------------------------------------------------
740 int getAsBlob( eut::Blob *& prBlob );
741 //-----------------------------------------------------------------------
757 int makeLines( eut::Blob * pBlob );
758 //-----------------------------------------------------------------------
759
760 private:
761 //============== Operatoren
762 //-----------------------------------------------------------------------
772 File & operator= ( const File & );
773 //-----------------------------------------------------------------------
774 };
775 //---------------------------------------------------------------------------
776 #ifdef _MSC_VER
777 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
778 #pragma warning( default : 4251 )
779 #endif
780 //---------------------------------------------------------------------------
781} // namespace ini
782//-----------------------------------------------------------------------------
783#endif
Für jede Bibliothek, hier 'IniFile' gibt es eine Typen-Datei.
#define __ini_file_export_dll
Definition IniFileTypes.h:54
Header für Key
Header für LineFactory
Header für Section
Header für TDVList
Diese Klasse erlaubt das Bearbeiten eines Blobs (einfügen, kopieren, durchsuchen etc....
Definition EuBlob.h:60
Eine INI-Datei beinhaltet Informationen für Programme.
Definition IniFile.h:298
int removeLine(ptl::ElementPosition eFirstLastCurrent=ptl::CURRENT_POS)
int insertLine(Line *pIniLine, ptl::InsertPosition eInsertPosition=ptl::InsertCURRENT, ptl::VH eBeforeBehind=ptl::BEHIND)
virtual ~File()
int makeLines(eut::Blob *pBlob)
File(const File &)
int refresh()
int store()
std::string getFileName()
std::string m_sFileName
Definition IniFile.h:311
ptl::TDVList< Line > m_LineList
Definition IniFile.h:322
LineFactory m_LineFactory
Definition IniFile.h:333
File(const std::string &rsFullFileName, TdOpenInifileMode openMode)
int getAsBlob(eut::Blob *&prBlob)
void setFullFileName(const std::string &rsFullFileName)
int getLine(Line *&prRetVal, std::size_t nPosition, ptl::SeekMode eMode)
int setKeyValue(const std::string &rsSection, const std::string &rsKey, const std::string &rsValue)
int removeKey(const std::string &rsSection, const std::string &rsKey)
int getLine(Line *&prRetVal, std::string *psSection, std::string *psKey=0)
int getKeyValue(std::string &rsValue, std::string *psSection, std::string *psKey)
Diese Klasse macht aus Zeilen einer INI-Datei Objekte der Typen Line, Section oder Key.
Definition IniLineFactory.h:61
Ist eine Kommentartzeile, aber auch Oberklasse für Section und Key.
Definition IniLine.h:62
Template-Listenklasse für Zeiger auf Objekte.
Definition PtlTDVList.h:98
Definition EuBlob.h:43
Definition IniFile.h:52
bool TdOpenInifileMode
Definition IniFileTypes.h:186
InsertPosition
Definition PtlListTypes.h:187
@ InsertCURRENT
Definition PtlListTypes.h:190
VH
Definition PtlListTypes.h:143
@ BEHIND
Definition PtlListTypes.h:145
ElementPosition
Definition PtlListTypes.h:106
@ CURRENT_POS
Definition PtlListTypes.h:109
SeekMode
Definition PtlListTypes.h:355