SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
10 #ifndef smtk_markup_Component_h
11 #define smtk_markup_Component_h
13 #include "smtk/markup/Exports.h"
15 #include "smtk/graph/ArcImplementation.h"
16 #include "smtk/graph/Component.h"
18 #include "vtkSmartPointer.h"
20 #include "nlohmann/json.hpp"
22 #include <type_traits>
38 template<
typename ArcTraits,
typename Constness,
typename Outgoingness>
50 struct GroupsToMembers;
51 struct LabelsToSubjects;
52 struct OntologyIdentifiersToIndividuals;
53 struct URLsToImportedData;
62 using Serialize = std::true_type;
63 using Index = std::size_t;
65 template<
typename... Args>
73 virtual void initialize(
const nlohmann::json& data, smtk::resource::json::Helper& helper);
76 Component::Index index()
const;
79 std::string name()
const override;
82 bool setName(
const std::string& name);
115 ontologyClasses()
const;
139 std::shared_ptr<AssignedIds>& targetAssignment);
143 const vtkSmartPointer<vtkDataObject>& baseSourceData,
144 vtkSmartPointer<vtkDataObject>& baseTargetData,
151 template<
typename DataType>
153 const vtkSmartPointer<DataType>& sourceData,
154 vtkSmartPointer<DataType>& targetData,
157 vtkSmartPointer<vtkDataObject> baseTargetData = targetData;
158 bool didCopy = this->copyBaseData(sourceData, baseTargetData, options);
161 targetData =
dynamic_cast<DataType*
>(baseTargetData.GetPointer());
172 #endif // smtk_markup_Component_h
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
Graph Component represents a node in the graph resource.
Definition: Component.h:66
An API for querying the IDs allotted to a component in an IdSpace.
Definition: AssignedIds.h:31
For endpoint interfaces, provide tag classes used to select incoming or outgoing APIs.
Definition: ArcTraits.h:34
Definition: Component.h:56
An object that a node instance can present to access/edit its outgoing/incoming arcs.
Definition: ArcImplementation.h:52
bool copyData(const vtkSmartPointer< DataType > &sourceData, vtkSmartPointer< DataType > &targetData, smtk::resource::CopyOptions &options)
Copy the sourceData into the targetData.
Definition: Component.h:152
For endpoint interfaces, provide tag classes used to select const or non-const APIs.
Definition: ArcTraits.h:26
#define smtkTypeMacro(...)
Add typedefs to a class for identifcation.
Definition: SharedFromThis.h:128
Definition: CopyOptions.h:31
static const Component::Index type_index
A unique integer corresponding to the component type.
Definition: Component.h:85
#define smtkSuperclassMacro(...)
Add a typedef to the superclass of this class.
Definition: SharedFromThis.h:147
Definition: Component.cxx:25