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

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 1234 of file easylogging++.h.

Constructor & Destructor Documentation

◆ CommandLineArgs() [1/3]

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

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

1236 {
1237 setArgs(0, static_cast<char**>(nullptr));
1238 }
void setArgs(int argc, const char **argv)
Sets arguments and parses them.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CommandLineArgs() [2/3]

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

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

1239 {
1240 setArgs(argc, argv);
1241 }
Here is the call graph for this function:

◆ CommandLineArgs() [3/3]

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

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

1242 {
1243 setArgs(argc, argv);
1244 }
Here is the call graph for this function:

◆ ~CommandLineArgs()

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

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

1245{}

Member Function Documentation

◆ empty()

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

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

◆ getParamValue()

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

Returns value of arguments.

See also
hasParamWithValue(const char*)

◆ hasParam()

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

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

◆ hasParamWithValue()

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

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

◆ setArgs() [1/2]

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

Sets arguments and parses them.

◆ setArgs() [2/2]

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

Sets arguments and parses them.

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

1247 {
1248 setArgs(argc, const_cast<char**>(argv));
1249 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ size()

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

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

◆ operator<<

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

The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/external/easylogging++/easylogging++.h