Simplest string container interface, ala C's argv.
A little iterator interface interface around arrays of strings, whereever tbey may be fetched from an ESI interface. 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.
This pattern keeps creation/management of all the memory associated with the Argv in the scope of the caller or internal to the Argv itself.