SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
A base class for all arc implementations. More...
#include <ArcImplementationBase.h>
Public Types | |
using | RuntimeNodeVisitor = std::function< smtk::common::Visit(const Component *node)> |
The signature for functors that are invoked on a visit. | |
Public Member Functions | |
virtual std::string | typeName () const |
Return the type of arc this class implements. | |
virtual Directionality | directionality () const |
Return whether arcs of this type are directed or undirected. | |
virtual bool | mutability () const |
If true, methods that edit arcs may sometimes return true. More... | |
virtual bool | explicitStorage () const |
If true, arc endpoint connections are explicitly stored by SMTK. More... | |
virtual std::unordered_set< smtk::string::Token > | fromTypes () const |
The set of query-filter strings describing nodes that may serve as "from" endpoints. | |
virtual std::unordered_set< smtk::string::Token > | toTypes () const |
The set of query-filter strings describing nodes that may serve as "to" endpoints. | |
virtual std::size_t | minimumOutDegree () const |
The minimum out-degree of a FromType node. This is not enforced. | |
virtual std::size_t | minimumInDegree () const |
The minimum in-degree of a ToType node. This is not enforced. | |
virtual std::size_t | maximumOutDegree () const |
The maximum out-degree of a FromType node. This is enforced. | |
virtual std::size_t | maximumInDegree () const |
The maximum in-degree of a ToType node. This is enforced. | |
virtual bool | acceptsRuntime (Component *from, Component *to, Component *beforeFrom=nullptr, Component *beforeTo=nullptr) const |
Returns true if an arc between the proposed nodes may be inserted. More... | |
virtual RuntimeArcEndpoint< ConstArc > | outgoingRuntime (const Component *from) const |
Return a "container" of outgoing arcs of the given from node. | |
virtual RuntimeArcEndpoint< NonConstArc > | outgoingRuntime (const Component *from) |
virtual RuntimeArcEndpoint< ConstArc > | incomingRuntime (const Component *to) const |
Return a "container" of incoming arcs of the given to node. | |
virtual RuntimeArcEndpoint< NonConstArc > | incomingRuntime (const Component *to) |
virtual smtk::common::Visited | visitOutgoingNodes (const smtk::graph::ResourceBase *resource, smtk::string::Token arcTypeName, RuntimeNodeVisitor visitor) const |
Invoke the visitor on all arcs (in their outgoing sense). | |
A base class for all arc implementations.
This class provides a runtime API for arc endpoints at a given "self" node.
|
inlinevirtual |
Returns true if an arc between the proposed nodes may be inserted.
This is used by some smtk::operation::Operation::ableToOperate() overrides to validate inputs.
|
inlinevirtual |
If true, arc endpoint connections are explicitly stored by SMTK.
Otherwise, fetching arcs is procedural.
|
inlinevirtual |
If true, methods that edit arcs may sometimes return true.
Otherwise, arcs may never be edited.