SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Types | Public Member Functions | List of all members
smtk::graph::ArcImplementationBase Class Reference

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::TokenfromTypes () const
 The set of query-filter strings describing nodes that may serve as "from" endpoints.
 
virtual std::unordered_set< smtk::string::TokentoTypes () 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< ConstArcoutgoingRuntime (const Component *from) const
 Return a "container" of outgoing arcs of the given from node.
 
virtual RuntimeArcEndpoint< NonConstArcoutgoingRuntime (const Component *from)
 
virtual RuntimeArcEndpoint< ConstArcincomingRuntime (const Component *to) const
 Return a "container" of incoming arcs of the given to node.
 
virtual RuntimeArcEndpoint< NonConstArcincomingRuntime (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).
 

Detailed Description

A base class for all arc implementations.

This class provides a runtime API for arc endpoints at a given "self" node.

Member Function Documentation

◆ acceptsRuntime()

virtual bool smtk::graph::ArcImplementationBase::acceptsRuntime ( Component from,
Component to,
Component beforeFrom = nullptr,
Component beforeTo = nullptr 
) const
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.

See also
smtk::graph::CreateArc

◆ explicitStorage()

virtual bool smtk::graph::ArcImplementationBase::explicitStorage ( ) const
inlinevirtual

If true, arc endpoint connections are explicitly stored by SMTK.

Otherwise, fetching arcs is procedural.

◆ mutability()

virtual bool smtk::graph::ArcImplementationBase::mutability ( ) const
inlinevirtual

If true, methods that edit arcs may sometimes return true.

Otherwise, arcs may never be edited.


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