#include <ImfFile.hpp>
Public Member Functions | |
Constructors | |
ImfFile (IddFileType iddFileType=IddFileType("EnergyPlus")) | |
default constructor More... | |
Getters | |
IddFile | iddFile () const |
Get the IddFile. More... | |
IddFileType | iddFileType () const |
Get the IddFile's IddFileType. More... | |
StringVector | sectionNames () const |
Return the names of all sections. More... | |
IdfObjectVector | section (const std::string §ion) const |
Get a section by name. More... | |
Queries | |
unsigned | numSections () const |
Return the number of sections in the ImfFile. More... | |
Serialization | |
std::ostream & | print (std::ostream &os) const |
print file to std::stream More... | |
bool | save (const openstudio::path &p, bool overwrite=false) |
Save IddFile to path. More... | |
static boost::optional< ImfFile > | load (std::istream &is, IddFileType iddFileType) |
load file from std::istream. assumes objects are in sub-idd file fileType of IddFactory. More... | |
static boost::optional< ImfFile > | load (std::istream &is, const IddFile &iddFile) |
load file from std::istream. use user-supplied IddFile. More... | |
static boost::optional< ImfFile > | load (const openstudio::path &p, IddFileType iddFileType) |
load from file path More... | |
static boost::optional< ImfFile > | load (const openstudio::path &p, const IddFile &iddFile) |
load from file path More... | |
ImfFile represents an Imf file.
ImfFile does not have any copy or assignment operators so it is not a shared object. ImfFile does not support advanced imf syntax, only sectioning by
, etc.
openstudio::ImfFile::ImfFile | ( | IddFileType | iddFileType = IddFileType("EnergyPlus") | ) |
default constructor
IddFile openstudio::ImfFile::iddFile | ( | ) | const |
Get the IddFile.
If one is not explicitly held by this object, returns one from IddFactory per the documentation for this class.
IddFileType openstudio::ImfFile::iddFileType | ( | ) | const |
Get the IddFile's IddFileType.
|
static |
load file from std::istream. assumes objects are in sub-idd file fileType of IddFactory.
|
static |
load file from std::istream. use user-supplied IddFile.
|
static |
load from file path
|
static |
load from file path
unsigned openstudio::ImfFile::numSections | ( | ) | const |
Return the number of sections in the ImfFile.
std::ostream& openstudio::ImfFile::print | ( | std::ostream & | os | ) | const |
print file to std::stream
bool openstudio::ImfFile::save | ( | const openstudio::path & | p, |
bool | overwrite = false |
||
) |
Save IddFile to path.
Will construct parent folder, but no further up the chain. Will only overwrite an existing file if overwrite==true. If no extension is provided will use 'imf'.
IdfObjectVector openstudio::ImfFile::section | ( | const std::string & | section | ) | const |
Get a section by name.
StringVector openstudio::ImfFile::sectionNames | ( | ) | const |
Return the names of all sections.