SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
26 #ifndef smtk_attribute_ModelEntityItem_h
27 #define smtk_attribute_ModelEntityItem_h
29 #include "smtk/CoreExports.h"
30 #include "smtk/attribute/ComponentItem.h"
43 class ModelEntityItemDefinition;
62 bool setValues(I vbegin, I vend, std::size_t offset = 0);
64 bool appendValues(I vbegin, I vend);
72 using Superclass::valueAsString;
82 bool ModelEntityItem::setValues(I vbegin, I vend, std::size_t offset)
85 std::size_t num = vend - vbegin + offset;
90 for (I it = vbegin; it != vend; ++it, ++i)
92 if (!this->
setValue(offset + i, *it))
108 bool ModelEntityItem::appendValues(I vbegin, I vend)
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
Type
Definition: Item.h:56
Stores the definition of an attribute.
Definition: Definition.h:45
Definition: ModelEntityItemDefinition.h:26
void setIsEnabled(bool isEnabledValue)
Set the instance's local enabled state.
Definition: Item.h:181
bool setValue(ComponentPtr value)
Set the i-th value as a component.
Definition: ComponentItem.h:64
bool setNumberOfValues(std::size_t newSize)
Set the number of entities to be associated with this item (returns true if permitted).
Definition: ReferenceItem.cxx:317
The base class for items that hold information inside an attribute.
Definition: Item.h:47
bool appendValue(ComponentPtr value, bool allowDuplicates=true)
Append a value to the item if possible.
Definition: ComponentItem.h:72
#define smtkTypeMacro(...)
Add typedefs to a class for identifcation.
Definition: SharedFromThis.h:128
bool setValue(const smtk::model::EntityRef &val)
Set the entity stored with this item.
Definition: ModelEntityItem.cxx:54
Hold resource components as an attribute value.
Definition: ComponentItem.h:43
Definition: ModelEntityItem.h:44
std::size_t numberOfValues() const
Return the size of the item (number of entities associated with the item).
Definition: ReferenceItem.cxx:312
Represent a (possibly composite) value according to a definition.
Definition: Attribute.h:50
A lightweight entityref pointing to a model entity's resource.
Definition: EntityRef.h:112