SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
smtk::markup::Component Class Reference
Inheritance diagram for smtk::markup::Component:
[legend]
Collaboration diagram for smtk::markup::Component:
[legend]

Public Types

using Serialize = std::true_type
 
using Index = std::size_t
 
- Public Types inherited from smtk::resource::Component
typedef std::function< void(const ComponentPtr &)> Visitor
 
typedef detail::ComponentLinks Links
 
typedef detail::ComponentProperties Properties
 

Public Member Functions

 smtkTypeMacro (smtk::markup::Component)
 
 smtkSuperclassMacro (smtk::graph::Component)
 
template<typename... Args>
 Component (Args &&... args)
 
virtual void initialize (const nlohmann::json &data, smtk::resource::json::Helper &helper)
 Provide an initializer for resources to call after construction.
 
Component::Index index () const
 The index is a compile-time intrinsic of the derived resource; as such, it cannot be set.
 
std::string name () const override
 Return the component's name.
 
bool setName (const std::string &name)
 Set the component's name.
 
ArcEndpointInterface< arcs::GroupsToMembers, ConstArc, IncomingArcgroups () const
 Return the container of groups this component belongs to.
 
ArcEndpointInterface< arcs::GroupsToMembers, NonConstArc, IncomingArcgroups ()
 
ArcEndpointInterface< arcs::LabelsToSubjects, ConstArc, IncomingArclabels () const
 Return the container of labels that reference this component.
 
ArcEndpointInterface< arcs::LabelsToSubjects, NonConstArc, IncomingArclabels ()
 
ArcEndpointInterface< arcs::URLsToImportedData, ConstArc, IncomingArcimportedFrom () const
 Return the container of URLs from which this component was imported (if any).
 
ArcEndpointInterface< arcs::URLsToImportedData, NonConstArc, IncomingArcimportedFrom ()
 
ArcEndpointInterface< arcs::OntologyIdentifiersToIndividuals, ConstArc, IncomingArcontologyClasses () const
 Return the container of ontology identifiers this component realizes. More...
 
ArcEndpointInterface< arcs::OntologyIdentifiersToIndividuals, NonConstArc, IncomingArcontologyClasses ()
 
bool assign (const smtk::graph::Component::ConstPtr &source, smtk::resource::CopyOptions &options) override
 Assign this node's state from source.
 
- Public Member Functions inherited from smtk::graph::Component
 smtkTypeMacro (smtk::graph::Component)
 
 smtkSuperclassMacro (smtk::resource::Component)
 
const smtk::resource::ResourcePtr resource () const override
 Access the containing resource.
 
smtk::resource::ResourceparentResource () const override
 Return a raw (not shared) pointer to the resource that owns this object. More...
 
const smtk::common::UUIDid () 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, OutgoingArcoutgoing () const
 Return an endpoint-interface object for arcs of ArcType outgoing from this node. More...
 
template<typename ArcType >
ArcEndpointInterface< ArcType, NonConstArc, OutgoingArcoutgoing ()
 
template<typename ArcType >
ArcEndpointInterface< ArcType, ConstArc, IncomingArcincoming () const
 Return an endpoint-interface object for arcs of ArcType incoming to this node. More...
 
template<typename ArcType >
ArcEndpointInterface< ArcType, NonConstArc, IncomingArcincoming ()
 
bool disconnect (bool onlyExplicit=false)
 Remove all (editable) arcs from this node. More...
 
RuntimeArcEndpoint< NonConstArcoutgoing (smtk::string::Token arcType)
 Given a runtime arc type-name, return a runtime endpoint interface. More...
 
RuntimeArcEndpoint< ConstArcoutgoing (smtk::string::Token arcType) const
 
RuntimeArcEndpoint< NonConstArcincoming (smtk::string::Token arcType)
 
RuntimeArcEndpoint< ConstArcincoming (smtk::string::Token arcType) const
 
virtual bool assign (const ConstPtr &source, smtk::resource::CopyOptions &options)
 Assign state data from the source node to this instance. More...
 
- Public Member Functions inherited from smtk::resource::Component
 smtkTypeMacro (smtk::resource::Component)
 
 smtkSuperclassMacro (smtk::resource::PersistentObject)
 
 smtkSharedFromThisMacro (smtk::resource::PersistentObject)
 
ResourceparentResource () const override
 Return a raw (not shared) pointer to the resource that owns this component. More...
 
template<typename ResourceType >
ResourceType * parentResourceAs () const
 This variant of parentResource casts the result to the given ResourceType.
 
Linkslinks () override
 Return the links that connect this component to external resources/components.
 
const Linkslinks () const override
 
Propertiesproperties () override
 Return properties defined on this component.
 
const Propertiesproperties () const override
 
- Public Member Functions inherited from smtk::resource::PersistentObject
 smtkTypeMacroBase (smtk::resource::PersistentObject)
 
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.
 

Static Public Attributes

static const Component::Index type_index
 A unique integer corresponding to the component type.
 

Protected Member Functions

bool copyAssignment (const AssignedIds &sourceAssignment, std::shared_ptr< AssignedIds > &targetAssignment)
 Copy the sourceAssignment's IDs into the targetAssignment. More...
 
bool copyBaseData (const vtkSmartPointer< vtkDataObject > &baseSourceData, vtkSmartPointer< vtkDataObject > &baseTargetData, smtk::resource::CopyOptions &options)
 Use copyData<T>() instead. It calls this method.
 
template<typename DataType >
bool copyData (const vtkSmartPointer< DataType > &sourceData, vtkSmartPointer< DataType > &targetData, smtk::resource::CopyOptions &options)
 Copy the sourceData into the targetData. More...
 
- Protected Member Functions inherited from smtk::graph::Component
 Component (const std::shared_ptr< smtk::graph::ResourceBase > &)
 
 Component (const std::shared_ptr< smtk::graph::ResourceBase > &, const smtk::common::UUID &)
 
const ArcImplementationBasearcsOfType (smtk::string::Token arcType) const
 
ArcImplementationBasearcsOfType (smtk::string::Token arcType)
 
virtual void createDependentArcs ()
 

Protected Attributes

std::string m_name
 
- Protected Attributes inherited from smtk::graph::Component
smtk::WeakReferenceWrapper< smtk::graph::ResourceBasem_resource
 
smtk::common::UUID m_id
 

Member Function Documentation

◆ copyAssignment()

bool smtk::markup::Component::copyAssignment ( const AssignedIds sourceAssignment,
std::shared_ptr< AssignedIds > &  targetAssignment 
)
protected

Copy the sourceAssignment's IDs into the targetAssignment.

sourceAssignment is assumed to originate from an external resource while targetAssignment is held by a component of this resource. The target domain is looked up by name from the source domain's name and the matching IDs are requested. On success, true is returned. If false is returned, the matching IDs could not be allocated from the target domain.

◆ copyData()

template<typename DataType >
bool smtk::markup::Component::copyData ( const vtkSmartPointer< DataType > &  sourceData,
vtkSmartPointer< DataType > &  targetData,
smtk::resource::CopyOptions options 
)
inlineprotected

Copy the sourceData into the targetData.

The options are used to determine whether to perform a shallow or deep copy.

◆ ontologyClasses()

ArcEndpointInterface< arcs::OntologyIdentifiersToIndividuals, NonConstArc, IncomingArc > smtk::markup::Component::ontologyClasses ( ) const

Return the container of ontology identifiers this component realizes.

Any component may be marked as a member of an ontology class; return the set of classes (ontology identifiers) this component belongs to.


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