Public Member Functions | Protected Member Functions | Friends

nsCategoryCache< T > Class Template Reference

This is a helper class that caches services that are registered in a certain category. More...

#include <nsCategoryCache.h>

Inheritance diagram for nsCategoryCache< T >:
Collaboration diagram for nsCategoryCache< T >:

List of all members.

Public Member Functions

 nsCategoryCache (const char *aCategory)
 ~nsCategoryCache ()
const nsCOMArray< T > & GetEntries ()

Protected Member Functions

virtual void EntryAdded (const nsCString_external &aValue)
virtual void EntryRemoved (const nsCString_external &aValue)
virtual void CategoryCleared ()

Friends

class CategoryObserver

Detailed Description

template<class T>
class nsCategoryCache< T >

This is a helper class that caches services that are registered in a certain category.

The intended usage is that a service stores a variable of type nsCategoryCache<nsIFoo> in a member variable, where nsIFoo is the interface that these services should implement. The constructor of this class should then get the name of the category.


Constructor & Destructor Documentation

template<class T >
nsCategoryCache< T >::nsCategoryCache ( const char *  aCategory  )  [explicit]
template<class T >
nsCategoryCache< T >::~nsCategoryCache (  )  [inline]

Member Function Documentation

template<class T >
void nsCategoryCache< T >::CategoryCleared (  )  [protected, virtual]

Implements nsCategoryListener.

template<class T >
void nsCategoryCache< T >::EntryAdded ( const nsCString_external aValue  )  [protected, virtual]

Implements nsCategoryListener.

template<class T >
void nsCategoryCache< T >::EntryRemoved ( const nsCString_external aValue  )  [protected, virtual]

Implements nsCategoryListener.

template<class T >
const nsCOMArray<T>& nsCategoryCache< T >::GetEntries (  )  [inline]

Friends And Related Function Documentation

template<class T >
friend class CategoryObserver [friend]

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