AgateLib.Utility.Ref< T > Struct Template Reference

A structure which is used for copying RefCounter<T> around. In order to make sure reference counters are updated correctly, never use the equals operator with this object. Always create a new one and pass the old one to the constructor. More...

List of all members.

Public Member Functions

 Ref (T obj)
 Ref (Ref< T > copyfrom)
void Dispose ()
 Releases this reference to the object.

Public Attributes

RefCounter< T > v

Properties

bool IsDisposed [get]
 Returns true if this reference has been disposed. This does not indicate whether the object being referenced has been disposed, but it may have been if this was the last reference. In any case, if this is true, you shouldn't access the object anyway.
Value [get]
 Returns the object being wrapped around.
RefCounter< T > Counter [get, set]
 The RefCounter<T> object this wraps.


Detailed Description

template<T>
struct AgateLib::Utility::Ref< T >

A structure which is used for copying RefCounter<T> around. In order to make sure reference counters are updated correctly, never use the equals operator with this object. Always create a new one and pass the old one to the constructor.

Template Parameters:
T 
Type Constraints
T :IDisposable 

Constructor & Destructor Documentation

template<T >
AgateLib.Utility.Ref< T >.Ref ( obj  ) 

Parameters:
obj 

template<T >
AgateLib.Utility.Ref< T >.Ref ( Ref< T >  copyfrom  ) 

Parameters:
copyfrom 


Member Function Documentation

template<T >
void AgateLib.Utility.Ref< T >.Dispose (  ) 

Releases this reference to the object.


Property Documentation

template<T >
RefCounter<T> AgateLib.Utility.Ref< T >.Counter [get, set]

The RefCounter<T> object this wraps.

template<T >
bool AgateLib.Utility.Ref< T >.IsDisposed [get]

Returns true if this reference has been disposed. This does not indicate whether the object being referenced has been disposed, but it may have been if this was the last reference. In any case, if this is true, you shouldn't access the object anyway.

template<T >
T AgateLib.Utility.Ref< T >.Value [get]

Returns the object being wrapped around.


The documentation for this struct was generated from the following file:
AgateLib
Awesome Game and Tool Engine Library
SourceForge.net Logo