OpenStudio:utilities
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Friends | Related Functions | List of all members
openstudio::BCLFileReference Class Reference

#include <BCLFileReference.hpp>

Public Member Functions

Constructors
 BCLFileReference (const openstudio::path &measureRootDir, const openstudio::path &relativePath, const bool setMembers=false)
 Constructor from file path. More...
 
Destructor
virtual ~BCLFileReference ()=default
 Virtual destructor. More...
 
Getters
openstudio::path path () const
 Returns absolute path to file. More...
 
openstudio::path relativePath () const
 
std::string checksum () const
 Returns the last recorded checksum. More...
 
std::string softwareProgram () const
 
std::string softwareProgramVersion () const
 
boost::optional< VersionStringminCompatibleVersion () const
 
boost::optional< VersionStringmaxCompatibleVersion () const
 
std::string fileName () const
 
std::string fileType () const
 
std::string usageType () const
 
Setters
void setChecksum (const std::string &checksum)
 
void setSoftwareProgram (const std::string &softwareProgram)
 
void setSoftwareProgramVersion (const std::string &softwareProgramVersion)
 
void setMinCompatibleVersion (const VersionString &minCompatibleVersion)
 
void resetMinCompatibleVersion ()
 
void setMaxCompatibleVersion (const VersionString &maxCompatibleVersion)
 
void resetMaxCompatibleVersion ()
 
void setUsageType (const std::string &usageType)
 
Operators
void writeValues (pugi::xml_node &element) const
 
Json::Value toJSON () const
 
std::string toJSONString () const
 
bool checkForUpdate ()
 Check if the file has been updated and return if so. Will update checksum. More...
 

Friends

bool operator< (const BCLFileReference &lhs, const BCLFileReference &rhs)
 
bool operator== (const BCLFileReference &lhs, const BCLFileReference &rhs)
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &os, const BCLFileReference &file)
 Prints BCLFileReference to os. More...
 

Detailed Description

BCLFileReference is a class for tracking files that come with BCL components and measures.

Constructor & Destructor Documentation

openstudio::BCLFileReference::BCLFileReference ( const openstudio::path &  measureRootDir,
const openstudio::path &  relativePath,
const bool  setMembers = false 
)
explicit

Constructor from file path.

virtual openstudio::BCLFileReference::~BCLFileReference ( )
virtualdefault

Virtual destructor.

Member Function Documentation

bool openstudio::BCLFileReference::checkForUpdate ( )

Check if the file has been updated and return if so. Will update checksum.

std::string openstudio::BCLFileReference::checksum ( ) const

Returns the last recorded checksum.

std::string openstudio::BCLFileReference::fileName ( ) const
std::string openstudio::BCLFileReference::fileType ( ) const
boost::optional<VersionString> openstudio::BCLFileReference::maxCompatibleVersion ( ) const
boost::optional<VersionString> openstudio::BCLFileReference::minCompatibleVersion ( ) const
openstudio::path openstudio::BCLFileReference::path ( ) const

Returns absolute path to file.

openstudio::path openstudio::BCLFileReference::relativePath ( ) const
void openstudio::BCLFileReference::resetMaxCompatibleVersion ( )
void openstudio::BCLFileReference::resetMinCompatibleVersion ( )
void openstudio::BCLFileReference::setChecksum ( const std::string &  checksum)
void openstudio::BCLFileReference::setMaxCompatibleVersion ( const VersionString maxCompatibleVersion)
void openstudio::BCLFileReference::setMinCompatibleVersion ( const VersionString minCompatibleVersion)
void openstudio::BCLFileReference::setSoftwareProgram ( const std::string &  softwareProgram)
void openstudio::BCLFileReference::setSoftwareProgramVersion ( const std::string &  softwareProgramVersion)
void openstudio::BCLFileReference::setUsageType ( const std::string &  usageType)
std::string openstudio::BCLFileReference::softwareProgram ( ) const
std::string openstudio::BCLFileReference::softwareProgramVersion ( ) const
Json::Value openstudio::BCLFileReference::toJSON ( ) const
std::string openstudio::BCLFileReference::toJSONString ( ) const
std::string openstudio::BCLFileReference::usageType ( ) const
void openstudio::BCLFileReference::writeValues ( pugi::xml_node &  element) const

Friends And Related Function Documentation

bool operator< ( const BCLFileReference lhs,
const BCLFileReference rhs 
)
friend
std::ostream & operator<< ( std::ostream &  os,
const BCLFileReference file 
)
related

Prints BCLFileReference to os.

bool operator== ( const BCLFileReference lhs,
const BCLFileReference rhs 
)
friend