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

The ResourceLinks class is a resource-specific API for manipulating unidirectional links from a Resource and its Components to other Resources and Components. More...

#include <ResourceLinks.h>

Inheritance diagram for smtk::resource::detail::ResourceLinks:
[legend]
Collaboration diagram for smtk::resource::detail::ResourceLinks:
[legend]

Public Types

typedef smtk::common::Links< smtk::common::UUID, smtk::common::UUID, smtk::common::UUID, int, ResourceLinkBaseResourceLinkData
 
typedef ResourceLinkData::Link Link
 

Public Member Functions

ResourceLinkDatadata ()
 Access the underlying link data.
 
const ResourceLinkDatadata () const
 
bool resolve (const ResourcePtr &) const
 Resolve any surrogates with the given resource. More...
 
bool removeAllLinksTo (const ResourcePtr &)
 Remove all links from this resource to another resource. More...
 
void copyFrom (const ConstResourcePtr &source, const smtk::resource::CopyOptions &options)
 Copy links from source's links with the given options. More...
 

Friends

class smtk::resource::Resource
 

Additional Inherited Members

Detailed Description

The ResourceLinks class is a resource-specific API for manipulating unidirectional links from a Resource and its Components to other Resources and Components.

Internally, the storage structure for links is an smtk::common::Links instance describing links between resources, and each link in this structure is an smtk::common::Links instance describing links between components.

Member Function Documentation

◆ copyFrom()

void smtk::resource::detail::ResourceLinks::copyFrom ( const ConstResourcePtr source,
const smtk::resource::CopyOptions options 
)

Copy links from source's links with the given options.

This will copy both resource and component links as options indicates. Both resources and components are mapped through the options' object-mapping, so any links to objects that are also being copied will point to the copy and not the original object in source.

◆ removeAllLinksTo()

bool smtk::resource::detail::ResourceLinks::removeAllLinksTo ( const ResourcePtr resource)

Remove all links from this resource to another resource.

This is useful when we know the resource parameter is being permanently deleted.

◆ resolve()

bool smtk::resource::detail::ResourceLinks::resolve ( const ResourcePtr resource) const

Resolve any surrogates with the given resource.

Returns true if a surrogate is successfully resolved.


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