SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
10 #ifndef smtk_view_VTKSelectionResponderGroup_h
11 #define smtk_view_VTKSelectionResponderGroup_h
14 #include "smtk/extension/paraview/server/RespondToVTKSelection.h"
15 #include "smtk/extension/paraview/server/smtkPVServerExtModule.h"
17 #include "smtk/attribute/Attribute.h"
18 #include "smtk/attribute/Definition.h"
19 #include "smtk/attribute/FileItem.h"
20 #include "smtk/attribute/FileItemDefinition.h"
22 #include "smtk/operation/Group.h"
23 #include "smtk/operation/Manager.h"
24 #include "smtk/operation/Operation.h"
25 #include "smtk/operation/SpecificationOps.h"
31 #include <type_traits>
55 static constexpr
const char*
const type_name =
"vtk selection responder";
58 const std::shared_ptr<smtk::operation::Manager>& manager,
59 const std::shared_ptr<smtk::resource::Manager>& resourceManager)
60 : Group(type_name, manager)
61 , m_resourceManager(resourceManager)
67 template<
typename ResourceType,
typename OperationType>
68 bool registerOperation();
74 std::set<std::string> supportedResources()
const;
77 std::weak_ptr<smtk::resource::Manager> m_resourceManager;
80 template<
typename ResourceType,
typename OperationType>
84 std::is_base_of<RespondToVTKSelection, OperationType>::value,
85 "Operations assigned to VTKSelectionResponderGroup must inherit RespondToVTKSelection");
86 return Group::registerOperation(
87 std::type_index(
typeid(OperationType)).hash_code(), { smtk::common::typeName<ResourceType>() });
93 #endif // __VTK_WRAP__
94 #endif // smtk_view_VTKSelectionResponderGroup_h
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
std::set< std::string > operationNames() const
Return a set of operation unique names that belong to this group.
Definition: Group.cxx:228
This class describes a stateless object associated with an operation manager that provides a unified ...
Definition: Group.h:49
std::string operationLabel(const Operation::Index &) const
Given an operation index, return the operation's label.
Definition: Group.cxx:270
A group of operations that update an SMTK selection based on a VTK selection.
Definition: VTKSelectionResponderGroup.h:44
bool contains() const
Check if an operation identified by its class type is in the group.
Definition: Group.h:187
Operation is a base class for all SMTK operations.
Definition: Operation.h:61
bool registerOperation()
Register an IO operation identified by its class type and the name of the resource it reads.
Definition: VTKSelectionResponderGroup.h:81
std::string operationName(const Operation::Index &) const
Given an operation index, return the operation's name.
Definition: Group.cxx:252
std::set< Operation::Index > operations() const
Return a set of operation indices that belong to this group.
Definition: Group.cxx:204
smtk::common::Singleton< detail::Manager > Manager
The Manager is a singleton interface for registering available plugins to manager instances.
Definition: Manager.h:92
bool unregisterOperation()
Unregister an operation identified by its class type.
Definition: Group.h:175
smtk::shared_ptr< smtk::resource::Resource > ResourcePtr
Definition: PublicPointerDefs.h:302