#include <Env.h>
Inheritance diagram for Conjecture::Env:
*****************************************************************
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. | |
Page * | registerPage (const std::string &file) |
Add a new Page to my list of pages. | |
Page * | currentPage () |
void | wrapup () |
const std::string & | moduleId () const |
const Page * | current () 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 OCRModule * | module () const |
virtual OCRModule * | makeModule () |
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) |
|
Returns the currently "active" page. |
|
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 :-). |
|
Returns an object that provides access to algorithm implementations. |
|
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. |
|
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. |
|
Perform any final post-processing mandated by config fields. |