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;
102 return this->
args.Size() == 0;
Nebula's dynamic array class.
Definition array.h:60
A universal cmd line argument parser.
Definition commandlineargs.h:24
Util::Array< Math::mat4 > GetMat4s(const String &name, const Math::mat4 &defaultValue=Math::mat4()) const
get all mat4 values
Definition commandlineargs.cc:336
Math::vec4 GetVec4(const String &name, const Math::vec4 &defaultValue=Math::vec4()) const
get vec4 value
Definition commandlineargs.cc:277
float GetFloatAtIndex(IndexT index) const
get float value at index
Definition commandlineargs.cc:392
bool IsEmpty() const
returns true if the argument list is empty
Definition commandlineargs.h:100
bool HasArg(const String &arg, const IndexT start=0) const
return true if arg exists
Definition commandlineargs.cc:69
float GetFloat(const String &name, float defaultValue=0.0f) const
get float value
Definition commandlineargs.cc:181
Math::mat4 GetMat4(const String &name, const Math::mat4 &defaultValue=Math::mat4()) const
get mat4 value
Definition commandlineargs.cc:320
Util::Array< float > GetFloats(const String &name, float defaultValue=0.0f) const
get all float values
Definition commandlineargs.cc:197
SizeT GetNumArgs() const
get number of arguments (exluding command name)
Definition commandlineargs.cc:364
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:80
bool GetBoolFlag(const String &name) const
get bool flag (args only needs to exist to trigger as true)
Definition commandlineargs.cc:267
int GetIntAtIndex(IndexT index) const
get int value at index
Definition commandlineargs.cc:383
void Error(const String &argName) const
put out an error
Definition commandlineargs.cc:48
Math::vec4 GetVec4AtIndex(IndexT index) const
get vec4 value at index
Definition commandlineargs.cc:411
Util::Array< bool > GetBools(const String &name, bool defaultValue=false) const
get all bool values
Definition commandlineargs.cc:240
const String & GetString(const String &name, const String &defaultValue="") const
get string value
Definition commandlineargs.cc:95
void AppendCommandString(const CommandLineArgs &otherArgs)
append other command string
Definition commandlineargs.cc:430
const String & GetCmdName() const
get the command name
Definition commandlineargs.cc:58
const String & GetStringAtIndex(IndexT index) const
get string argument at index
Definition commandlineargs.cc:374
Array< String > args
Definition commandlineargs.h:92
int GetInt(const String &name, int defaultValue=0) const
get int value
Definition commandlineargs.cc:138
Util::Array< int > GetInts(const String &name, int defaultValue=0) const
get all int values
Definition commandlineargs.cc:154
bool GetBool(const String &name, bool defaultValue=false) const
get bool value (key=value)
Definition commandlineargs.cc:224
CommandLineArgs()
default constructor
Definition commandlineargs.cc:18
Math::mat4 GetMat4AtIndex(IndexT index) const
get mat4 value at index
Definition commandlineargs.cc:420
bool GetBoolAtIndex(IndexT index) const
get bool value at index
Definition commandlineargs.cc:401
Util::Array< Math::vec4 > GetVec4s(const String &name, const Math::vec4 &defaultValue=Math::vec4()) const
get all vec4 values
Definition commandlineargs.cc:293
Util::Array< Util::String > GetStrings(const String &name, const String &defaultValue="") const
get all string values
Definition commandlineargs.cc:111
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.h:50
int SizeT
Definition types.h:49
int IndexT
Definition types.h:48