Conjecture::Env Class Reference

#include <Env.h>

Inheritance diagram for Conjecture::Env:

Conjecture::Root List of all members.

Detailed Description

The public front-end to the Conjecture 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 Conjecture.


Public Member Functions

 Env (int argc, const char *argv[])
bool processArgs (int argc, const char **argv)
 Initialize fields that control variations in processing algorithm.
PageregisterPage (const std::string &file)
 Add a new Page to my list of pages.
PagecurrentPage ()
void wrapup ()
const std::string & moduleId () const
const Pagecurrent () 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 char ** argv () const
unsigned argc () const
const OCRModulemodule () const
virtual OCRModulemakeModule ()

Static Public Member Functions

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

Protected Member Functions

void currentIs (Page *current)
void moduleIdIs (const std::string &moduleId)
void pagesIs (const std::vector< Page * > &pages)
void verboseIs (int verbose)
void outfileIs (const std::string &outfile)
void infileIs (const std::string &infile)
void rawdataIs (const std::string &rawdata)
void argcIs (int argc)
void argvIs (const char **argv)


Member Function Documentation

Page* Conjecture::Env::currentPage  )  [inline]
 

Returns the currently "active" page.

OCRModule * Conjecture::Env::makeModule  )  [virtual]
 

Factory Method for creating an appropriate Module

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

const OCRModule* Conjecture::Env::module  )  const [inline]
 

Returns an object that provides access to algorithm implementations.

Page* Conjecture::Env::registerPage const std::string &  file  ) 
 

Add a new Page to my list of pages.

Creates a Page instances, makes it the current page within this Env, adds it to the 'pages' vector, and returns it.

void Conjecture::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.

void Conjecture::Env::wrapup  ) 
 

Perform any final post-processing mandated by config fields.


The documentation for this class was generated from the following files:
Generated on Thu Jun 15 19:56:11 2006 for Conjecture by  doxygen 1.4.6