#include <IdfExtensibleGroup.hpp>
Public Member Functions | |
Constructors and Destructors | |
virtual | ~IdfExtensibleGroup () |
Getters | |
std::vector< std::string > | fields (bool returnDefault=false) const |
Returns this extensible group's fields. More... | |
std::vector< std::string > | fieldComments (bool returnDefault=false) const |
Returns the comments associated with this extensible group's fields. More... | |
boost::optional< std::string > | fieldComment (unsigned fieldIndex, bool returnDefault=false) const |
Returns the comment associated with this extensible group's field fieldIndex. More... | |
boost::optional< std::string > | getString (unsigned fieldIndex, bool returnDefault=false) const |
Returns the string value of this extensible group's field fieldIndex, if that field exists (isValid(fieldIndex)). More... | |
bool | isEmpty (unsigned fieldIndex) const |
Returns true if the field is empty. More... | |
boost::optional< double > | getDouble (unsigned fieldIndex, bool returnDefault=false) const |
Returns the value, converted to type double, of this extensible group's field fieldIndex, if possible. More... | |
boost::optional< unsigned > | getUnsigned (unsigned fieldIndex, bool returnDefault=false) const |
Returns the value, converted to type unsigned, of this extensible group's field fieldIndex, if possible. More... | |
boost::optional< int > | getInt (unsigned fieldIndex, bool returnDefault=false) const |
Returns the value, converted to type int, of this extensible group's field fieldIndex, if possible. More... | |
Setters | |
bool | setFieldComment (unsigned fieldIndex, const std::string &cmnt) |
Sets the comment associated with this extensible group's field fieldIndex, if possible. More... | |
bool | setFields (const std::vector< std::string > &values) |
Set all the fields in this IdfExtensibleGroup, if possible. More... | |
bool | setString (unsigned fieldIndex, const std::string &value) |
Set this extensible group's field fieldIndex to value, if possible. More... | |
bool | setString (unsigned fieldIndex, const std::string &value, bool checkValidity) |
setString that can delay signal emits. More... | |
bool | setDouble (unsigned fieldIndex, double value) |
Set this extensible group's field fieldIndex to value, if possible. More... | |
bool | setUnsigned (unsigned fieldIndex, unsigned value) |
Set this extensible group's field fieldIndex to value, if possible. More... | |
bool | setInt (unsigned fieldIndex, int value) |
Set this extensible group's field fieldIndex to value, if possible. More... | |
IdfExtensibleGroup | pushClone () const |
Clones the data in this extensible group, and pushes the new extensible group onto the end of the enclosing object. More... | |
IdfExtensibleGroup | insertClone (unsigned groupIndex) const |
Clones the data in this extensible group, and inserts the new extensible group at groupIndex within the enclosing object. More... | |
Queries | |
bool | empty () const |
Returns true if this ExtensibleGroup holds no data. More... | |
unsigned | groupIndex () const |
Returns the (group) index of this ExtensibleGroup. More... | |
unsigned | numFields () const |
Returns the number of fields in this ExtensibleGroup. More... | |
bool | isValid (unsigned fieldIndex) const |
Returns true if fieldIndex is valid for this extensible group. More... | |
std::vector< unsigned > | objectListFields () const |
Returns the indices of all fields that can point to other objects. More... | |
std::vector< unsigned > | dataFields () const |
Returns the indices of all fields that are not objectListFields() (and are therefore plain alpha or numeric data). More... | |
std::vector< unsigned > | requiredFields () const |
Returns the indices of all fields in this ExtensibleGroup that are required, as defined by the IddObject. More... | |
bool | operator== (const IdfExtensibleGroup &other) const |
Equality comparator for IdfExtensibleGroups. More... | |
bool | operator!= (const IdfExtensibleGroup &other) const |
Negation of operator==. More... | |
Type Casting | |
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... | |
template<typename T > | |
T | getObject () const |
Get the parent object. More... | |
template<typename T > | |
boost::optional< T > | getOptionalObject () const |
Get the parent object. More... | |
Related Functions | |
(Note that these are not member functions.) | |
typedef std::vector < IdfExtensibleGroup > | IdfExtensibleGroupVector |
IdfExtensibleGroup wraps a single set of extensible fields in an IdfObject.
For instance, many geometric objects have extensible groups each of which represents a single vertex (one three-dimensional point). (Also see the documentation for IddObject, IddObjectProperties, and ExtensibleIndex.)
|
inlinevirtual |
|
inline |
cast to type T, can throw std::bad_cast
std::vector<unsigned> openstudio::IdfExtensibleGroup::dataFields | ( | ) | const |
Returns the indices of all fields that are not objectListFields() (and are therefore plain alpha or numeric data).
bool openstudio::IdfExtensibleGroup::empty | ( | ) | const |
Returns true if this ExtensibleGroup holds no data.
boost::optional<std::string> openstudio::IdfExtensibleGroup::fieldComment | ( | unsigned | fieldIndex, |
bool | returnDefault = false |
||
) | const |
Returns the comment associated with this extensible group's field fieldIndex.
std::vector<std::string> openstudio::IdfExtensibleGroup::fieldComments | ( | bool | returnDefault = false | ) | const |
Returns the comments associated with this extensible group's fields.
std::vector<std::string> openstudio::IdfExtensibleGroup::fields | ( | bool | returnDefault = false | ) | const |
boost::optional<double> openstudio::IdfExtensibleGroup::getDouble | ( | unsigned | fieldIndex, |
bool | returnDefault = false |
||
) | const |
Returns the value, converted to type double, of this extensible group's field fieldIndex, if possible.
boost::optional<int> openstudio::IdfExtensibleGroup::getInt | ( | unsigned | fieldIndex, |
bool | returnDefault = false |
||
) | const |
Returns the value, converted to type int, of this extensible group's field fieldIndex, if possible.
|
inline |
Get the parent object.
|
inline |
Get the parent object.
boost::optional<std::string> openstudio::IdfExtensibleGroup::getString | ( | unsigned | fieldIndex, |
bool | returnDefault = false |
||
) | const |
Returns the string value of this extensible group's field fieldIndex, if that field exists (isValid(fieldIndex)).
boost::optional<unsigned> openstudio::IdfExtensibleGroup::getUnsigned | ( | unsigned | fieldIndex, |
bool | returnDefault = false |
||
) | const |
Returns the value, converted to type unsigned, of this extensible group's field fieldIndex, if possible.
unsigned openstudio::IdfExtensibleGroup::groupIndex | ( | ) | const |
Returns the (group) index of this ExtensibleGroup.
Indexing starts at 0. Throws if ExtensibleGroup is empty().
IdfExtensibleGroup openstudio::IdfExtensibleGroup::insertClone | ( | unsigned | groupIndex | ) | const |
Clones the data in this extensible group, and inserts the new extensible group at groupIndex within the enclosing object.
The returned IdfExtensibleGroup will be empty() if the operation cannot be completed.
bool openstudio::IdfExtensibleGroup::isEmpty | ( | unsigned | fieldIndex | ) | const |
Returns true if the field is empty.
bool openstudio::IdfExtensibleGroup::isValid | ( | unsigned | fieldIndex | ) | const |
Returns true if fieldIndex is valid for this extensible group.
unsigned openstudio::IdfExtensibleGroup::numFields | ( | ) | const |
Returns the number of fields in this ExtensibleGroup.
std::vector<unsigned> openstudio::IdfExtensibleGroup::objectListFields | ( | ) | const |
Returns the indices of all fields that can point to other objects.
bool openstudio::IdfExtensibleGroup::operator!= | ( | const IdfExtensibleGroup & | other | ) | const |
Negation of operator==.
bool openstudio::IdfExtensibleGroup::operator== | ( | const IdfExtensibleGroup & | other | ) | const |
Equality comparator for IdfExtensibleGroups.
Tests for strict identity (same IdfObject, same groupIndex()).
|
inline |
cast to optional of type T
IdfExtensibleGroup openstudio::IdfExtensibleGroup::pushClone | ( | ) | const |
Clones the data in this extensible group, and pushes the new extensible group onto the end of the enclosing object.
The returned IdfExtensibleGroup will be empty() if the operation cannot be completed.
std::vector<unsigned> openstudio::IdfExtensibleGroup::requiredFields | ( | ) | const |
Returns the indices of all fields in this ExtensibleGroup that are required, as defined by the IddObject.
bool openstudio::IdfExtensibleGroup::setDouble | ( | unsigned | fieldIndex, |
double | value | ||
) |
Set this extensible group's field fieldIndex to value, if possible.
Returns false if it cannot be set for any reason.
bool openstudio::IdfExtensibleGroup::setFieldComment | ( | unsigned | fieldIndex, |
const std::string & | cmnt | ||
) |
Sets the comment associated with this extensible group's field fieldIndex, if possible.
Otherwise, returns false.
bool openstudio::IdfExtensibleGroup::setFields | ( | const std::vector< std::string > & | values | ) |
Set all the fields in this IdfExtensibleGroup, if possible.
Returns false if values is wrong size or setString fails on any individual fields.
bool openstudio::IdfExtensibleGroup::setInt | ( | unsigned | fieldIndex, |
int | value | ||
) |
Set this extensible group's field fieldIndex to value, if possible.
Returns false if it cannot be set for any reason.
bool openstudio::IdfExtensibleGroup::setString | ( | unsigned | fieldIndex, |
const std::string & | value | ||
) |
Set this extensible group's field fieldIndex to value, if possible.
Returns false if it cannot be set for any reason.
bool openstudio::IdfExtensibleGroup::setString | ( | unsigned | fieldIndex, |
const std::string & | value, | ||
bool | checkValidity | ||
) |
setString that can delay signal emits.
bool openstudio::IdfExtensibleGroup::setUnsigned | ( | unsigned | fieldIndex, |
unsigned | value | ||
) |
Set this extensible group's field fieldIndex to value, if possible.
Returns false if it cannot be set for any reason.
|
related |