|
SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
Graph Component represents a node in the graph resource. More...
#include <Component.h>
Public Member Functions | |
| smtkTypeMacro (smtk::graph::Component) | |
| smtkSuperclassMacro (smtk::resource::Component) | |
| const smtk::resource::ResourcePtr | resource () const override |
| Access the containing resource. | |
| smtk::resource::Resource * | parentResource () const override |
| Return a raw (not shared) pointer to the resource that owns this component. More... | |
| const smtk::common::UUID & | id () const override |
| Access the component's id. | |
| bool | setId (const smtk::common::UUID &uid) override |
| Set the component's id. | |
| template<typename ArcType > | |
| ArcEndpointInterface< ArcType, ConstArc, OutgoingArc > | outgoing () const |
| Return an endpoint-interface object for arcs of ArcType outgoing from this node. More... | |
| template<typename ArcType > | |
| ArcEndpointInterface< ArcType, NonConstArc, OutgoingArc > | outgoing () |
| template<typename ArcType > | |
| ArcEndpointInterface< ArcType, ConstArc, IncomingArc > | incoming () const |
| Return an endpoint-interface object for arcs of ArcType incoming to this node. More... | |
| template<typename ArcType > | |
| ArcEndpointInterface< ArcType, NonConstArc, IncomingArc > | incoming () |
| bool | disconnect (bool onlyExplicit=false) |
| Remove all (editable) arcs from this node. More... | |
Public Member Functions inherited from smtk::resource::Component | |
| smtkTypeMacro (smtk::resource::Component) | |
| smtkSuperclassMacro (smtk::resource::PersistentObject) | |
| smtkSharedFromThisMacro (smtk::resource::PersistentObject) | |
| template<typename ResourceType > | |
| ResourceType * | parentResourceAs () const |
| This variant of parentResource casts the result to the given ResourceType. | |
| Links & | links () override |
| Return the links that connect this component to external resources/components. | |
| const Links & | links () const override |
| Properties & | properties () override |
| Return properties defined on this component. | |
| const Properties & | properties () const override |
Public Member Functions inherited from smtk::resource::PersistentObject | |
| smtkTypeMacroBase (smtk::resource::PersistentObject) | |
| virtual std::string | name () const |
| Return the name of the object - by default it will return the UUID but that can be overridden. | |
| template<typename T > | |
| T::Ptr | as () |
| Attempt to cast this object to a subclass. | |
| template<typename T > | |
| T::ConstPtr | as () const |
| Attempt to cast this object to a subclass. | |
Protected Member Functions | |
| Component (const std::shared_ptr< smtk::graph::ResourceBase > &) | |
| Component (const std::shared_ptr< smtk::graph::ResourceBase > &, const smtk::common::UUID &) | |
| virtual void | createDependentArcs () |
Protected Attributes | |
| smtk::WeakReferenceWrapper< smtk::graph::ResourceBase > | m_resource |
| smtk::common::UUID | m_id |
Friends | |
| template<typename GraphTraits > | |
| class | Resource |
Additional Inherited Members | |
Public Types inherited from smtk::resource::Component | |
| typedef std::function< void(const ComponentPtr &)> | Visitor |
| typedef detail::ComponentLinks | Links |
| typedef detail::ComponentProperties | Properties |
Graph Component represents a node in the graph resource.
Internally, all of the nodes and graphs that comprise a resource are stored internally within the resource itself. The API presented in Component is a forwarding API, designed to redirect arc queries through the resource. As a result, graph components themselves are extremely lightweight and contain a full API for accessing their connections.
| bool smtk::graph::Component::disconnect | ( | bool | onlyExplicit = false | ) |
Remove all (editable) arcs from this node.
Note that implicit arcs which do not provide a disconnect method will not be removed.
This method is used by the Delete operation to ensure that nodes do not leave dangling references to removed nodes.
|
inline |
Return an endpoint-interface object for arcs of ArcType incoming to this node.
These methods will throw a std::logic_error if ArcType arcs may not arrive into nodes of this type.
It would be preferable to prevent compilation, but the base graph-component class can not have access to the resource's traits object.
|
inline |
Return an endpoint-interface object for arcs of ArcType outgoing from this node.
These methods will throw a std::logic_error if ArcType arcs may not originate from nodes of this type.
It would be preferable to prevent compilation, but the base graph-component class can not have access to the resource's traits object.
|
overridevirtual |
Return a raw (not shared) pointer to the resource that owns this component.
This method provides a slow default implementation that simply converts the shared pointer, but component subclasses can usually implement a fast version if they use smtk::common::CachedWeakPointer to hold a reference to their parent.
Reimplemented from smtk::resource::Component.
1.8.17