10 #ifndef smtk_attribute_CustomItem_h
11 #define smtk_attribute_CustomItem_h
13 #include "smtk/CoreExports.h"
16 #include "smtk/attribute/CustomItemDefinition.h"
17 #include "smtk/attribute/Item.h"
19 #include "smtk/common/CompilerInformation.h"
21 SMTK_THIRDPARTY_PRE_INCLUDE
22 #include "nlohmann/json.hpp"
23 SMTK_THIRDPARTY_POST_INCLUDE
43 :
Item(owningAttribute, itemPosition)
48 :
Item(owningItem, myPosition, mySubGroupPosition)
52 virtual const CustomItemBase& operator>>(nlohmann::json& json)
const = 0;
55 virtual const CustomItemBase& operator>>(pugi::xml_node& node)
const = 0;
61 template<
typename ItemType>
65 typedef std::shared_ptr<ItemType> Ptr;
67 static Ptr New(
const std::string& myName) {
return Ptr(
new ItemType(myName)); }
83 return !((def ==
nullptr) || (!Item::setDefinition(adef)));
86 Item::Type type()
const override {
return this->definition()->type(); }