DLTest Class Reference

The DLTest class provides an template for an individual driver application. More...

#include <DLTest.h>

List of all members.

Public Member Functions

 DLTest (char *name, int argc, char **argv)
virtual ~DLTest (void)
string getTestName ()
string getResult ()
void appendToTestLog (string newInfo)
string getTestLog ()
virtual int go ()=0
virtual void showHelp ()=0

Protected Attributes

int dlArgc
 The number of arguments that follow in dlArgv.
char ** dlArgv
 The array of null-terminated strings representing command-line arguments.
char * testName
 Name of the test.
string testLog
 The test log information.
int result
 Current status of the test.


Detailed Description

The DLTest class provides an template for an individual driver application.

Developers can use the DLTest template to create a customized driver application using DOCLIB and its add-on modules by defining a derived class from DLTest. Two virtual functions need to be customized in a derived class of DLTest -- go() and showHelp(). Function go() should include the procedures of the application, including how to parse the set of command line arguments and what steps to execute (e.g. looping through a set of documents specified by the command line user). Function showHelp() displays the command-line help information to the end user, so that a new user is aware of what to expect when running the application and the command line syntax to run the application.

Definition at line 23 of file DLTest.h.


Constructor & Destructor Documentation

DLTest::DLTest ( char *  name,
int  argc,
char **  argv 
)

Default DLTest Constructor. Initialize the list of command line arguments

Parameters:
argc An integer that contains the count of arguments that follow in argv. The argc parameter is always greater than or equal to 1.
argv An array of null-terminated strings representing command-line arguments entered by the user of the program. By convention, argv[0] is the command with which the program is invoked, argv[1] is the first command-line argument, and so on, until argv[argc], which is always NULL.
name A string given to the test.

virtual DLTest::~DLTest ( void   )  [virtual]

Default DLTest Destructor


Member Function Documentation

string DLTest::getTestName (  )  [inline]

Return the name of the test

Returns:
the name of the test

Definition at line 48 of file DLTest.h.

References testName.

string DLTest::getResult (  )  [inline]

Return the final status of the test

Returns:
the final status of the test

Definition at line 54 of file DLTest.h.

References result.

void DLTest::appendToTestLog ( string  newInfo  ) 

Append new information in string to the test log

string DLTest::getTestLog (  )  [inline]

Return the complete test log string

Returns:
the complete test log string

Definition at line 65 of file DLTest.h.

References testLog.

virtual int DLTest::go (  )  [pure virtual]

Developers need to write the set of actions in this member function of their derived class as this is a virtual function

virtual void DLTest::showHelp (  )  [pure virtual]

Developers need to define command line help information displayed to users in this member function of their derived class as this is a virtual function


Member Data Documentation

int DLTest::dlArgc [protected]

The number of arguments that follow in dlArgv.

Definition at line 81 of file DLTest.h.

char** DLTest::dlArgv [protected]

The array of null-terminated strings representing command-line arguments.

Definition at line 84 of file DLTest.h.

char* DLTest::testName [protected]

Name of the test.

Definition at line 87 of file DLTest.h.

Referenced by getTestName().

string DLTest::testLog [protected]

The test log information.

Definition at line 90 of file DLTest.h.

Referenced by getTestLog().

int DLTest::result [protected]

Current status of the test.

Definition at line 93 of file DLTest.h.

Referenced by getResult().


The documentation for this class was generated from the following file:

DLTestDOCLIB Library is an add-on module of DOCLIB. DOCLIB is being developed under contract by a collaboration between:

The Laboratory for Language and Media Processing
Unviersity of Maryland, College Park
and
Booz | Allen | Hamilton

All Rights Reserved, 2003-2007