SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
10 #ifndef smtk_attribute_CustomItemDefinition_h
11 #define smtk_attribute_CustomItemDefinition_h
13 #include "smtk/CoreExports.h"
16 #include "smtk/attribute/Item.h"
17 #include "smtk/attribute/ItemDefinition.h"
18 #include "smtk/attribute/Resource.h"
20 #include "smtk/common/CompilerInformation.h"
22 #include "smtk/resource/Manager.h"
23 #include "smtk/resource/Observer.h"
25 SMTK_THIRDPARTY_PRE_INCLUDE
26 #include "nlohmann/json.hpp"
27 SMTK_THIRDPARTY_POST_INCLUDE
60 template<
typename ItemType>
64 typedef std::shared_ptr<CustomItemDefinition> Ptr;
71 Item::Type type()
const override {
return Item::NUMBER_OF_TYPES; }
73 ItemPtr buildItem(
Attribute* owningAttribute,
int itemPosition)
const override
75 return ItemPtr(
new ItemType(owningAttribute, itemPosition));
78 ItemPtr buildItem(
Item* owningItem,
int position,
int subGroupPosition)
const override
80 return ItemPtr(
new ItemType(owningItem, position, subGroupPosition));
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
Type
Definition: Item.h:56
A base class for custom (i.e.
Definition: CustomItemDefinition.h:41
Custom item definitions inherit from from a specialization of this template class,...
Definition: CustomItemDefinition.h:61
Definition: ItemDefinition.h:42
std::ostream & operator<<(std::ostream &os, const State &s)
States may be appended to streams.
Definition: State.h:86
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
Represent a (possibly composite) value according to a definition.
Definition: Attribute.h:50
smtk::shared_ptr< smtk::attribute::Item > ItemPtr
Definition: PublicPointerDefs.h:474