SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Member Functions | List of all members
smtk::resource::Surrogate Class Reference

A resource Surrogate is a stand-in for an actual resource. More...

#include <Surrogate.h>

Inheritance diagram for smtk::resource::Surrogate:
[legend]

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::UUIDid () 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...
 

Detailed Description

A resource Surrogate is a stand-in for an actual resource.

It is used to represent resources that are not loaded into memory.

Member Function Documentation

◆ fetch()

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.

◆ resolve()

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.


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