SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
11 #ifndef smtk_operation_CreatorGroup_h
12 #define smtk_operation_CreatorGroup_h
14 #include "smtk/CoreExports.h"
16 #include "smtk/attribute/Attribute.h"
17 #include "smtk/attribute/Definition.h"
18 #include "smtk/attribute/FileItem.h"
19 #include "smtk/attribute/FileItemDefinition.h"
23 #include "smtk/operation/Group.h"
24 #include "smtk/operation/Manager.h"
25 #include "smtk/operation/Operation.h"
26 #include "smtk/operation/SpecificationOps.h"
47 static constexpr
const char*
const type_name =
"creator";
49 CreatorGroup(std::shared_ptr<smtk::operation::Manager> manager)
50 :
Group(type_name, manager)
56 template<
typename ResourceType>
57 bool registerOperation(
const std::string&);
61 template<
typename ResourceType>
62 bool registerOperation(
const Operation::Index&);
66 template<
typename ResourceType,
typename OperationType>
67 bool registerOperation();
71 std::set<Operation::Index> operationsForResource(
const std::string& resourceName)
const;
74 std::string resourceForOperation(
const std::string&)
const;
77 std::string resourceForOperation(
const Operation::Index&)
const;
81 template<
typename ResourceType>
82 std::set<Operation::Index> operationsForResource()
const;
84 std::set<std::string> supportedResources()
const;
87 template<
typename ResourceType>
93 template<
typename ResourceType>
99 template<
typename ResourceType,
typename OperationType>
103 std::type_index(
typeid(OperationType)).hash_code(), { smtk::common::typeName<ResourceType>() });
106 template<
typename ResourceType>
114 #endif // smtk_operation_CreatorGroup_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
bool registerOperation()
Register an IO operation identified by its class type and the name of the resource it reads.
Definition: CreatorGroup.h:100
This class describes a stateless object associated with an operation manager that provides a unified ...
Definition: Group.h:49
Definition: CreatorGroup.h:37
std::string operationLabel(const Operation::Index &) const
Given an operation index, return the operation's label.
Definition: Group.cxx:270
bool contains() const
Check if an operation identified by its class type is in the group.
Definition: Group.h:187
std::string operationName(const Operation::Index &) const
Given an operation index, return the operation's name.
Definition: Group.cxx:252
bool registerOperation(const std::string &, std::set< std::string > values=std::set< std::string >())
Register an operation identified by its unique name and give it values.
Definition: Group.cxx:64
std::set< Operation::Index > operationsForResource() const
Given a resource type, return the set of operators that were associated with the resource during regi...
Definition: CreatorGroup.h:107
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
std::string typeName()
Return the name of a class.
Definition: TypeName.h:289
bool unregisterOperation()
Unregister an operation identified by its class type.
Definition: Group.h:175