ROSE  0.9.10.89
Protected Member Functions | Friends | List of all members
Rose::Registry< T, U >::listener Class Referenceabstract

Description

template<typename T, typename U = RegistryTraits<T>>
class Rose::Registry< T, U >::listener

Abstract base class for registry listeners, which are informed when new entries are added to the registry.

Simply subclass and instantiate:

class CollectorPrinter : public Registry<Collector>::listener {
protected:
void registered(const Registry<Collector>::entry &e) {
cerr << "collector now available: " << e->getName() << "\n";
}
public:
CollectorPrinter() { init(); } // Print those already registered.
};
CollectorPrinter Printer;

Definition at line 248 of file plugin.h.

#include <plugin.h>

Protected Member Functions

virtual void registered (const entry &)=0
 Called when an entry is added to the registry.
 
void init ()
 Calls 'registered' for each pre-existing entry.
 

Friends

void Registry::Announce (const entry &E)
 

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