![]() |
QMCPACK
|
This class stores a tree of input file sections. More...
Public Member Functions | |
void | MarkModified () |
virtual void | PrintTree ()=0 |
virtual void | PrintTree (int numIndent)=0 |
virtual IOFileType | GetFileType ()=0 |
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) |
virtual IOTreeClass * | NewSection (std::string name)=0 |
Write me! More... | |
virtual bool | OpenFile (std::string fileName, std::string mySectionName, IOTreeClass *parent)=0 |
virtual bool | NewFile (std::string fileName, std::string mySectionName, IOTreeClass *parent)=0 |
virtual void | IncludeSection (IOTreeClass *)=0 |
Inserts a new Include directive in the present section. More... | |
virtual void | CloseFile ()=0 |
virtual void | FlushFile ()=0 |
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) |
Public Attributes | |
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 | |
bool | IsModified |
bool | UseUnderscores |
This class stores a tree of input file sections.
Each member of the tree contains a list of tree nodes below it and a list of variables contained in the present node.
|
inline |
Definition at line 145 of file IOBase.h.
|
inlinevirtual |
|
inline |
Append a value to a variable of dimension of 1 higher than val.
i.e. Add a double to an blitz::Array<double,1> or add blitz::Array<double,1> to an blitz::Array<double,2>, etc.
Definition at line 162 of file IOBase.h.
References IOVarBase::GetExtent(), IOTreeClass::GetVarPtr(), IOTreeClass::MarkModified(), IOVarBase::Resize(), and IOVarBase::Write().
Referenced by IOSectionClass::AppendVar().
|
pure virtual |
Implemented in IOTreeASCIIClass.
|
inline |
Returns the number of subsections with the given name within the present section.
Definition at line 177 of file IOBase.h.
References IOTreeClass::SectionList.
Referenced by IOSectionClass::CountSections().
|
inline |
Definition at line 193 of file IOBase.h.
References IOTreeClass::VarList.
Referenced by IOSectionClass::CountVars().
|
inline |
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.
Returns true if the section is found. The final parameter, which default value "true", optionally resets the section iterator to the beginning of the section. Thus, one may control whether or not order is significant.
Definition at line 214 of file IOBase.h.
References IOTreeClass::SectionList.
|
pure virtual |
Implemented in IOTreeASCIIClass.
|
pure virtual |
Implemented in IOTreeASCIIClass.
Referenced by IOTreeClass::WriteVar().
|
inline |
Definition at line 81 of file IOBase.h.
References IOTreeClass::MarkModified(), and IOTreeClass::VarList.
Referenced by IOTreeClass::AppendVar(), and IOSectionClass::GetVarPtr().
|
inline |
Definition at line 97 of file IOBase.h.
References IOTreeClass::MarkModified(), and IOTreeClass::VarList.
|
pure virtual |
Inserts a new Include directive in the present section.
Implemented in IOTreeASCIIClass.
|
inline |
Definition at line 236 of file IOBase.h.
References IOTreeClass::MyNumber, and IOTreeClass::SectionList.
|
inline |
Definition at line 152 of file IOBase.h.
References IOTreeClass::FileName, IOTreeClass::IsModified, IOTreeClass::MarkModified(), and IOTreeClass::Parent.
Referenced by IOTreeClass::AppendVar(), IOTreeClass::GetVarPtr(), and IOTreeClass::MarkModified().
|
pure virtual |
Implemented in IOTreeASCIIClass.
|
pure virtual |
|
pure virtual |
Implemented in IOTreeASCIIClass.
|
pure virtual |
Implemented in IOTreeASCIIClass.
Referenced by IOSectionClass::PrintTree().
|
pure virtual |
Implemented in IOTreeASCIIClass.
|
inline |
Definition at line 63 of file IOBase.h.
References IOTreeClass::Parent, IOTreeClass::ReadVar(), and IOTreeClass::VarList.
Referenced by IOTreeClass::ReadVar(), and IOSectionClass::ReadVar().
|
inline |
Definition at line 143 of file IOBase.h.
References IOTreeClass::UseUnderscores.
Referenced by IOSectionClass::SetUnderscores().
|
inline |
Definition at line 32 of file IO.h.
References IOTreeClass::WriteVar().
bool WriteVar | ( | std::string | name, |
T | val | ||
) |
These create a new variable with the given name and value:
Definition at line 37 of file IO.h.
References IO::ASCII_TYPE, and IOTreeClass::GetFileType().
Referenced by IOTreeClass::WriteVar(), and IOSectionClass::WriteVar().
bool WriteVar | ( | std::string | name, |
const TinyVector< T, LEN > & | val | ||
) |
Definition at line 53 of file IO.h.
References IOTreeClass::WriteVar().
bool WriteVar | ( | std::string | name, |
const Array< T, RANK > & | val | ||
) |
Definition at line 64 of file IO.h.
References IO::ASCII_TYPE, IOTreeClass::GetFileType(), and IOTreeClass::VarList.
bool WriteVar | ( | std::string | name, |
const Array< TinyVector< T, LEN >, RANK > & | val | ||
) |
Definition at line 79 of file IO.h.
References neverDeleteData, and IOTreeClass::WriteVar().
std::string FileName |
This is the empty std::string unless I'm the root node of some file.
Definition at line 55 of file IOBase.h.
Referenced by IOTreeClass::MarkModified().
|
protected |
Definition at line 37 of file IOBase.h.
Referenced by IOTreeASCIIClass::IOTreeASCIIClass(), and IOTreeClass::MarkModified().
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.
Definition at line 48 of file IOBase.h.
Referenced by IOTreeClass::InsertSection().
std::string Name |
Definition at line 56 of file IOBase.h.
Referenced by IOSectionClass::GetName().
IOTreeClass* Parent |
Definition at line 53 of file IOBase.h.
Referenced by IOTreeClass::MarkModified(), and IOTreeClass::ReadVar().
std::list<IOTreeClass*> SectionList |
Definition at line 42 of file IOBase.h.
Referenced by IOTreeClass::CountSections(), IOTreeClass::FindSection(), and IOTreeClass::InsertSection().
|
protected |
Definition at line 38 of file IOBase.h.
Referenced by IOTreeClass::SetUnderscores().
std::list<IOVarBase*> VarList |
Definition at line 41 of file IOBase.h.
Referenced by IOTreeClass::CountVars(), IOTreeClass::GetVarPtr(), IOTreeClass::ReadVar(), and IOTreeClass::WriteVar().