![]() |
QMCPACK
|
This is the ASCII specialization of IOTreeClass for ASCII text files. More...
Inheritance diagram for IOTreeASCIIClass:
Collaboration diagram for IOTreeASCIIClass:Public Member Functions | |
| void | WriteSection (std::ofstream &outFile, int indent) |
| IOFileType | GetFileType () override |
| void | PrintTree (int level) override |
| Print an indented tree of section variable names. More... | |
| void | PrintTree () override |
| Same thing, just calls above with level 0;. More... | |
| IOTreeClass * | NewSection (std::string name) override |
| Write me! More... | |
| void | IncludeSection (IOTreeClass *) override |
| Inserts a new Include directive in the present section. More... | |
| bool | OpenFile (std::string filename, std::string myName, IOTreeClass *parent) override |
| Takes the name of a file to read, the name of my section and a pointer to my parent. More... | |
| bool | NewFile (std::string fileName, std::string mySectionName, IOTreeClass *parent) override |
| void | CloseFile () override |
| Do any file handling necessary and delete the whole tree of data. More... | |
| void | FlushFile () override |
| IOTreeASCIIClass () | |
Public Member Functions inherited from IOTreeClass | |
| void | MarkModified () |
| void | InsertSection (IOTreeClass *newSec) |
| bool | FindSection (std::string name, IOTreeClass *§ionPtr, int num=0) |
| FindSection locates a subsection with the given name within the section in contains and returns it in the pointer, sectionPtr, which is passed a reference. More... | |
| int | CountSections (std::string name) |
| Returns the number of subsections with the given name within the present section. More... | |
| int | CountVars () |
| template<class T > | |
| bool | ReadVar (std::string name, T &var) |
| IOVarBase * | GetVarPtr (std::string name) |
| IOVarBase * | GetVarPtr (int num) |
| template<typename T > | |
| bool | WriteVar (std::string name, T val) |
| These create a new variable with the given name and value: More... | |
| template<typename T , int LEN> | |
| bool | WriteVar (std::string name, const TinyVector< T, LEN > &val) |
| template<typename T , int RANK> | |
| bool | WriteVar (std::string name, const Array< T, RANK > &val) |
| template<typename T , int RANK, int LEN> | |
| bool | WriteVar (std::string name, const Array< TinyVector< T, LEN >, RANK > &val) |
| template<class T > | |
| bool | AppendVar (std::string name, T val) |
| Append a value to a variable of dimension of 1 higher than val. More... | |
| void | SetUnderscores (bool use) |
| IOTreeClass () | |
| virtual | ~IOTreeClass () |
| template<> | |
| bool | WriteVar (std::string name, const char *val) |
Private Member Functions | |
| bool | ReadWithoutComments (std::string fileName, Array< char, 1 > &buffer) |
| Reads a text file into a buffer eliminating c++ and c-style comments. More... | |
| bool | ReadSection (IOTreeClass *parent, std::string name, std::list< TokenClass >::iterator &iter, std::list< TokenClass > &tokenList, bool wantEndBrace) |
| Reads a section from a list of TokenClass objects. More... | |
Additional Inherited Members | |
Public Attributes inherited from IOTreeClass | |
| std::list< IOVarBase * > | VarList |
| std::list< IOTreeClass * > | SectionList |
| int | MyNumber |
| This is used to ensure proper ordering of sections in the HDF version in which there is no guarantee that the sections will come out of the file in the same order you put them in. More... | |
| int | CurrSecNum |
| IOTreeClass * | Parent |
| std::string | FileName |
| This is the empty std::string unless I'm the root node of some file. More... | |
| std::string | Name |
Protected Attributes inherited from IOTreeClass | |
| bool | IsModified |
| bool | UseUnderscores |
This is the ASCII specialization of IOTreeClass for ASCII text files.
It's syntax is as follows: Section (SectionName) { double x = 3; blitz::Array<int,1> y(3) = [1, 2, 3]; blitz::Array<int,3> z(2,2,1) = [ 1, 2, 3, 4 ]; Section (Species, "species1.h5"); }
|
inline |
|
overridevirtual |
Do any file handling necessary and delete the whole tree of data.
Implements IOTreeClass.
|
overridevirtual |
Implements IOTreeClass.
|
overridevirtual |
Implements IOTreeClass.
|
overridevirtual |
Inserts a new Include directive in the present section.
Implements IOTreeClass.
|
overridevirtual |
Implements IOTreeClass.
|
overridevirtual |
Write me!
Implements IOTreeClass.
|
overridevirtual |
Takes the name of a file to read, the name of my section and a pointer to my parent.
Reads the file into a tree of IOTreeClass's.
Implements IOTreeClass.
|
overridevirtual |
Print an indented tree of section variable names.
Implements IOTreeClass.
|
overridevirtual |
Same thing, just calls above with level 0;.
Implements IOTreeClass.
|
private |
Reads a section from a list of TokenClass objects.
iter should refer to the current place in the list that we should start reading at. iter should point to a place just after the '{'. If wantEndBrace is true, it will look for an ending '}'. Otherwise it will read until the list of Tokens runs out.
|
private |
Reads a text file into a buffer eliminating c++ and c-style comments.
| void WriteSection | ( | std::ofstream & | outFile, |
| int | indent | ||
| ) |