![]() |
Chemical Data Processing Library C++ API - Version 1.3.0
|
#include <Object3D.hpp>
Public Types | |
typedef std::shared_ptr< Object3D > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated Object3D instances. More... | |
![]() | |
typedef PropertyMap::value_type | PropertyEntry |
A Base::LookupKey / Base::Any pair that stores the property value for a given property key. More... | |
typedef PropertyMap::const_iterator | ConstPropertyIterator |
A constant iterator used to iterate over the property entries. More... | |
Public Member Functions | |
Object3D () | |
Default constructor. More... | |
Object3D (const Object3D &obj) | |
Constructs a copy of the Object3D instance obj. More... | |
virtual | ~Object3D () |
Virtual destructor. More... | |
Object3D & | operator= (const Object3D &obj) |
Assignment operator. More... | |
void | clear () |
std::size_t | getNumSubObjects () const |
ConstObject3DIterator | getSubObjectsBegin () const |
Returns a constant iterator pointing to the beginning of the sub-objects. More... | |
Object3DIterator | getSubObjectsBegin () |
Returns a mutable iterator pointing to the beginning of the sub-objects. More... | |
ConstObject3DIterator | getSubObjectsEnd () const |
Returns a constant iterator pointing to the end of the sub-objects. More... | |
Object3DIterator | getSubObjectsEnd () |
Returns a mutable iterator pointing to the end of the sub-objects. More... | |
ConstObject3DIterator | begin () const |
Returns a constant iterator pointing to the beginning of the sub-objects. More... | |
Object3DIterator | begin () |
Returns a mutable iterator pointing to the beginning of the sub-objects. More... | |
ConstObject3DIterator | end () const |
Returns a constant iterator pointing to the end of the sub-objects. More... | |
Object3DIterator | end () |
Returns a mutable iterator pointing to the end of the sub-objects. More... | |
const Object3D & | getSubObject (std::size_t idx) const |
Object3D & | getSubObject (std::size_t idx) |
Object3D & | addSubObject () |
Object3D & | addSubObject (const SharedPointer &object) |
void | removeSubObject (std::size_t idx) |
Object3DIterator | removeSubObject (const Object3DIterator &it) |
Removes the sub-object specified by the iterator it. More... | |
![]() | |
std::size_t | getNumProperties () const |
Returns the number of property entries. More... | |
template<typename T > | |
void | setProperty (const LookupKey &key, T &&val) |
Sets the value of the property specified by key to val. More... | |
template<typename T > | |
const T & | getProperty (const LookupKey &key) const |
Returns the value of the property specified by key as a const reference to an object of type T. More... | |
template<typename T > | |
const T & | getPropertyOrDefault (const LookupKey &key, const T &def_val) const |
Returns the value of the property specified by key as a const reference to an object of type T, or the default value def_val if a stored value does not exist. More... | |
const Any & | getProperty (const LookupKey &key, bool throw_=false) const |
Returns the value of the property specified by key. More... | |
bool | isPropertySet (const LookupKey &key) const |
Tells whether or not a value has been assigned to the property specified by key. More... | |
ConstPropertyIterator | getPropertiesBegin () const |
Returns a constant iterator pointing to the beginning of the property entries. More... | |
ConstPropertyIterator | getPropertiesEnd () const |
Returns a constant iterator pointing to the end of the property entries. More... | |
ConstPropertyIterator | begin () const |
Returns a constant iterator pointing to the beginning of the property entries. More... | |
ConstPropertyIterator | end () const |
Returns a constant iterator pointing to the end of the property entries. More... | |
bool | removeProperty (const LookupKey &key) |
Clears the value of the property specified by key. More... | |
void | clearProperties () |
Clears all property values. More... | |
void | addProperties (const PropertyContainer &cntnr) |
Adds the property value entries in the PropertyContainer instance cntnr. More... | |
void | copyProperties (const PropertyContainer &cntnr) |
Replaces the current set of properties by a copy of the entries in cntnr. More... | |
void | swap (PropertyContainer &cntnr) |
Exchanges the properties of this container with the properties of the container cntnr. More... | |
const PropertyContainer & | getProperties () const |
Returns a const reference to itself. More... | |
Additional Inherited Members | |
![]() | |
PropertyContainer () | |
Constructs an empty PropertyContainer instance. More... | |
PropertyContainer (const PropertyContainer &cntnr) | |
Constructs a copy of the PropertyContainer instance cntnr. More... | |
virtual | ~PropertyContainer () |
Virtual destructor. More... | |
PropertyContainer & | operator= (const PropertyContainer &cntnr) |
Assignment operator. More... | |
typedef std::shared_ptr<Object3D> CDPL::Vis::Object3D::SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated Object3D
instances.
CDPL::Vis::Object3D::Object3D | ( | ) |
Default constructor.
CDPL::Vis::Object3D::Object3D | ( | const Object3D & | obj | ) |
Constructs a copy of the Object3D
instance obj.
obj | The Object3D instance to copy. |
|
inlinevirtual |
Virtual destructor.
Assignment operator.
obj | The Object3D instance to copy. |
void CDPL::Vis::Object3D::clear | ( | ) |
std::size_t CDPL::Vis::Object3D::getNumSubObjects | ( | ) | const |
ConstObject3DIterator CDPL::Vis::Object3D::getSubObjectsBegin | ( | ) | const |
Returns a constant iterator pointing to the beginning of the sub-objects.
Object3DIterator CDPL::Vis::Object3D::getSubObjectsBegin | ( | ) |
Returns a mutable iterator pointing to the beginning of the sub-objects.
ConstObject3DIterator CDPL::Vis::Object3D::getSubObjectsEnd | ( | ) | const |
Returns a constant iterator pointing to the end of the sub-objects.
Object3DIterator CDPL::Vis::Object3D::getSubObjectsEnd | ( | ) |
Returns a mutable iterator pointing to the end of the sub-objects.
ConstObject3DIterator CDPL::Vis::Object3D::begin | ( | ) | const |
Returns a constant iterator pointing to the beginning of the sub-objects.
Object3DIterator CDPL::Vis::Object3D::begin | ( | ) |
Returns a mutable iterator pointing to the beginning of the sub-objects.
ConstObject3DIterator CDPL::Vis::Object3D::end | ( | ) | const |
Returns a constant iterator pointing to the end of the sub-objects.
Object3DIterator CDPL::Vis::Object3D::end | ( | ) |
Returns a mutable iterator pointing to the end of the sub-objects.
const Object3D& CDPL::Vis::Object3D::getSubObject | ( | std::size_t | idx | ) | const |
Object3D& CDPL::Vis::Object3D::getSubObject | ( | std::size_t | idx | ) |
Object3D& CDPL::Vis::Object3D::addSubObject | ( | ) |
Object3D& CDPL::Vis::Object3D::addSubObject | ( | const SharedPointer & | object | ) |
void CDPL::Vis::Object3D::removeSubObject | ( | std::size_t | idx | ) |
Object3DIterator CDPL::Vis::Object3D::removeSubObject | ( | const Object3DIterator & | it | ) |
Removes the sub-object specified by the iterator it.
it | An iterator that specifies the sub-object to remove. |
Base::RangeError | if the number of sub-objects is zero or it is not in the range [getSubObjectsBegin(), getSubObjectsEnd() - 1]. |