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(); }
45 virtual Directionality directionality()
const {
return Directionality::IsDirected; }
46 virtual bool mutability()
const {
return false; }
48 virtual std::unordered_set<smtk::string::Token> fromTypes()
const {
return {}; }
49 virtual std::unordered_set<smtk::string::Token> toTypes()
const {
return {}; }
60 virtual bool acceptsRuntime(
113 #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:62
@ 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:74
virtual RuntimeArcEndpoint< ConstArc > incomingRuntime(const Component *to) const
Return a "container" of incoming arcs of the given to node.
Definition: ArcImplementationBase.h:86
virtual std::size_t maximumOutDegree() const
The maximum out-degree of a FromType node. This is enforced.
Definition: ArcImplementationBase.h:56
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:98
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 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:58
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:52
virtual std::size_t minimumInDegree() const
The minimum in-degree of a ToType node. This is not enforced.
Definition: ArcImplementationBase.h:54