OpenStudioCore:analysis
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Related Functions | List of all members
openstudio::analysis::AnalysisObject Class Reference

#include <AnalysisObject.hpp>

+ Inheritance diagram for openstudio::analysis::AnalysisObject:

Public Member Functions

Constructors and Destructors
virtual ~AnalysisObject ()
 
AnalysisObject clone () const
 Deep copy. More...
 
Getters and Queries
std::string name () const
 
std::string displayName () const
 
std::string description () const
 
openstudio::UUID uuid () const
 
openstudio::UUID versionUUID () const
 
bool isDirty () const
 Returns true if this object has been changed since its dirty flag was last cleared. More...
 
bool operator== (const AnalysisObject &other) const
 Compare impls. More...
 
bool operator!= (const AnalysisObject &other) const
 
bool uuidEqual (const AnalysisObject &other) const
 
bool uuidAndVersionEqual (const AnalysisObject &other) const
 
boost::optional< AnalysisObjectparent () const
 
Setters
void setName (const std::string &newName)
 
void setDisplayName (const std::string &newDisplayName)
 
void setDescription (const std::string &newDescription)
 
Actions
bool clearDirtyFlag ()
 Call this method to reset the dirty flag of this object and all its children. More...
 
bool connect (const char *signal, const QObject *receiver, const char *slot, Qt::ConnectionType type=Qt::AutoConnection) const
 Connect signal from this AnalysisObject to slot on receiver. More...
 
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *slot=nullptr) const
 
Type Casting
template<typename T >
cast () const
 Cast to type T. More...
 
template<typename T >
boost::optional< T > optionalCast () const
 Cast to boost::optional<T>. More...
 

Related Functions

(Note that these are not member functions.)

typedef std::vector
< AnalysisObject
AnalysisObjectVector
 
typedef boost::optional
< AnalysisObject
OptionalAnalysisObject
 

Detailed Description

AnalysisObject is the base class for all major classes in the openstudio::analysis namespace.

AnalysisObjects are used to formulate Problems and their instantiations as Analyses, and to explore solutions in the form of Analyses and their complete (simulated) DataPoints. All AnalysisObjects are serializable to the project::ProjectDatabase, and in fact are serialized to such a database by analysis::AnalysisDriver, which is the preferred method for running Analyses.

Constructor & Destructor Documentation

virtual openstudio::analysis::AnalysisObject::~AnalysisObject ( )
inlinevirtual

Member Function Documentation

template<typename T >
T openstudio::analysis::AnalysisObject::cast ( ) const
inline

Cast to type T.

Throws std::bad_cast if object is not a T.

bool openstudio::analysis::AnalysisObject::clearDirtyFlag ( )

Call this method to reset the dirty flag of this object and all its children.

In general, this method should be called after this object has been saved to the ProjectDatabase (record constructed, database saved, and transaction committed). Returns false if the flag cannot be cleared for some reason.

AnalysisObject openstudio::analysis::AnalysisObject::clone ( ) const

Deep copy.

bool openstudio::analysis::AnalysisObject::connect ( const char *  signal,
const QObject receiver,
const char *  slot,
Qt::ConnectionType  type = Qt::AutoConnection 
) const

Connect signal from this AnalysisObject to slot on receiver.

std::string openstudio::analysis::AnalysisObject::description ( ) const
bool openstudio::analysis::AnalysisObject::disconnect ( const char *  signal = nullptr,
const QObject receiver = nullptr,
const char *  slot = nullptr 
) const
std::string openstudio::analysis::AnalysisObject::displayName ( ) const
bool openstudio::analysis::AnalysisObject::isDirty ( ) const

Returns true if this object has been changed since its dirty flag was last cleared.

New objects are dirty post-construction. De-serialized objects are not. The intention is for users of the analysis framework to clear the dirty flag after an object is saved to its ProjectDatabase.

std::string openstudio::analysis::AnalysisObject::name ( ) const
bool openstudio::analysis::AnalysisObject::operator!= ( const AnalysisObject other) const
bool openstudio::analysis::AnalysisObject::operator== ( const AnalysisObject other) const

Compare impls.

template<typename T >
boost::optional<T> openstudio::analysis::AnalysisObject::optionalCast ( ) const
inline

Cast to boost::optional<T>.

Return value is boost::none (evaluates to false) if object is not a T.

boost::optional<AnalysisObject> openstudio::analysis::AnalysisObject::parent ( ) const
void openstudio::analysis::AnalysisObject::setDescription ( const std::string &  newDescription)
void openstudio::analysis::AnalysisObject::setDisplayName ( const std::string &  newDisplayName)
void openstudio::analysis::AnalysisObject::setName ( const std::string &  newName)
openstudio::UUID openstudio::analysis::AnalysisObject::uuid ( ) const
bool openstudio::analysis::AnalysisObject::uuidAndVersionEqual ( const AnalysisObject other) const
bool openstudio::analysis::AnalysisObject::uuidEqual ( const AnalysisObject other) const
openstudio::UUID openstudio::analysis::AnalysisObject::versionUUID ( ) const

Friends And Related Function Documentation

typedef std::vector<AnalysisObject> AnalysisObjectVector
related
typedef boost::optional<AnalysisObject> OptionalAnalysisObject
related