SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
An operation Manager is responsible for creating new operations and filtering operations based on input type. More...
#include <Manager.h>
Public Member Functions | |
smtkTypedefs (smtk::operation::Manager) | |
smtkCreateMacro (Manager) | |
template<typename OperationType > | |
bool | registerOperation () |
Register an operation identified by its class type. | |
template<typename OperationType > | |
bool | registerOperation (const std::string &) |
Register an operation identified by its class type and type name. | |
bool | registerOperation (Metadata &&) |
Register an operation identified by its type index. | |
template<typename Tuple > | |
bool | registerOperations () |
Register a tuple of operations identified by their class types. | |
template<typename Tuple > | |
bool | registerOperations (const std::array< std::string, std::tuple_size< Tuple >::value > &typeNames) |
Register a tuple of operations identified by their class types and type names. | |
template<typename OperationType > | |
bool | unregisterOperation () |
Unegister an operation identified by its class type. | |
bool | unregisterOperation (const std::string &) |
Unregister an operation identified by its type name. | |
bool | unregisterOperation (const Operation::Index &) |
Unregister an operation identified by its type index. | |
template<typename Tuple > | |
bool | unregisterOperations () |
bool | registered (const std::string &) const |
bool | registered (const Operation::Index &) const |
template<typename OperationNtype > | |
bool | registered () const |
std::shared_ptr< smtk::operation::Operation > | create (const std::string &) |
Construct an operation identified by its type name. | |
std::shared_ptr< smtk::operation::Operation > | create (const Operation::Index &) |
Construct an operation identified by its type index. | |
template<typename OperationType > | |
smtk::shared_ptr< OperationType > | create () |
Construct an operation identified by its class type. | |
Operation::Index | registeredTypeIndex (const std::string &typeName) const |
Return an operation's type index given its type name. More... | |
MetadataContainer & | metadata () |
Return the map of metadata. | |
Launchers & | launchers () |
Return the launchers associated with this manager. | |
const Launchers & | launchers () const |
Observers & | observers () |
Return the observers associated with this manager. | |
const Observers & | observers () const |
Group::Observers & | groupObservers () |
Return the group observers associated with this manager. | |
const Group::Observers & | groupObservers () const |
Metadata::Observers & | metadataObservers () |
Return the metadata observers associated with this manager. | |
const Metadata::Observers & | metadataObservers () const |
smtk::common::Managers::Ptr | managers () const |
void | setManagers (const smtk::common::Managers::Ptr &managers) |
bool | registerResourceManager (smtk::resource::ManagerPtr &) |
Assign a resource manager to manage resources created by operations. More... | |
std::set< std::string > | availableOperations () const |
Return a set of type names for all operations. | |
std::set< Operation::Index > | availableOperations (const smtk::resource::ComponentPtr &) const |
Given a resource component, return a set of indices for operations that can accept the component as input. | |
std::set< std::string > | availableGroups () const |
Query the registered operator metadata for operator group names. | |
template<typename ProjectType > | |
std::shared_ptr< ProjectType > | create (const std::shared_ptr< smtk::common::Managers > &m) |
template<typename ProjectType > | |
std::shared_ptr< ProjectType > | create (const smtk::common::UUID &id, const std::shared_ptr< smtk::common::Managers > &m) |
An operation Manager is responsible for creating new operations and filtering operations based on input type.
Operation types must first be registered with the Manager before operations of this type can be manipulated by the manager.
Operation::Index smtk::operation::Manager::registeredTypeIndex | ( | const std::string & | typeName | ) | const |
Return an operation's type index given its type name.
If the typeName is not registered, this will return 0.
bool smtk::operation::Manager::registerResourceManager | ( | smtk::resource::ManagerPtr & | resourceManager | ) |
Assign a resource manager to manage resources created by operations.
This method constructs an observer that registers created resources to the resource manager. It also constructs a metadata observer that assigns the resource manager to all generated instances of operations that inherit from ResourceManagerOperation.