|
|
virtual | ~WorkspaceObject ()=default |
|
| WorkspaceObject (const WorkspaceObject &other)=default |
|
| WorkspaceObject (WorkspaceObject &&other)=default |
|
WorkspaceObject & | operator= (const WorkspaceObject &)=default |
|
WorkspaceObject & | operator= (WorkspaceObject &&)=default |
|
std::vector
< openstudio::IdfObject > | remove () |
| Removes the object from the Workspace. More...
|
|
|
Workspace | workspace () const |
| Return the Workspace that contains this WorkspaceObject. More...
|
|
boost::optional< WorkspaceObject > | getTarget (unsigned index) const |
| Returns the object pointed to by field index, if it exists. More...
|
|
std::vector< WorkspaceObject > | targets () const |
| Returns all objects pointed to by this object. More...
|
|
std::vector< unsigned > | getSourceIndices (const Handle &targetHandle) const |
| Returns the index of the field in this object that points to targetHandle, if possible. More...
|
|
std::vector< WorkspaceObject > | sources () const |
| Returns all objects that point to this object, filtering for duplicate objects. More...
|
|
std::vector< WorkspaceObject > | getSources (IddObjectType type) const |
| Returns all objects of type that point to this object, filtering for duplicate objects. More...
|
|
boost::optional< std::string > | getField (unsigned index) const |
| Like getString except for reference fields getString will return the name of the referenced object. More...
|
|
|
bool | setPointer (unsigned index, const Handle &targetHandle) |
| Sets the pointer at field index to targetHandle, if possible. More...
|
|
|
bool | operator< (const WorkspaceObject &right) const |
|
bool | initialized () const |
|
unsigned | numSources () const |
| Returns the number of objects that point to this object. More...
|
|
bool | isSource () const |
| Returns true if this object points to another object. More...
|
|
bool | canBeSource () const |
| Returns true if this object can point to another object. More...
|
|
bool | canBeSource (unsigned index, const std::vector< std::string > &refLists=std::vector< std::string >()) const |
| Returns true if field index can be a source field. More...
|
|
bool | isTarget () const |
| Returns true if another object points to this object. More...
|
|
std::vector< std::string > | canBeTarget () const |
| Returns the reference lists of which this object is a member, if this object has a name. More...
|
|
bool | objectListFieldsEqual (const WorkspaceObject &other) const |
| Checks for equality of objectListFields(). More...
|
|
bool | objectListFieldsNonConflicting (const WorkspaceObject &other) const |
| Returns true if for all objectListFields() that for both objects are non-empty, the values are equal (using the same criteria as objectListFieldsEqual). More...
|
|
|
IdfObject | idfObject () |
| Returns an equivalent IdfObject, naming target objects if necessary. More...
|
|
IdfObject | idfObject () const |
| Returns an equivalent IdfObject, leaving unnamed target objects unnamed. More...
|
|
| IdfObject (IddObjectType type, bool fastName=false) |
| Constructor from type. More...
|
|
| IdfObject (const IddObject &, bool fastName=false) |
| Constructor from iddObject. More...
|
|
virtual | ~IdfObject ()=default |
|
| IdfObject (const IdfObject &other) |
| Copy constructor. More...
|
|
| IdfObject (IdfObject &&other) noexcept |
|
IdfObject & | operator= (const IdfObject &other) |
|
IdfObject & | operator= (IdfObject &&other) noexcept |
|
IdfObject | clone (bool keepHandle=false) const |
| Creates a deep copy of this object. More...
|
|
Handle | handle () const |
| Returns this object's handle, which is only valid in the containing Workspace. More...
|
|
IddObject | iddObject () const |
| Get this object's IddObject. More...
|
|
std::string | comment () const |
| Returns the comment block associated with the object. More...
|
|
boost::optional< std::string > | fieldComment (unsigned index, bool returnDefault=false) const |
| Returns the comment associated with field index, if one exists. More...
|
|
boost::optional< std::string > | name (bool returnDefault=false) const |
| Get the name of the object, if it exists. More...
|
|
std::string | nameString (bool returnDefault=false) const |
| Returns the name if set or returns an empty string. More...
|
|
std::string | briefDescription () const |
| Get a brief description of this object. More...
|
|
bool | isEmpty (unsigned index) const |
| Returns true if the field is empty. More...
|
|
boost::optional< std::string > | getString (unsigned index, bool returnDefault=false, bool returnUninitializedEmpty=false) const |
| Get the value of field index, if index < numFields(). More...
|
|
boost::optional< double > | getDouble (unsigned index, bool returnDefault=false) const |
| Get the value of the field at index, converted to double, if possible. More...
|
|
OSOptionalQuantity | getQuantity (unsigned index, bool returnDefault=false, bool returnIP=false) const |
| Returns the Quantity at index, if possible. More...
|
|
boost::optional< unsigned > | getUnsigned (unsigned index, bool returnDefault=false) const |
| Get the value of the field at index, converted to unsigned, if possible. More...
|
|
boost::optional< int > | getInt (unsigned index, bool returnDefault=false) const |
| Get value of the field at index, converted to int, if possible. More...
|
|
IdfExtensibleGroup | getExtensibleGroup (unsigned groupIndex) const |
| Returns the IdfExtensibleGroup at groupIndex, if it exists. More...
|
|
std::vector< IdfExtensibleGroup > | extensibleGroups () const |
| Returns this object's IdfExtensibleGroups. More...
|
|
void | setComment (const std::string &msg) |
| Sets the comment block associated with the object. More...
|
|
bool | setFieldComment (unsigned index, const std::string &cmnt) |
| Sets the comment associated with field index, if that field exists. More...
|
|
boost::optional< std::string > | setName (const std::string &newName) |
| Sets the name field if it exists, returning the actual name string set. More...
|
|
boost::optional< std::string > | createName (bool overwrite=true) |
| Sets the name field to a new, unique name, if the name field exists and (is empty or overwrite == true). More...
|
|
bool | setString (unsigned index, const std::string &value) |
| Sets the field at index to value, if possible. More...
|
|
bool | setDouble (unsigned index, double value) |
| Sets the field at index to value, if possible. More...
|
|
bool | setQuantity (unsigned index, const Quantity &q) |
| Sets the field at index to q, if possible. More...
|
|
bool | setUnsigned (unsigned index, unsigned value) |
| Sets the field at index to value, if possible. More...
|
|
bool | setInt (unsigned index, int value) |
| Sets the field at index to value, if possible. More...
|
|
IdfExtensibleGroup | pushExtensibleGroup () |
| Pushes a new extensible group onto the object, if possible. More...
|
|
IdfExtensibleGroup | pushExtensibleGroup (const std::vector< std::string > &values) |
| Pushes a new extensible group onto the object, if possible. More...
|
|
IdfExtensibleGroup | insertExtensibleGroup (unsigned groupIndex) |
| Inserts a new extensible group at groupIndex, if possible. More...
|
|
IdfExtensibleGroup | insertExtensibleGroup (unsigned groupIndex, const std::vector< std::string > &values) |
| Inserts a new extensible group at groupIndex, if possible. More...
|
|
std::vector< std::string > | popExtensibleGroup () |
| Pops the final extensible group from the object, if possible. More...
|
|
std::vector< std::string > | eraseExtensibleGroup (unsigned groupIndex) |
| Erases the extensible group at groupIndex, if possible. More...
|
|
std::vector< std::vector
< std::string > > | clearExtensibleGroups () |
| Pops all IdfExtensibleGroups from the object, if possible. More...
|
|
unsigned | numFields () const |
| Returns the current number of fields (including extensible groups) in the object. More...
|
|
unsigned | numNonextensibleFields () const |
| Returns the current number of non-extensible fields in the object. More...
|
|
unsigned | minFields () const |
| Returns the minimum number of fields an object of this type must have to be valid. More...
|
|
boost::optional< unsigned > | maxFields () const |
| Returns the maximum number of fields an object of this type can have and still be valid. More...
|
|
unsigned | numExtensibleGroups () const |
| Returns the number of extensible groups in the object. More...
|
|
unsigned | minExtensibleGroups () const |
| Returns the minimum number of IdfExtensibleGroups an object of this type must have to be valid. More...
|
|
boost::optional< unsigned > | maxExtensibleGroups () const |
| Returns the maximum number of IdfExtensibleGroups an object of this type must have to be valid. More...
|
|
bool | isObjectListField (unsigned index) const |
| Returns true if index is in objectListFields(). More...
|
|
std::vector< unsigned > | objectListFields () const |
| Returns the indices of all fields that can point to other objects. More...
|
|
bool | isDataField (unsigned index) const |
| Returns true if index is in dataFields(). More...
|
|
std::vector< unsigned > | dataFields () const |
| Returns the indices of all fields that are not managedObjectListFields(). More...
|
|
std::vector< unsigned > | requiredFields () const |
| Returns the indices of all fields that are required, as defined by the IddObject. More...
|
|
bool | isValid (StrictnessLevel level, bool checkNames=false) const |
| Returns true if this IdfObject is valid, that is, has no errors at or below level. More...
|
|
ValidityReport | validityReport (StrictnessLevel level, bool checkNames=false) const |
| Returns a ValidityReport for this IdfObject containing all errors at or below level. More...
|
|
bool | dataFieldsEqual (const IdfObject &other) const |
| Checks for equality of data (non-managedObjectList) fields. More...
|
|
bool | objectListFieldsEqual (const IdfObject &other) const |
| Checks for equality of objectListFields(). More...
|
|
bool | objectListFieldsNonConflicting (const IdfObject &other) const |
| Returns true if for all managedObjectListFields() that for both objects are non-empty, the values are equal (using the same criteria as objectListFieldsEqual). More...
|
|
bool | operator== (const IdfObject &other) const |
| Equality comparator for IdfObjects. More...
|
|
bool | operator!= (const IdfObject &other) const |
| Negation of operator==. More...
|
|
template<typename T > |
T | cast () const |
| cast to type T, can throw std::bad_cast More...
|
|
template<typename T > |
boost::optional< T > | optionalCast () const |
| cast to optional of type T More...
|
|
std::ostream & | print (std::ostream &os) const |
| Serialize this object to os as Idf text. More...
|
|
std::ostream & | printName (std::ostream &os, bool hasFields=true) const |
| Serialize just the preceding comments and name of this IdfObject in the format used by full object print. More...
|
|
std::ostream & | printField (std::ostream &os, unsigned index, bool isLastField=false) const |
| Serialize field index in the format used by full object print. More...
|
|