Etermal
Embeddable Terminal and shell for OpenGL
Public Member Functions | List of all members
etm::Args Class Reference

Data class containing information about arguments passed to a command. More...

#include <Args.h>

Public Member Functions

 Args ()
 Construct an Args object.
 
void pushArg (const std::string &name, const data_t &data)
 
void setCall (const std::string &str)
 
void setArrayArgs (std::vector< std::string > &&args)
 
bool has (const std::string &name)
 Check if object has the given argument. More...
 
data_t get (const std::string &name)
 Get the given argument. More...
 
std::string & getCall ()
 Gets the alias that was used to invoke the command. More...
 
std::vector< std::string > & getArrayArgs ()
 Gets the flagless parameters. More...
 

Detailed Description

Data class containing information about arguments passed to a command.

See also
ArgFilter
Shell

Member Function Documentation

◆ get()

data_t etm::Args::get ( const std::string &  name)

Get the given argument.

Note
If the argument doesn't exist (has(const std::string &name) returns false), the returned shared pointer will not be callable.
Parameters
[in]nameName of the argument

◆ getArrayArgs()

std::vector<std::string>& etm::Args::getArrayArgs ( )

Gets the flagless parameters.

Returns
The args

◆ getCall()

std::string& etm::Args::getCall ( )

Gets the alias that was used to invoke the command.

Returns
The alias

◆ has()

bool etm::Args::has ( const std::string &  name)

Check if object has the given argument.

Parameters
[in]nameName of the argument
Returns
true if the argument exists

The documentation for this class was generated from the following file: