SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
11 #ifndef smtk_graph_ArcImplementationBase_h
12 #define smtk_graph_ArcImplementationBase_h
14 #include "smtk/CoreExports.h"
15 #include "smtk/graph/ArcProperties.h"
16 #include "smtk/graph/ArcTraits.h"
17 #include "smtk/graph/Directionality.h"
18 #include "smtk/resource/Component.h"
19 #include "smtk/string/Token.h"
27 template<
typename Const>
43 virtual std::string
typeName()
const {
return std::string(); }
57 virtual std::unordered_set<smtk::string::Token>
fromTypes()
const {
return {}; }
59 virtual std::unordered_set<smtk::string::Token>
toTypes()
const {
return {}; }
129 #endif // smtk_graph_ArcImplementationBase_h
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
Graph Component represents a node in the graph resource.
Definition: Component.h:66
virtual std::unordered_set< smtk::string::Token > toTypes() const
The set of query-filter strings describing nodes that may serve as "to" endpoints.
Definition: ArcImplementationBase.h:59
@ Empty
The were no values to visit.
Directionality
An enumeration indicated whether an arc is directed or undirected.
Definition: Directionality.h:25
virtual RuntimeArcEndpoint< ConstArc > outgoingRuntime(const Component *from) const
Return a "container" of outgoing arcs of the given from node.
Definition: ArcImplementationBase.h:90
virtual RuntimeArcEndpoint< ConstArc > incomingRuntime(const Component *to) const
Return a "container" of incoming arcs of the given to node.
Definition: ArcImplementationBase.h:102
virtual std::size_t maximumOutDegree() const
The maximum out-degree of a FromType node. This is enforced.
Definition: ArcImplementationBase.h:66
virtual bool explicitStorage() const
If true, arc endpoint connections are explicitly stored by SMTK.
Definition: ArcImplementationBase.h:54
Visit
Return values common to most visitor methods.
Definition: Visit.h:23
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).
Definition: ArcImplementationBase.h:114
An object that can query and manipulate arcs at run-time.
Definition: ArcImplementationBase.h:28
std::function< smtk::common::Visit(const Component *node)> RuntimeNodeVisitor
The signature for functors that are invoked on a visit.
Definition: ArcImplementationBase.h:38
virtual Directionality directionality() const
Return whether arcs of this type are directed or undirected.
Definition: ArcImplementationBase.h:46
virtual std::string typeName() const
Return the type of arc this class implements.
Definition: ArcImplementationBase.h:43
Visited
Return value for functions/methods that accept visitors.
Definition: Visit.h:35
constexpr std::size_t unconstrained()
Return a constant used to indicate the maximimum degree of an arc endpoint is unconstrained.
Definition: ArcProperties.h:30
virtual std::size_t maximumInDegree() const
The maximum in-degree of a ToType node. This is enforced.
Definition: ArcImplementationBase.h:68
virtual std::unordered_set< smtk::string::Token > fromTypes() const
The set of query-filter strings describing nodes that may serve as "from" endpoints.
Definition: ArcImplementationBase.h:57
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.
Definition: ArcImplementationBase.h:76
virtual bool mutability() const
If true, methods that edit arcs may sometimes return true.
Definition: ArcImplementationBase.h:50
A string token identified by an integer.
Definition: Token.h:29
A base class for all arc implementations.
Definition: ArcImplementationBase.h:34
A non-templated base class for graph resources.
Definition: ResourceBase.h:35
virtual std::size_t minimumOutDegree() const
The minimum out-degree of a FromType node. This is not enforced.
Definition: ArcImplementationBase.h:62
virtual std::size_t minimumInDegree() const
The minimum in-degree of a ToType node. This is not enforced.
Definition: ArcImplementationBase.h:64