#include <ImfFile.hpp>
Public Member Functions | |
Constructors | |
| ImfFile (IddFileType iddFileType=IddFileType("EnergyPlus")) | |
| default constructor | |
Getters | |
| IddFile | iddFile () const |
| Get the IddFile. | |
| IddFileType | iddFileType () const |
| Get the IddFile's IddFileType. | |
| StringVector | sectionNames () const |
| Return the names of all sections. | |
| IdfObjectVector | section (const std::string §ion) const |
| Get a section by name. | |
Queries | |
| unsigned | numSections () const |
| Return the number of sections in the ImfFile. | |
Serialization | |
| std::ostream & | print (std::ostream &os) const |
| print file to std::stream | |
| bool | save (const openstudio::path &p, bool overwrite=false) |
| Save IddFile to path. | |
| 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. | |
| static boost::optional< ImfFile > | load (std::istream &is, const IddFile &iddFile) |
| load file from std::istream. use user-supplied IddFile. | |
| static boost::optional< ImfFile > | load (const openstudio::path &p, IddFileType iddFileType) |
| load from file path | |
| static boost::optional< ImfFile > | load (const openstudio::path &p, const IddFile &iddFile) |
| load from file path | |
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 from file path
|
static |
load from file path
|
static |
load file from std::istream. use user-supplied IddFile.
|
static |
load file from std::istream. assumes objects are in sub-idd file fileType of IddFactory.
| 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.