VPTissue Reference Manual
|
Manages attributes. More...
#include <AttributeContainer.h>
Public Member Functions | |
AttributeContainer (size_t n=0) | |
Creates an empty AttributeContainer. | |
template<typename T > | |
void | Add (const std::string &name) |
Adds a named attribute of type T. | |
template<typename T > | |
T | Get (size_t index, const std::string &name) const |
Returns the value of a named attribute. | |
template<typename T > | |
std::vector< T > | GetAll (const std::string &name) const |
Returns all values of a named attribute. | |
template<typename T > | |
std::vector< std::string > | GetNames () const |
Returns a vector containing the names of attributes of type T. | |
size_t | GetNum () const |
Returns size of each of the attribute containers. | |
template<typename T > | |
bool | IsName (const std::string &name) const |
Returns true if there is an attribute of type T with a specific name. | |
void | Print (std::ostream &out) const |
Prints a textual representation of this AttributeContainer. | |
template<typename T > | |
void | Set (size_t index, const std::string &name, T value) |
Sets the value of a named attribute. | |
template<typename T > | |
void | SetAll (const std::string &name, const std::vector< T > &values) |
Sets all values of a named attribute. | |
void | SetNum (size_t n) |
Set size of each of the attribute containers. | |
Manages attributes.
NOTE that the collective node operations assume the passed/retrieved containers to be ordered by node index and NOT by node ID!
Definition at line 41 of file AttributeContainer.h.