Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cScriptFile.h
Go to the documentation of this file.
1 //
5 
6 #ifndef _INC_cScriptFile_H
7 #define _INC_cScriptFile_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 
12 #include "cScriptSection.h"
15 
16 namespace GrayLib
17 {
18  UNITTEST2_PREDEF(cScriptFile);
19 
21  : public cFile
22  , public cIniWriter
23  , public IScriptableSetter
24  {
29  public:
31  virtual ~cScriptFileWriter();
32 
34  STDMETHOD(s_Put)(const ATOMCHAR_t* pszPropName, const cVariant& vValSet);
35  };
36 
38  : public cFileText //
39  , public cIniReader
40  {
43  friend class cScriptSection;
44 
45  private:
46  cStringA m_sSectionNext;
47  private:
48  bool FindTextLine(const IniChar_t* pszName); // Find a line in the current script
49 
50  public:
52  virtual ~cScriptFileReader();
53 
54  virtual HRESULT OpenX(cStringF sFilePath = "", OF_FLAGS_t nOpenFlags = OF_READ | OF_TEXT);
55 
56  // Find sections.
57  bool FindNextSection(cScriptSection* pSection, bool bStripped = false);
58  bool FindSection(cScriptSection* pSection, cStringA sName, OF_FLAGS_t nOpenFlags = 0); // Find a section in the current script
59 
60  UNITTEST2_PREDEF(cScriptFile);
61  };
62 }
63 
64 #endif // _INC_cScriptFile_H
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
Definition: cScriptFile.h:40
Definition: cScriptFile.h:24
Definition: cScriptSection.h:25
Definition: cVariant.h:26
Definition: cFileText.h:28
Definition: cFile.h:137
Definition: cIniSection.h:24
Definition: IScriptableObj.h:62
Definition: cMesh.h:22
UNITTEST2_PREDEF(cQuadtree)
UINT32 OF_FLAGS_t
Mask of file open flags OF_FLAGS_TYPE_.
Definition: cFile.h:77
char IniChar_t
char format even on UNICODE system! Screw M$, INI files should ALWAYS have UTF8 contents
Definition: cIniBase.h:17
char ATOMCHAR_t
the char form (UNICODE or not) for an atom. (for symbolic names)
Definition: StrConst.h:15
@ OF_TEXT
UTF8 or plain ASCII text file. (set by use of char Read/WriteString functions)
Definition: cFile.h:72
Definition: cIniSection.h:53