|
SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
An object that a node instance can present to access/edit its outgoing/incoming arcs. More...
#include <ArcImplementation.h>
Classes | |
| struct | Connector |
| Edit methods (only enabled for non-const interfaces). More... | |
| struct | Connector< false, Outgoingness, Dummy > |
| struct | Connector< true, false, Dummy > |
| struct | ContainsEndpoint |
| struct | ContainsEndpoint< false, Dummy > |
| struct | Degree |
| struct | Degree< false, Dummy > |
| struct | Disconnector |
| struct | Disconnector< false, Outgoingness, Dummy > |
| struct | Disconnector< true, false, Dummy > |
| struct | VisitEndpoints |
| struct | VisitEndpoints< false, Functor > |
Public Types | |
| using | Traits = TraitsType |
| using | FromType = typename TraitsType::FromType |
| using | ToType = typename TraitsType::ToType |
| using | Directed = typename TraitsType::Directed |
| using | Mutable = typename ArcProperties< TraitsType >::isMutable |
| using | Ordered = typename ArcProperties< TraitsType >::isOrdered |
| using | ImplType = ArcImplementation< TraitsType > |
| using | ThisType = typename std::conditional< Outgoing::value, typename ImplType::FromType, typename ImplType::ToType >::type |
| using | OtherType = typename std::conditional< Outgoing::value, typename ImplType::ToType, typename ImplType::FromType >::type |
| using | Constness = Const |
| using | SelfEndpoint = ArcEndpointInterface< TraitsType, Const, Outgoing > |
Public Member Functions | |
| ArcEndpointInterface () | |
| This is a dummy constructor that is not used by valid code. More... | |
| ArcEndpointInterface (const ArcEndpointInterface< TraitsType, Const, Outgoing > &)=default | |
| Provide a default copy constructor. | |
| std::conditional< Const::value, const ThisType *, ThisType * >::type | self () |
| Return this endpoint's endpoint. | |
| constexpr std::size_t | maxDegree () const |
| constexpr std::size_t | minDegree () const |
| template<typename Functor > | |
| smtk::common::Visited | visit (Functor visitor) const |
| Visit nodes attached to the endpoint by arcs of this type. | |
| bool | contains (const OtherType *node) const |
| Return true if this endpoint is connected to node. | |
| bool | empty () const |
| Return whether this endpoint has zero arcs. | |
| const OtherType * | node () const |
| Return the first destination endpoint. More... | |
| const OtherType * | front () const |
| STL-container synonym for node(): | |
| std::size_t | degree () const |
| Return the number of arcs of this type that terminate at this endpoint. More... | |
| std::size_t | size () const |
| Return the number of arcs of this type that terminate at this endpoint. More... | |
| bool | connect (const OtherType *other) |
| Connect the other node to this node. | |
| bool | connect (const std::shared_ptr< OtherType > &other) |
| A convenience version of connect() that accepts shared pointers. | |
| bool | insert (const OtherType *other, const OtherType *beforeOther=nullptr, const ThisType *beforeThis=nullptr) |
| Insert a new arc connecting this endpoint to the other. | |
| bool | disconnect (const OtherType *other) |
| Disconnect the other node from this one (i.e., erase an arc). | |
| bool | erase (const OtherType *other) |
| Connect the other node to this node. | |
| bool | disconnect (const std::shared_ptr< OtherType > &other) |
| A convenience version of disconnect() that accepts shared pointers. | |
| bool | erase (const std::shared_ptr< OtherType > &other) |
| A convenience version of erase() that accepts shared pointers. | |
Protected Member Functions | |
| ArcEndpointInterface (const ArcImplementation< TraitsType > *arcs, typename std::conditional< Const::value, const ThisType *, ThisType * >::type endpoint) | |
Protected Attributes | |
| ArcImplementation< TraitsType > * | m_arcs |
| std::conditional< Const::value, const ThisType *, ThisType * >::type | m_endpoint |
Friends | |
| class | ArcImplementation< TraitsType > |
| Use connect and disconnect to edit all attached arcs until they match destNodes. More... | |
An object that a node instance can present to access/edit its outgoing/incoming arcs.
If Outgoing is true, then instances of this class should be constructed with a "from" node's pointer and will act like a container of "to" nodes for the arc type.
If Outgoing is false, then instances of this class should be constructed with a "to" node's pointer and will act like a container of "from" nodes for the arc type, assuming the arc type provides reverse indexing.
|
inline |
This is a dummy constructor that is not used by valid code.
Methods that must return a container return instances created with this constructor, but only after throwing an exception.
|
inline |
Return the number of arcs of this type that terminate at this endpoint.
The variant named size() exists so the endpoint behaves like an STL container.
|
inline |
Return the first destination endpoint.
This is a convenience method, generally intended for the case when maxDegree() == 1.
If no arcs exist, this will return a null pointer.
This may eventually return a reference to a pointer to allow users to replace the destination node with another, but currently it returns only a value.
|
inline |
Return the number of arcs of this type that terminate at this endpoint.
The variant named size() exists so the endpoint behaves like an STL container.
|
friend |
Use connect and disconnect to edit all attached arcs until they match destNodes.
Return true if modified and false otherwise.
1.8.17