ResourceReference Class Reference

A Resource reference with a controlled lifetime. More...

#include <entitylib.h>

Collaboration diagram for ResourceReference:
Collaboration graph
[legend]

Public Member Functions

 ResourceReference (const std::string &name)
 ResourceReference (const ResourceReference &other)
ResourceReferenceoperator= (const ResourceReference &other)
 ~ResourceReference ()
void capture ()
const std::stringgetName () const
void setName (const std::string &name)
void swap (ResourceReference &other)
void attach (ModuleObserver &observer)
void detach (ModuleObserver &observer)
Resourceget ()

Private Attributes

std::string m_name
Resourcem_resource

Detailed Description

A Resource reference with a controlled lifetime.

The resource is released when the ResourceReference is destroyed.

Definition at line 658 of file entitylib.h.


Constructor & Destructor Documentation

ResourceReference::ResourceReference ( const std::string name  )  [inline]

Definition at line 663 of file entitylib.h.

References capture().

ResourceReference::ResourceReference ( const ResourceReference other  )  [inline]

Definition at line 668 of file entitylib.h.

References capture().

ResourceReference::~ResourceReference (  )  [inline]

Definition at line 679 of file entitylib.h.

References GlobalReferenceCache(), m_name, and ReferenceCache::release().


Member Function Documentation

void ResourceReference::attach ( ModuleObserver &  observer  )  [inline]

Definition at line 705 of file entitylib.h.

References Resource::attach(), and m_resource.

Referenced by EModel::EModel(), and EModel::modelChanged().

void ResourceReference::capture (  )  [inline]

Definition at line 684 of file entitylib.h.

References ReferenceCache::capture(), GlobalReferenceCache(), m_name, and m_resource.

Referenced by ResourceReference().

void ResourceReference::detach ( ModuleObserver &  observer  )  [inline]

Definition at line 709 of file entitylib.h.

References Resource::detach(), and m_resource.

Referenced by EModel::modelChanged(), and EModel::~EModel().

Resource* ResourceReference::get (  )  [inline]

Definition at line 714 of file entitylib.h.

References m_resource.

Referenced by EModel::realise().

const std::string& ResourceReference::getName (  )  const [inline]

Definition at line 689 of file entitylib.h.

References m_name.

Referenced by EModel::getName().

ResourceReference& ResourceReference::operator= ( const ResourceReference other  )  [inline]

Definition at line 673 of file entitylib.h.

References swap().

void ResourceReference::setName ( const std::string name  )  [inline]

Definition at line 693 of file entitylib.h.

References swap().

Referenced by EModel::modelChanged().

void ResourceReference::swap ( ResourceReference other  )  [inline]

Definition at line 699 of file entitylib.h.

References m_name, and m_resource.

Referenced by operator=(), and setName().


Field Documentation

Definition at line 660 of file entitylib.h.

Referenced by capture(), getName(), swap(), and ~ResourceReference().

Definition at line 661 of file entitylib.h.

Referenced by attach(), capture(), detach(), get(), and swap().


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

Generated by  doxygen 1.6.2