OCRModule.h

00001 # ifndef Conjecture_OCRModule_h
00002 # define Conjecture_OCRModule_h Conjecture_OCRModule_h
00003 
00004 // Insert SVN header substitution variable here
00005 // Created by wade
00006 // Class Champion: Wade
00007 
00008 # include "ProcessComponent.h"
00009 # include "SegmentComponent.h"
00010 # include "IdentifyComponent.h"
00011 # include "FormatComponent.h"
00012 
00013 namespace Conjecture {
00014     // Forward Declarations
00015     class Env;
00016 
00055     class OCRModule {
00056       public:
00057         // Constructors/Destructors
00058         OCRModule();
00059         
00060         // Accessors
00061         //  - This class handles accessors for its algorithms differently than
00062         //    normal. The strategy is return non-const, and no 'xxxRef()'
00063         //    method is defined. This is because other classes always need
00064         //    non-const access to these algorithms in order to function.
00065         inline FormatComponent*          format()    const { return this->_format; }
00066         inline IdentifyComponent*        identify()  const { return this->_identify; }
00067         inline SegmentComponent*         segment()   const { return this->_segment; }
00068         inline ProcessComponent*         process()   const { return this->_process; }
00069         
00070         void init();
00071         
00072         // The Factory Methods that create every Component
00073         virtual ProcessComponent*        createProcessComponent()   const = 0;
00074         virtual SegmentComponent*        createSegmentComponent() const = 0;
00075         virtual IdentifyComponent*       createIdentifyComponent()  const = 0;
00076         virtual FormatComponent*         createFormatComponent()    const = 0;
00077         
00085         virtual void processArgs(int argc, const char** argv, Env* env = NULL) { }
00086         
00087       protected:
00088         // Accessors
00089         inline void                     formatIs(FormatComponent* format) { this->_format = format; }
00090         inline void                     identifyIs(IdentifyComponent* identify) { this->_identify = identify; }
00091         inline void                     segmentIs(SegmentComponent* segment) { this->_segment = segment; }
00092         inline void                     processIs(ProcessComponent* process) { this->_process = process; }
00093         
00094         // Methods 
00095         
00096       private: 
00097         // Accessors
00098         
00099         // Methods 
00100         
00101         // State
00102         FormatComponent*                 _format;
00103         IdentifyComponent*               _identify;
00104         SegmentComponent*                _segment;
00105         ProcessComponent*                _process;
00106     };
00107 };
00108 
00109 # endif // OCRModule_h
00110 

Generated on Thu Jun 15 19:56:10 2006 for Conjecture by  doxygen 1.4.6