Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ResourceAccessor< R > Class Template Reference

#include <ResourceAccessor.h>

Inheritance diagram for ResourceAccessor< R >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<class R>
class ResourceAccessor< R >

A variation of MarkScope which allows you to forward access to the resource via the '->' operator, smart-pointer style.

Definition at line 9 of file ResourceAccessor.h.

Public Member Functions

 ResourceAccessor (R &r)
 constructor, for marking resources which require no data
 ResourceAccessor (R &r, Resource::Data &d)
 constructor, accepts data parameter to pass to Resource::useResource()
 ResourceAccessor (const ResourceAccessor &ra)
 copy constructor, marks resource used with default (empty) data
 ResourceAccessor (const ResourceAccessor &ra, Resource::Data &d)
 copy constructor, accepts additional data parameter to pass to Resource::useResource()
R & accessResource () const __attribute__((warn_unused_result))
 returns rsrc cast as R
R * operator-> ()
 smart pointer to the underlying Resource
const R * operator-> () const
 smart pointer to the underlying Resource
R & operator * ()
 smart pointer to the underlying Resource
const R & operator * () const
 smart pointer to the underlying Resource
R & operator[] (int i)
 smart pointer to the underlying Resource
const R & operator[] (int i) const
 smart pointer to the underlying Resource


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

Tekkotsu v3.0
Generated Fri May 11 20:08:41 2007 by Doxygen 1.4.7