SourceForge.net Logo
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

EkGPtr Class Template Reference

The EkGPtr class is used for ensuring that objects are available at global initialization time. More...

#include <EkGPtr.h>

Inheritance diagram for EkGPtr:

[legend]
Collaboration diagram for EkGPtr:
[legend]
List of all members.

Public Methods

 EkGPtr ()
 This is the default constructor. More...

 ~EkGPtr ()
 This is the destructor. More...

 operator T *& ()
 This is a dereferencing method. More...

T *& operator-> ()
 This is a dereferencing method. More...

T & operator * ()
 This is a dereferencing method. More...

T *& ptr ()
 This returns what <TYPE> is pointing to. More...


Detailed Description

template<class T>
class EkGPtr< T >

The EkGPtr class is used for ensuring that objects are available at global initialization time.

Basically you can define a static data member of this type (templated on the desired object type). Then you can reference that 'pointer' at any time without concern for when/if global Ctors have been called for that object yet.

Note: This class can _only_ be instantiated in global space (it relies on being initialized to zero...).


Constructor & Destructor Documentation

template<class T>
EkGPtr< T >::EkGPtr   [inline]
 

This is the default constructor.

template<class T>
EkGPtr< T >::~EkGPtr  
 

This is the destructor.


Member Function Documentation

template<class T>
T& EkGPtr< T >::operator *   [inline]
 

This is a dereferencing method.

template<class T>
EkGPtr< T >::operator T *&   [inline]
 

This is a dereferencing method.

template<class T>
T*& EkGPtr< T >::operator->   [inline]
 

This is a dereferencing method.

template<class T>
T *& EkGPtr< T >::ptr   [inline]
 

This returns what <TYPE> is pointing to.


The documentation for this class was generated from the following file:
Last Updated: March 12, 2003 (rlr)
Copyright © 2003 Eastman Kodak Company All Rights Reserved.