41 int GetInt(
const String& name,
int defaultValue = 0)
const;
45 float GetFloat(
const String& name,
float defaultValue = 0.0f)
const;
49 bool GetBool(
const String& name,
bool defaultValue=
false)
const;
107 return this->
args.Size() == 0;
Nebula's dynamic array class.
Definition array.h:60
const Dictionary< String, String > & GetPairs() const
get any key value pairs from args
Definition commandlineargs.h:114
void ParseIntoGroups(const Array< String > &Tokenized)
sort out any explicit key=value arguments into separate structure
Definition commandlineargs.cc:49
Util::Array< Math::mat4 > GetMat4s(const String &name, const Math::mat4 &defaultValue=Math::mat4()) const
get all mat4 values
Definition commandlineargs.cc:357
Math::vec4 GetVec4(const String &name, const Math::vec4 &defaultValue=Math::vec4()) const
get vec4 value
Definition commandlineargs.cc:298
float GetFloatAtIndex(IndexT index) const
get float value at index
Definition commandlineargs.cc:413
bool IsEmpty() const
returns true if the argument list is empty
Definition commandlineargs.h:105
bool HasArg(const String &arg, const IndexT start=0) const
return true if arg exists
Definition commandlineargs.cc:90
float GetFloat(const String &name, float defaultValue=0.0f) const
get float value
Definition commandlineargs.cc:202
Math::mat4 GetMat4(const String &name, const Math::mat4 &defaultValue=Math::mat4()) const
get mat4 value
Definition commandlineargs.cc:341
Util::Array< float > GetFloats(const String &name, float defaultValue=0.0f) const
get all float values
Definition commandlineargs.cc:218
SizeT GetNumArgs() const
get number of arguments (exluding command name)
Definition commandlineargs.cc:385
int FindArgIndex(const String &argName, const IndexT start=0) const
find index of argument, fails hard with error msg if not found
Definition commandlineargs.cc:101
bool GetBoolFlag(const String &name) const
get bool flag (args only needs to exist to trigger as true)
Definition commandlineargs.cc:288
int GetIntAtIndex(IndexT index) const
get int value at index
Definition commandlineargs.cc:404
void Error(const String &argName) const
put out an error
Definition commandlineargs.cc:69
Math::vec4 GetVec4AtIndex(IndexT index) const
get vec4 value at index
Definition commandlineargs.cc:432
Util::Array< bool > GetBools(const String &name, bool defaultValue=false) const
get all bool values
Definition commandlineargs.cc:261
const String & GetString(const String &name, const String &defaultValue="") const
get string value
Definition commandlineargs.cc:116
void AppendCommandString(const CommandLineArgs &otherArgs)
append other command string
Definition commandlineargs.cc:451
const String & GetCmdName() const
get the command name
Definition commandlineargs.cc:79
const String & GetStringAtIndex(IndexT index) const
get string argument at index
Definition commandlineargs.cc:395
Array< String > args
Definition commandlineargs.h:96
int GetInt(const String &name, int defaultValue=0) const
get int value
Definition commandlineargs.cc:159
Util::Array< int > GetInts(const String &name, int defaultValue=0) const
get all int values
Definition commandlineargs.cc:175
bool GetBool(const String &name, bool defaultValue=false) const
get bool value (key=value)
Definition commandlineargs.cc:245
CommandLineArgs()
default constructor
Definition commandlineargs.cc:18
Math::mat4 GetMat4AtIndex(IndexT index) const
get mat4 value at index
Definition commandlineargs.cc:441
Dictionary< String, String > keyPairs
Definition commandlineargs.h:97
bool GetBoolAtIndex(IndexT index) const
get bool value at index
Definition commandlineargs.cc:422
Util::Array< Math::vec4 > GetVec4s(const String &name, const Math::vec4 &defaultValue=Math::vec4()) const
get all vec4 values
Definition commandlineargs.cc:314
Util::Array< Util::String > GetStrings(const String &name, const String &defaultValue="") const
get all string values
Definition commandlineargs.cc:132
A collection of key/value pairs with quick value retrieval by key at roughly O(log n).
Definition dictionary.h:34
A pinned array is an array which manages its own virtual memory.
Definition String.cs:6
A 4x4 single point precision float matrix.
Definition mat4.h:49
A 4D vector.
Definition vec4.h:24
Nebula's universal string class.
Definition String.cs:8
int SizeT
Definition types.h:49
int IndexT
Definition types.h:48