SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
10 #ifndef smtk_attribute_ResourceItem_h
11 #define smtk_attribute_ResourceItem_h
13 #include "smtk/attribute/ReferenceItem.h"
15 #include "smtk/resource/Resource.h"
27 class ResourceItemDefinition;
49 ResourcePtr value(std::size_t ii = 0)
const;
60 bool appendValue(ResourcePtr value,
bool allowDuplicates =
true)
67 std::string valueAsString(std::size_t i)
const override;
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
bool appendValue(const PersistentObjectPtr &val, bool allowDuplicates=true)
Add val if it is allowed and val is not already present in the item unless allowDuplicates is true.
Definition: ReferenceItem.cxx:634
bool appendValue(ResourcePtr value, bool allowDuplicates=true)
Append a value to the item if possible.
Definition: ResourceItem.h:60
The base class for items that hold information inside an attribute.
Definition: Item.h:47
#define smtkTypeMacro(...)
Add typedefs to a class for identifcation.
Definition: SharedFromThis.h:128
Hold associations that link resources or components as an attribute value.
Definition: ReferenceItem.h:51
A definition for attribute items that store Resources as values.
Definition: ResourceItemDefinition.h:25
bool setValue(ResourcePtr value)
Set the 0-th value, ensuring type-safety.
Definition: ResourceItem.h:52
#define smtkSuperclassMacro(...)
Add a typedef to the superclass of this class.
Definition: SharedFromThis.h:147
An abstract base class for SMTK resources.
Definition: Resource.h:72
Represent a (possibly composite) value according to a definition.
Definition: Attribute.h:50
Hold resources as an attribute value.
Definition: ResourceItem.h:34
std::string valueAsString() const override
Serialize the i-th value to a string.
Definition: ResourceItem.h:66
smtk::shared_ptr< smtk::attribute::Resource > ResourcePtr
Definition: PublicPointerDefs.h:611
smtk::shared_ptr< smtk::resource::Resource > ResourcePtr
Definition: PublicPointerDefs.h:302