SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
A lightweight object for representing meshset information as a resource component. More...
#include <Component.h>
Public Member Functions | |
smtkTypeMacro (Component) | |
smtkSuperclassMacro (smtk::resource::Component) | |
smtkSharedFromThisMacro (smtk::resource::PersistentObject) | |
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::UUID & | id () 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 Resource * | parentResource () const |
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. | |
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) | |
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< Component > | create (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< Component > | create (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 |
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.
|
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.
|
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.