SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
A resource Surrogate is a stand-in for an actual resource. More...
#include <Surrogate.h>
Public Member Functions | |
Surrogate (const Index &, const std::string &, const smtk::common::UUID &, const std::string &) | |
Constructor for unresolved resource. | |
Surrogate (const ResourcePtr &) | |
Constructor for resolved resource. | |
std::string | typeName () const |
Index | index () const |
const smtk::common::UUID & | id () const |
const std::string & | location () const |
ResourcePtr | resource () const |
Return the resource for which the instance is a surrogate. | |
ComponentPtr | find (const smtk::common::UUID &) const |
Given a resource component's UUID, return the resource component. | |
bool | fetch (const ManagerPtr &) const |
Load the resource (set m_Resource) using the input resource manager. More... | |
bool | resolve (const ResourcePtr &) const |
Set the resource (set m_Resource) using the input resource. More... | |
A resource Surrogate is a stand-in for an actual resource.
It is used to represent resources that are not loaded into memory.
bool smtk::resource::Surrogate::fetch | ( | const ManagerPtr & | manager | ) | const |
Load the resource (set m_Resource) using the input resource manager.
Return true if the resource is successfully loaded.
bool smtk::resource::Surrogate::resolve | ( | const ResourcePtr & | resource | ) | const |
Set the resource (set m_Resource) using the input resource.
Return true if the resource is successfully set.