LLVM API Documentation

Public Member Functions | Protected Member Functions
llvm::RegistryParser< T, U > Class Template Reference

#include <RegistryParser.h>

Inheritance diagram for llvm::RegistryParser< T, U >:
Inheritance graph
[legend]
Collaboration diagram for llvm::RegistryParser< T, U >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void initialize (cl::Option &O)

Protected Member Functions

void registered (const entry &E)

Detailed Description

template<typename T, typename U = RegistryTraits<T>>
class llvm::RegistryParser< T, U >

A command-line parser for a registry. Use like such:

static cl::opt<Registry<Collector>::entry, false, RegistryParser<Collector> > GCOpt("gc", cl::desc("Garbage collector to use."), cl::value_desc());

To make use of the value:

Collector *TheCollector = GCOpt->instantiate();

Definition at line 34 of file RegistryParser.h.


Member Function Documentation

template<typename T , typename U = RegistryTraits<T>>
void llvm::RegistryParser< T, U >::initialize ( cl::Option O) [inline]

Reimplemented from llvm::cl::generic_parser_base.

Definition at line 47 of file RegistryParser.h.

References llvm::Registry< T, U >::listener::init().

template<typename T , typename U = RegistryTraits<T>>
void llvm::RegistryParser< T, U >::registered ( const entry &  ) [inline, protected, virtual]

Called when an entry is added to the registry.

Implements llvm::Registry< T, U >::listener.

Definition at line 42 of file RegistryParser.h.

References llvm::cl::parser< const U::entry * >::addLiteralOption().


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