#include <ArgvInterface.h>
Public Methods | |
| virtual | ~Argv () |
| Default destructor. More... | |
| virtual const char * | get (int index)=0 |
| virtual int | getArgCount ()=0 |
| virtual void | appendArg (const char *arg)=0 |
| Copy the arg given into the next slot in the argv. More... | |
In particular: Exists because we want a simple, abstract alternative to the STL. Implementors are free to use the STL underneath this interface if they so choose.
An example of its use:
SomeConcreteArgvImpl argvimpl;
// perhaps the argv class from the reference implementation.
esi::Argv *argvi = dynamic_cast<esi::Argv *>(&argvimpl);
esi_int err;
err = object->getRunTimeModels(argvi, char *msg);
if (!err) {
const char *arg;
for (i = 0; (arg = argvi->get(i)) != 0; i++) {
do.something(arg);
}
delete argvi;
}
argvi = 0;
And inside the getRunTimeModels call, a set of calls on
argvi->appendArg(rtmodelName[i]);
occurs, filling in the answers.
|
|
Default destructor.
00041 {}
|
|
|
|
|
|
|
|
|
Copy the arg given into the next slot in the argv.
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002