#include <DLTest.h>
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. |
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.
DLTest::DLTest | ( | char * | name, | |
int | argc, | |||
char ** | argv | |||
) |
Default DLTest Constructor. Initialize the list of command line arguments
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
string DLTest::getTestName | ( | ) | [inline] |
string DLTest::getResult | ( | ) | [inline] |
void DLTest::appendToTestLog | ( | string | newInfo | ) |
Append new information in string to the test log
string DLTest::getTestLog | ( | ) | [inline] |
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
int DLTest::dlArgc [protected] |
char** DLTest::dlArgv [protected] |
char* DLTest::testName [protected] |
string DLTest::testLog [protected] |
int DLTest::result [protected] |