22 #ifndef __PLUMED_tools_FileBase_h
23 #define __PLUMED_tools_FileBase_h
99 operator bool ()
const;
103 FileBase&
open(
const std::string&name,
const std::string& mode);
std::string path
path of the opened file
Action * action
pointer to corresponding action. NULL if not linked
FileBase & link(FILE *)
Link to an already open filed.
virtual ~FileBase()
Virtual destructor (allows inheritance)
Class containing wrappers to MPI.
static void test()
Runs a small testcase.
void setHeavyFlush()
Set heavyFlush flag.
FileBase & flush()
Flushes the file to disk.
Communicator * comm
communicator. NULL if not set
bool heavyFlush
Set to true if you want flush to be heavy (close/reopen)
FileBase()
Private constructor.
bool eof
Set to true when end of file is encountered.
void close()
Closes the file Should be used only for explicitely opened files.
Base class for all the input Actions.
bool isOpen()
Check if a file is open.
FileBase & open(const std::string &name, const std::string &mode)
Opens the file (without auto-backup)
bool cloned
Control closing on destructor.
FileBase & operator=(const FileBase &)
Assignment operator is disabled (private and unimplemented)
bool FileExist(const std::string &path)
Check if the file exists.
bool err
Set to true when error is encountered.
Base class for dealing with files.
PlumedMain * plumed
pointer to main plumed object. NULL if not linked