Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Qtx::CmdLineArgs Class Reference

Get access to the command line arguments in the C-like manner. More...

#include <Qtx.h>

Public Member Functions

 CmdLineArgs ()
 Default constructor. More...
 
 ~CmdLineArgs ()
 Destructor. Deallocates the array with command line arguments. More...
 
int argc () const
 Get number of command line arguments. More...
 
char ** argv () const
 Get command line arguments. More...
 

Private Attributes

int myArgc
 
char ** myArgv
 

Detailed Description

This class translates command line arguments stored in QApplication in form of QStrlingList to the char* array, in the same way as they specified to main() function.

Constructor of class allocates required memory to store arguments; destructor deallocates it, This allows using this class as a local variable:

some_function(args.argc(), args.argv()); // function that has main()-like syntax.

Constructor & Destructor Documentation

Qtx::CmdLineArgs::CmdLineArgs ( )
Qtx::CmdLineArgs::~CmdLineArgs ( )

Member Function Documentation

int Qtx::CmdLineArgs::argc ( ) const
Returns
number of arguments
char ** Qtx::CmdLineArgs::argv ( ) const
Returns
command line arguments

Member Data Documentation

int Qtx::CmdLineArgs::myArgc
private
char** Qtx::CmdLineArgs::myArgv
private

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