61 (*iter)->ClearObjects();
71 if ( (*iter)->GetName() == name) {
78 "No argument named '" + name +
"'");
85 if ( (*iter)->GetName() == name) {
92 "No argument named '" + name +
"'");
101 if ( (*iter)->GetName() == name) {
113 if ( (*iter)->GetName() == arg_name) {
132 string(
"Argument `") + name +
string(
"' already exists"));
150 arg->SetSecretString();
156 arg->SetOutputFile();
165 arg->SetObject(
"SerialObject");
171 "Invalid argument type in AddArgument()");
180 Set().push_back(arg);
195 string(
"Argument `") + name +
string(
"' already exists"));
199 arg->SetObject(
type);
207 Set().push_back(arg);
221 string(
"Argument `") + name +
string(
"' already exists"));
227 arg->SetDefault(
true);
242 arg->SetSecretString(
val);
250 arg->SetInputFile(
val);
254 arg->SetOutputFile(
val);
259 "Attempt to create non-String argument type with "
260 "string default value");
263 Set().push_back(arg);
294 string(
"Argument `") + name +
string(
"' already exists"));
309 arg->SetSecretString();
318 arg->SetOutputFile();
327 arg->SetObject(
"SerialObject");
333 "Invalid argument type in AddArgument()");
338 arg->SetOptional(
true);
343 Set().push_back(arg);
355 string(
"Argument `") + name +
string(
"' already exists"));
361 arg->SetOptional(
true);
362 arg->SetObject(
info);
367 Set().push_back(arg);
CPluginArg & AddFlag(const string &name, const string &desc)
Add a flag value.
void RemoveArgument(const string &arg_name)
Delete an existing argument.
void RemoveConstraint(const string &name)
Remove the constraint of a named argument.
void SetConstraint(const string &name, CPluginValueConstraint &constraint)
Set the constraint of a named argument.
bool HasArgument(const string &name) const
HasArgument() verifies that an argument exists.
~CPluginArgSet(void)
destructor
CPluginArg & AddArgument(const string &name, const string &desc, CPluginArg::EType type, CPluginArg::TData::E_Choice single_or_array=CPluginArg::TData::e_Single)
add a named argument.
void AddConstraint(const string &name, CPluginValueConstraint &constraint)
Add a constraint to a named argument.
void ClearObjects()
Clear all objects from object-based arguments.
CPluginArg & AddOptionalArgument(const string &name, const string &description, CPluginArg::EType type, CPluginArg::TData::E_Choice single_or_array=CPluginArg::TData::e_Single)
add an optional argument to the set of arguments.
const CPluginArg & operator[](const string &name) const
operator[] for indexing based on named argument this will throw if the named argument isn't found
CPluginArg & AddDefaultArgument(const string &name, const string &description, CPluginArg::EType type, const string &val)
Add a default argument to the set of arguments.
CPluginArg & AddDefaultFlag(const string &name, const string &desc, bool val)
Add a flag argument with a default value.
EType
enumerated list of types we support
@ eAnySerialObject
special type: could be any CSerialObject-derived object
CTypeInfo class contains all information about C++ types (both basic and classes): members and layout...
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static bool StringToBool(const CTempString str)
Convert string to bool.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static double StringToDouble(const CTempStringEx str, TStringToNumFlags flags=0)
Convert string to double.
static const string BoolToString(bool value)
Convert bool to string.
void ResetConstraint(void)
Reset Constraint data member.
TConstraint & SetConstraint(void)
Assign a value to Constraint data member.
list< CRef< CPluginArg > > Tdata
Tdata & Set(void)
Assign a value to data member.
const Tdata & Get(void) const
Get the member data.