GCode Processor
Public Member Functions | Private Attributes | List of all members
CommandLineArguments Class Reference

Class to parse the command line arguments. More...

#include <CommandLineArguments.h>

Public Member Functions

 CommandLineArguments (int argc, const char *argv[])
 
 CommandLineArguments ()=default
 Default constructor.
 
 ~CommandLineArguments ()=default
 Default destructor.
 
CommandLineArgumentsoperator= (CommandLineArguments &&)=default
 Default move assignment operator.
 
const std::string & fileName () const &
 Returns the parsed GCode filename (lvalue version).
 
std::string && fileName ()&&
 Moves the parsed GCode filename (rvalue version).
 
const double angle () const
 Returns the parsed extruder angle (in degrees).
 
const double length () const
 Returns the parsed extruder travel length (in millimeters).
 
const TriggerParameterstriggerParameters () const &
 Returns the parsed trigger parameters (lvalue version).
 
TriggerParameters && triggerParameters ()&&
 Moves the parsed trigger parameters (rvalue version).
 

Private Attributes

std::string FileName_
 GCode file name.
 
TriggerParameters TriggerParameters_
 Parsed trigger parameters.
 

Detailed Description

Class to parse the command line arguments.

The program expects three options:

1 ./GCodeProcessor --file <file> --angle <angle> --length <length>

If any of the arguments is missing or more parameters are issued, the parser will throw.

Constructor & Destructor Documentation

CommandLineArguments ( int  argc,
const char *  argv[] 
)
explicit

Constructor.

Parameters
argcArgument count.
argvArgument vector.

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