LLVM API Documentation
#include <Registry.h>
Public Member Functions | |
listener () | |
virtual | ~listener () |
Protected Member Functions | |
virtual void | registered (const entry &)=0 |
void | init () |
Friends | |
void | Registry::Announce (const entry &E) |
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 141 of file Registry.h.
llvm::Registry< T, U >::listener::listener | ( | ) | [inline] |
Definition at line 159 of file Registry.h.
virtual llvm::Registry< T, U >::listener::~listener | ( | ) | [inline, virtual] |
Definition at line 167 of file Registry.h.
void llvm::Registry< T, U >::listener::init | ( | ) | [inline, protected] |
Calls 'registered' for each pre-existing entry.
Definition at line 153 of file Registry.h.
References llvm::Registry< T, U >::begin(), llvm::Registry< T, U >::end(), I, and llvm::Registry< T, U >::listener::registered().
Referenced by llvm::RegistryParser< T, U >::initialize().
virtual void llvm::Registry< T, U >::listener::registered | ( | const entry & | ) | [protected, pure virtual] |
Called when an entry is added to the registry.
Implemented in llvm::RegistryParser< T, U >.
Referenced by llvm::Registry< T, U >::listener::init().
void Registry::Announce | ( | const entry & | E | ) | [friend] |