Public Member Functions | Private Attributes | Friends | List of all members
el::base::utils::CommandLineArgs Class Reference

Command line arguments for application if specified using el::Helpers::setArgs(..) or START_EASYLOGGINGPP(..) More...

#include <easylogging++.h>

Public Member Functions

 CommandLineArgs (void)
 
 CommandLineArgs (int argc, const char **argv)
 
 CommandLineArgs (int argc, char **argv)
 
bool empty (void) const
 Returns true if no params available. This exclude argv[0]. More...
 
const char * getParamValue (const char *paramKey) const
 Returns value of arguments. More...
 
bool hasParam (const char *paramKey) const
 Return true if arguments has a param (not having a value) i,e without '='. More...
 
bool hasParamWithValue (const char *paramKey) const
 Returns true if arguments contain paramKey with a value (seperated by '=') More...
 
void setArgs (int argc, const char **argv)
 Sets arguments and parses them. More...
 
void setArgs (int argc, char **argv)
 Sets arguments and parses them. More...
 
std::size_t size (void) const
 Returns total number of arguments. This exclude argv[0]. More...
 
virtual ~CommandLineArgs (void)
 

Private Attributes

int m_argc
 
char ** m_argv
 
std::vector< std::stringm_params
 
std::unordered_map< std::string, std::stringm_paramsWithValue
 

Friends

base::type::ostream_toperator<< (base::type::ostream_t &os, const CommandLineArgs &c)
 

Detailed Description

Command line arguments for application if specified using el::Helpers::setArgs(..) or START_EASYLOGGINGPP(..)

Definition at line 1204 of file easylogging++.h.

Constructor & Destructor Documentation

el::base::utils::CommandLineArgs::CommandLineArgs ( void  )
inline

Definition at line 1206 of file easylogging++.h.

el::base::utils::CommandLineArgs::CommandLineArgs ( int  argc,
const char **  argv 
)
inline

Definition at line 1209 of file easylogging++.h.

el::base::utils::CommandLineArgs::CommandLineArgs ( int  argc,
char **  argv 
)
inline

Definition at line 1212 of file easylogging++.h.

virtual el::base::utils::CommandLineArgs::~CommandLineArgs ( void  )
inlinevirtual

Definition at line 1215 of file easylogging++.h.

Member Function Documentation

bool el::base::utils::CommandLineArgs::empty ( void  ) const

Returns true if no params available. This exclude argv[0].

Definition at line 1381 of file easylogging++.cc.

const char * el::base::utils::CommandLineArgs::getParamValue ( const char *  paramKey) const

Returns value of arguments.

See also
hasParamWithValue(const char*)

Definition at line 1372 of file easylogging++.cc.

bool el::base::utils::CommandLineArgs::hasParam ( const char *  paramKey) const

Return true if arguments has a param (not having a value) i,e without '='.

Definition at line 1377 of file easylogging++.cc.

bool el::base::utils::CommandLineArgs::hasParamWithValue ( const char *  paramKey) const

Returns true if arguments contain paramKey with a value (seperated by '=')

Definition at line 1368 of file easylogging++.cc.

void el::base::utils::CommandLineArgs::setArgs ( int  argc,
const char **  argv 
)
inline

Sets arguments and parses them.

Definition at line 1217 of file easylogging++.h.

void el::base::utils::CommandLineArgs::setArgs ( int  argc,
char **  argv 
)

Sets arguments and parses them.

Definition at line 1338 of file easylogging++.cc.

std::size_t el::base::utils::CommandLineArgs::size ( void  ) const

Returns total number of arguments. This exclude argv[0].

Definition at line 1385 of file easylogging++.cc.

Friends And Related Function Documentation

base::type::ostream_t& operator<< ( base::type::ostream_t os,
const CommandLineArgs c 
)
friend

Definition at line 1389 of file easylogging++.cc.

Member Data Documentation

int el::base::utils::CommandLineArgs::m_argc
private

Definition at line 1236 of file easylogging++.h.

char** el::base::utils::CommandLineArgs::m_argv
private

Definition at line 1237 of file easylogging++.h.

std::vector<std::string> el::base::utils::CommandLineArgs::m_params
private

Definition at line 1239 of file easylogging++.h.

std::unordered_map<std::string, std::string> el::base::utils::CommandLineArgs::m_paramsWithValue
private

Definition at line 1238 of file easylogging++.h.


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


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:36