40 for (
size_t i = 0;
i <
params.size(); ++
i)
41 names.registerProduct(
params[
i]->getName(), HoldsFunction::dummyCreate);
47 _paramsDeleter(_ownedParams) {
56 reportError(
string(
"Expected an option when reading \"") +
57 tokens[
i] +
"\", but options start with a dash (-).\n");
107 if ((*it)->getName() ==
name)
118 if ((*it)->getName() ==
name)
unsigned int getInt(const CliParams ¶ms, const string &name)
const string & getString(const CliParams ¶ms, const string &name)
bool getBool(const CliParams ¶ms, const string &name)
void setBool(CliParams ¶ms, const string &name, bool newValue)
void exceptionSafePushBack(Container &container, auto_ptr< Element > pointer)
void nameFactoryRegister(NameFactory< AbstractProduct > &factory)
Registers the string returned by ConcreteProduct::getStaticName() to a function that default-construc...
string getUniqueNameWithPrefix(const NameFactory< AbstractProduct > &factory, const string &prefix)
Returns the unique product name that has the indicated prefix, or return prefix itself if it is the a...
vector< Parameter * > _params
void processOption(const string &optionName, const char **params, unsigned int paramCount)
bool hasParam(const string &name) const
vector< Parameter * > _ownedParams
void parseCommandLine(unsigned int tokenCount, const char **tokens)
vector< Parameter * >::const_iterator const_iterator
const Parameter & getParam(const string &name) const
void add(auto_ptr< Parameter > param)
A NameFactory takes a name and then creates an instance of a class that has been previously registere...
vector< Parameter * >::iterator iterator
void reportInternalError(const string &errorMsg)
void reportError(const string &errorMsg)
#define INTERNAL_ERROR(msg)