SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
smtk::mesh::Component Class Reference

A lightweight object for representing meshset information as a resource component. More...

#include <Component.h>

Inheritance diagram for smtk::mesh::Component:
[legend]
Collaboration diagram for smtk::mesh::Component:
[legend]

Public Member Functions

 smtkTypeMacro (Component)
 
 smtkSharedFromThisMacro (smtk::resource::Component)
 
bool operator== (const Component &) const
 
bool operator!= (const Component &) const
 
bool operator< (const Component &) const
 
const smtk::resource::ResourcePtr resource () const override
 Access the component's resource.
 
const smtk::common::UUIDid () const override
 Access the component's id.
 
bool setId (const smtk::common::UUID &myID) override
 Set the component's id. More...
 
std::string name () const override
 Return the name of the object - by default it will return the UUID but that can be overridden.
 
virtual const smtk::mesh::MeshSet mesh () const
 Access the meshset represented by this component.
 
virtual smtk::mesh::MeshSet mesh ()
 
- Public Member Functions inherited from smtk::resource::Component
 smtkTypeMacro (smtk::resource::Component)
 
 smtkSuperclassMacro (smtk::resource::PersistentObject)
 
 smtkSharedFromThisMacro (smtk::resource::PersistentObject)
 
virtual ResourceparentResource () const
 Return a raw (not shared) pointer to the resource that owns this component. More...
 
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 Member Functions

static std::shared_ptr< Componentcreate (const smtk::mesh::ResourcePtr &, const smtk::common::UUID &)
 Construct a mesh component corresponding to a meshset from the input resource and id. More...
 
static std::shared_ptr< Componentcreate (const smtk::mesh::MeshSet &)
 Construct a mesh component correpsonding to the input meshset.
 

Protected Member Functions

 Component (const smtk::mesh::ResourcePtr &, const smtk::common::UUID &)
 
 Component (const smtk::mesh::MeshSet &)
 

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
 

Detailed Description

A lightweight object for representing meshset information as a resource component.

This is useful for constructing links between meshsets and other resources/components and for representing meshsets within smtk's attribute system.

Member Function Documentation

◆ create()

std::shared_ptr< Component > smtk::mesh::Component::create ( const smtk::mesh::ResourcePtr resource,
const smtk::common::UUID id 
)
static

Construct a mesh component corresponding to a meshset from the input resource and id.

No checking is performed that the resource has a meshset with this id; if this is the case, the resolved mesh() will return a default-constructed (and invalid) mesh.

◆ setId()

bool smtk::mesh::Component::setId ( const smtk::common::UUID myID)
inlineoverridevirtual

Set the component's id.

No checking is performed that the resource has a meshset with this id; if this is the case, the resolved mesh() will return a default-constructed (and invalid) mesh.

Implements smtk::resource::PersistentObject.


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