SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Classes | Public Member Functions | Static Public Attributes | Protected Attributes | Static Protected Attributes | List of all members
smtk::operation::ArcCreator Class Reference

A group holding operations which can connect a pair of Components instances. More...

#include <ArcCreator.h>

Inheritance diagram for smtk::operation::ArcCreator:
[legend]
Collaboration diagram for smtk::operation::ArcCreator:
[legend]

Classes

class  ArcDestinationItemName
 A sub-group holding the name of the destination-component ReferenceItem. More...
 

Public Member Functions

 ArcCreator (std::shared_ptr< smtk::operation::Manager > manager)
 
std::string arcDestinationItemNameForOperation (const std::string &typeName) const
 
std::string arcDestinationItemNameForOperation (const Operation::Index &index) const
 
smtk::attribute::ReferenceItemDefinition::Ptr arcDestinationItemDefinitionForOperation (const std::string &typeName) const
 
smtk::attribute::ReferenceItemDefinition::Ptr arcDestinationItemDefinitionForOperation (const Operation::Index &index) const
 
template<typename OperationType >
bool registerOperation (const std::set< std::string > &arcTypes, const std::string &arcDestinationItemName=s_defaultArcDestinationItemName)
 
bool registerOperation (Operation::Index operationIndex, const std::set< std::string > &arcTypes, const std::string &arcDestinationItemName=s_defaultArcDestinationItemName)
 
std::set< std::string > allArcTypes () const
 Return the set of all arc types which have operations that can create them.
 
std::set< std::pair< std::string, Operation::Index > > allArcCreators () const
 Return the set of all arc types, including the operation(s) that can create them.
 
std::unordered_set< Operation::IndexmatchingOperations (const smtk::resource::PersistentObject &from, const smtk::resource::PersistentObject &to) const
 Given an ordered pair of objects, return operations that can create an arc between them.
 
bool unregisterOperation (const std::string &)
 Unregister an operation identified by its unique name.
 
bool unregisterOperation (const Operation::Index &)
 Unregister an operation identified by its type index.
 
template<typename OperationType >
bool unregisterOperation ()
 Unregister an operation identified by its class type.
 

Static Public Attributes

static constexpr const char *const type_name = "arcCreator"
 

Protected Attributes

ArcDestinationItemName m_arcDestinationItemName
 
- Protected Attributes inherited from smtk::operation::Group
std::weak_ptr< smtk::operation::Managerm_manager
 

Static Protected Attributes

static const std::string s_defaultArcDestinationItemName = "to"
 

Additional Inherited Members

- Protected Types inherited from smtk::operation::Group
typedef GroupObserver Observer
 
typedef GroupObservers Observers
 
- Protected Member Functions inherited from smtk::operation::Group
std::size_t operationObjectDistance (const Operation::Index &index, const smtk::resource::PersistentObject &obj) const
 Return a "degree of fit" measure indicating how well an operation matches an object. More...
 
smtk::attribute::ConstReferenceItemDefinitionPtr operationAssociationsRule (const Operation::Index &index) const
 A utility to fetch association rules for a given operation (used in operationObjectDistance).
 
smtk::attribute::ConstReferenceItemDefinitionPtr operationReferenceItemRule (const Operation::Index &index, const std::string &itemName) const
 A utility to fetch reference-item rules for a given operation (used by subclasses such as ArcCreator).
 
 Group (const std::string &name, std::shared_ptr< smtk::operation::Manager > manager)
 
const std::string & name () const
 
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.
 
bool registerOperation (const Operation::Index &, std::set< std::string > values=std::set< std::string >())
 Register an operation identified by its type index and give it values.
 
template<typename OperationType >
bool registerOperation (std::set< std::string > values=std::set< std::string >())
 Register an operation identified by its class type and give it values.
 
bool unregisterOperation (const std::string &)
 Unregister an operation identified by its unique name.
 
bool unregisterOperation (const Operation::Index &)
 Unregister an operation identified by its type index.
 
template<typename OperationType >
bool unregisterOperation ()
 Unregister an operation identified by its class type.
 
Operation::Specification specification (const std::string &) const
 Access the specification of an operation identified by its unique name.
 
Operation::Specification specification (const Operation::Index &) const
 Access the specification of an operation identified by its type index.
 
template<typename OperationType >
Operation::Specification specification () const
 Access the specification of an operation identified by its class type.
 
bool contains (const std::string &) const
 Check if an operation identified by it's unique name is in the group.
 
bool contains (const Operation::Index &) const
 Check if an operation identified by its type index is in the group.
 
template<typename OperationType >
bool contains () const
 Check if an operation identified by its class type is in the group.
 
std::set< std::string > values (const std::string &) const
 Obtain values for an operation identified by it's unique name is in the group.
 
std::set< std::string > values (const Operation::Index &) const
 Obtain values for an operation identified by its type index is in the group.
 
template<typename OperationType >
std::set< std::string > values () const
 Obtain values for an operation identified by its class type is in the group.
 
std::set< Operation::Indexoperations () const
 Return a set of operation indices that belong to this group.
 
std::set< std::string > operationNames () const
 Return a set of operation unique names that belong to this group.
 
std::string operationName (const Operation::Index &) const
 Given an operation index, return the operation's name.
 
std::string operationLabel (const Operation::Index &) const
 Given an operation index, return the operation's label.
 

Detailed Description

A group holding operations which can connect a pair of Components instances.

All operations added to this group must

Also, operations in this group may have a StringItem named "arc type". This exists so that a single operation may be used to create arcs of many types. Each type of arc that an operation may create should be registered with the group.


The documentation for this class was generated from the following files: