IFeatures Class Reference

Utility base class for managing large amounts of (possibly) optional functionality in a clean and consistent manner. The template type 'Feature' needs to support bitwise computations. More...

#include <IFeatures.h>

Inheritance diagram for IFeatures:

GLStateItem GLAlphaStateItem GLBlendStateItem GLColorStateItem GLDepthStateItem GLFogStateItem GLPointStateItem GLPrimitiveStateItem GLStencilStateItem

List of all members.

Public Member Functions

virtual ~IFeatures ()
virtual bool initializeFeatures (Feature features=Feature(), bool forceInit=false)=0
 Initializes nonstandard features to speedup performance.
virtual void cleanupFeatures (Feature features=Feature())=0
 Cleanups any data associated with the given features and disables them until they are reinitialized by initializeFeatures.
virtual Feature getSupportedFeatures () const =0
virtual Feature getInitializedFeatures () const =0
Feature getUninitializedFeatures () const
bool areFeaturesInitialized (Feature requestedFeatures) const
bool hasFeature (Feature requestedFeatures) const

Protected Member Functions

 IFeatures ()

Protected Attributes

Feature m_features


Detailed Description

Utility base class for managing large amounts of (possibly) optional functionality in a clean and consistent manner. The template type 'Feature' needs to support bitwise computations.

Author:
Travis Fischer (fisch0920@gmail.com)
Date:
Summer 2008

Definition at line 17 of file IFeatures.h.


Constructor & Destructor Documentation

virtual IFeatures::~IFeatures (  )  [inline, virtual]

Definition at line 19 of file IFeatures.h.

IFeatures::IFeatures (  )  [inline, protected]

Definition at line 78 of file IFeatures.h.


Member Function Documentation

virtual bool IFeatures::initializeFeatures ( Feature  features = Feature(),
bool  forceInit = false 
) [pure virtual]

Initializes nonstandard features to speedup performance.

If some or all of the requested features have already been initialized, they can optionally be reinitialized by setting 'forceInit' to true

Returns:
whether or not requested features were all successfully initialized

virtual void IFeatures::cleanupFeatures ( Feature  features = Feature()  )  [pure virtual]

Cleanups any data associated with the given features and disables them until they are reinitialized by initializeFeatures.

virtual Feature IFeatures::getSupportedFeatures (  )  const [pure virtual]

Returns:
all of the features supported by this class ORed together

virtual Feature IFeatures::getInitializedFeatures (  )  const [pure virtual]

Returns:
all of the features which have been initialized by a call to initializeFeatures

Feature IFeatures::getUninitializedFeatures (  )  const [inline]

Returns:
all of the features which are not currently initialized

Definition at line 55 of file IFeatures.h.

bool IFeatures::areFeaturesInitialized ( Feature  requestedFeatures  )  const [inline]

Returns:
whether or not all of the requrested features have been initialized

Definition at line 63 of file IFeatures.h.

bool IFeatures::hasFeature ( Feature  requestedFeatures  )  const [inline]

Returns:
whether or not all of the requrested features have been initialized (pseudonym for areFeaturesInitialized)

Definition at line 73 of file IFeatures.h.


Member Data Documentation

Definition at line 83 of file IFeatures.h.


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

Generated on 28 Feb 2009 for Milton by doxygen 1.5.6