GlobalObjects
Alle Klassen Namensbereiche Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Freundbeziehungen Makrodefinitionen Seiten
IniFile.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_INIFILE_H
2#define INC_INIFILE_H
3//-----------------------------------------------------------------------------
69//-----------------------------------------------------------------------------
70#include "IniFileTypes.h"
71#include "PtlTDVList.h"
72#include "IniLineFactory.h"
73#include "IniSection.h"
74#include "IniKey.h"
75#include "string"
76//-----------------------------------------------------------------------------
77// Forwards
78namespace eut
79{
80 class Blob;
81}
82//-----------------------------------------------------------------------------
83namespace ini
84{
85 //---------------------------------------------------------------------------
86 #ifdef _MSC_VER
87 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
88 #pragma warning( disable : 4251 )
89 #endif
90 //---------------------------------------------------------------------------
330 {
331 private:
332 //============== Attribute ============
333 //-----------------------------------------------------------------------
343 std::string m_sFileName;
344 //-----------------------------------------------------------------------
355 //-----------------------------------------------------------------------
366 //-----------------------------------------------------------------------
367
368 public:
369 //============== Konstruktoren ============
370 //-----------------------------------------------------------------------
394 File( const std::string & rsFullFileName, TdOpenInifileMode openMode );
395 //-----------------------------------------------------------------------
406 //-----------------------------------------------------------------------
416 virtual ~File();
417 //-----------------------------------------------------------------------
418
419 private:
420 //-----------------------------------------------------------------------
430 File( const File & );
431 //-----------------------------------------------------------------------
432
433 public:
434 //============== Datei-Methoden
435 //-----------------------------------------------------------------------
447 int store();
448 //-----------------------------------------------------------------------
462 int refresh();
463 //-----------------------------------------------------------------------
464
465 //============== Methoden
466 //-----------------------------------------------------------------------
479 void setFullFileName( const std::string & rsFullFileName );
480 //-----------------------------------------------------------------------
492 std::string getFileName();
493 //-----------------------------------------------------------------------
532 int getLine( Line *& prRetVal, std::size_t nPosition, ptl::SeekMode eMode );
533 //-----------------------------------------------------------------------
567 int insertLine( Line * pIniLine,
568 ptl::InsertPosition eInsertPosition = ptl::InsertCURRENT,
569 ptl::VH eBeforeBehind = ptl::BEHIND );
570 //-----------------------------------------------------------------------
597 //-----------------------------------------------------------------------
630 int getLine( Line *& prRetVal, std::string * psSection, std::string * psKey = 0 );
631 //-----------------------------------------------------------------------
682 int getKeyValue( std::string & rsValue, std::string * psSection, std::string * psKey );
683 //-----------------------------------------------------------------------
720 int setKeyValue( const std::string & rsSection,
721 const std::string & rsKey,
722 const std::string & rsValue );
723 //-----------------------------------------------------------------------
754 int removeKey( const std::string & rsSection, const std::string & rsKey );
755 //-----------------------------------------------------------------------
772 int getAsBlob( eut::Blob *& prBlob );
773 //-----------------------------------------------------------------------
789 int makeLines( eut::Blob * pBlob );
790 //-----------------------------------------------------------------------
791
792 private:
793 //============== Operatoren
794 //-----------------------------------------------------------------------
804 File & operator= ( const File & );
805 //-----------------------------------------------------------------------
806 };
807 //---------------------------------------------------------------------------
808 #ifdef _MSC_VER
809 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
810 #pragma warning( default : 4251 )
811 #endif
812 //---------------------------------------------------------------------------
813} // namespace ini
814//-----------------------------------------------------------------------------
815#endif
Für jede Bibliothek, hier 'IniFile' gibt es eine Typen-Datei.
#define __ini_file_export_dll
Definition IniFileTypes.h:85
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:92
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:343
ptl::TDVList< Line > m_LineList
Definition IniFile.h:354
LineFactory m_LineFactory
Definition IniFile.h:365
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:93
Ist eine Kommentartzeile, aber auch Oberklasse für Section und Key.
Definition IniLine.h:94
Template-Listenklasse für Zeiger auf Objekte.
Definition PtlTDVList.h:130
Definition IniFile.h:79
Definition IniFile.h:84
bool TdOpenInifileMode
Definition IniFileTypes.h:217
InsertPosition
Definition PtlListTypes.h:218
@ InsertCURRENT
Definition PtlListTypes.h:221
VH
Definition PtlListTypes.h:174
@ BEHIND
Definition PtlListTypes.h:176
ElementPosition
Definition PtlListTypes.h:137
@ CURRENT_POS
Definition PtlListTypes.h:140
SeekMode
Definition PtlListTypes.h:386