SomeName::Env Class Reference

#include <Env.h>

Inheritance diagram for SomeName::Env:

SomeName::Root List of all members.

Detailed Description

The public front-end to the SomeName set of classes.

This class acts as a front-end, maintaining all user-provided and internal meta-information. A 'main' program can create an instance of this class and interact entirely with it, with or without involving the other classes in SomeName.


Public Member Functions

 Env (int argc, const char *argv[])
bool processArgs (int argc, const char **argv)
 Initialize various fields based on command-line flags.
PageregisterPage (const std::string &file)
 Add a new Page to my list of pages.
PagecurrentPage ()
 Returns the currently "active" page.
void wrapup ()
 Perform any final post-processing mandated by config fields.
friend Page::Page (Env *env, const std::string &file)
const Pagecurrent () const
const Job * job () const
const std::string & alg () const
const int verbose () const
const std::string & infile () const
const std::string & outfile () const
const std::vector< Page * > & pages () const
const std::string & rawdata () const
const StrategyFactoryalgorithms () const
virtual StrategyFactorymakeAlgorithms ()

Static Public Member Functions

static void Initialize ()
static void test (int argc=0, const char *argv[]=NULL)

Protected Member Functions

void currentIs (Page *current)
void algIs (const std::string &alg)
void pagesIs (const std::vector< Page * > &pages)
void jobIs (Job *job)
void verboseIs (int verbose)
void outfileIs (const std::string &outfile)
void infileIs (const std::string &infile)
void rawdataIs (const std::string &rawdata)


Member Function Documentation

const StrategyFactory* SomeName::Env::algorithms  )  const [inline]
 

Returns an object that provides access to algorithm implementations.

void SomeName::Env::Initialize  )  [static]
 

Perform class initializaton.

This method is currently important because the GOCR code has a global variable that must be initialized in order for any gocr code to work. Once the global var is removed, this method may no longer be needed.

This method is called in Env::Env, but must also be called in any unit-testing method that doesn't use Env directly (the global JOB variable must still be initialized if the class in question uses any gocr code).

StrategyFactory * SomeName::Env::makeAlgorithms  )  [virtual]
 

Factory Method for creating an appropriate StrategyFactory

Note that the default implementation is auto-generated by 'ocrgen' based on the 'Algorithms' file. Subclassing should really not be necessary (and thus it isn't much of a Factory Method :-).

FUTURE FIX: Currently invoked within the constructor, which means that subclass definitions may not work properly anyway!

bool SomeName::Env::processArgs int  argc,
const char **  argv
 

Initialize various fields based on command-line flags.

Initialize fields that control variations in processing algorithm.

void SomeName::Env::test int  argc = 0,
const char *  argv[] = NULL
[static]
 

Unit testing method.

This static method should create instances of the class (and instances of any other class necessary) and perform tests to ensure that all methods within the class are working as expected.


The documentation for this class was generated from the following files:
Generated on Thu Jun 8 11:53:14 2006 for SomeName by  doxygen 1.4.6