Tanl Linguistic Pipeline

IXE::Configuration Class Reference
[Configuration]

A Configuration object that holds all the configuration variables. More...

#include <conf.h>

List of all members.

Classes

class  Item

Public Types

typedef std::map< char const
*, Item * > 
Map

Static Public Member Functions

static void load (char const *file_name)
 Parse the lines in a configuration file setting variables accordingly.
static Map & variables ()
 Define and initialize (exactly once) a static data member for Conf and return a reference to it.
static void reset ()
 Reset all configuration variables to their default values.
static std::ostream & error (std::ostream &o=std::cerr)
static std::ostream & warning (std::ostream &o=std::cerr)

Friends

class Item
 An Item is the abstract base class for all configuration variables.

Detailed Description

A Configuration object that holds all the configuration variables.


Member Function Documentation

void IXE::Configuration::load ( char const *  file_name  )  [static]

Parse the lines in a configuration file setting variables accordingly.

Parameters:
file_name The name of the configuration file to parse.

Referenced by Tanl::NER::NER::NER(), and Tanl::SST::SST::SST().

Configuration::Map & IXE::Configuration::variables (  )  [static]

Define and initialize (exactly once) a static data member for Conf and return a reference to it.

The reason for this function is to guarantee that the map is initialized before its first use across all translation units, something that would not guaranteed if it were a static data member initialized at file scope.

We also load the map with all configuration variable names so we can tell the difference between a variable that doesn't exist (and that we will complain about to the user) and one that simply isn't used in a particular executable (and will be silently ignored).

Returns:
a reference to a static instance of an initialized Map.

SEE ALSO

Margaret A. Ellis and Bjarne Stroustrup. "The Annotated C++ Reference Manual." Addison-Wesley, Reading, MA, 1990. p. 19.

Referenced by reset().


Friends And Related Function Documentation

friend class Item [friend]

An Item is the abstract base class for all configuration variables.

It parses a given line and, based on the variable name, which is the first word on the line, dispatches to an appropriate instance of a derived class to parse the rest of the line.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
 
Copyright © 2005-2011 G. Attardi. Generated on 4 Mar 2011 by doxygen 1.6.1.