HulaLoop
Simple cross-platform audio loopback and recording.
Public Member Functions | List of all members
hula::InteractiveCLI Class Reference

Class containing the interactive CLI. More...

#include <InteractiveCLI.h>

Public Member Functions

 InteractiveCLI (QCoreApplication *app)
 Constuct a new instance of InteractiveCLI. More...
 
void unusedArgs (const std::vector< std::string > &args, int numUsed) const
 Print a warning to the user detailing extra arguments that they provided. More...
 
void missingArg (const std::string &argName) const
 Print a warning about missing args to the specified command. More...
 
void malformedArg (const std::string &argName, const std::string &val, const std::string &type) const
 Print a warning about a malformed argument. More...
 
void start ()
 Start taking in commands. More...
 
HulaCliStatus processCommand (const std::string &command, const std::vector< std::string > &args)
 Proccess the command entered by the user. More...
 
TransportState getState ()
 Fetch the state of the internal Transport. More...
 
void setOutputFilePath (const std::string &path)
 Set the default output file path used by the CLI. More...
 
 ~InteractiveCLI ()
 Destructor for InteractiveCLI.
 

Detailed Description

Class containing the interactive CLI.

Constructor & Destructor Documentation

InteractiveCLI::InteractiveCLI ( QCoreApplication *  app)

Constuct a new instance of InteractiveCLI.

This will not start the command loop.

Member Function Documentation

TransportState InteractiveCLI::getState ( )

Fetch the state of the internal Transport.

Returns
State of the transport
void InteractiveCLI::malformedArg ( const std::string &  argName,
const std::string &  val,
const std::string &  type 
) const

Print a warning about a malformed argument.

Parameters
argNameName of the malformed argument
valValue given by user
typeExpected type of value
void InteractiveCLI::missingArg ( const std::string &  argName) const

Print a warning about missing args to the specified command.

Parameters
argNameName of the missing argument
HulaCliStatus InteractiveCLI::processCommand ( const std::string &  command,
const std::vector< std::string > &  args 
)

Proccess the command entered by the user.

Parameters
commandName of command in short or long form
argsVector of arguments that should be used with the command
Returns
HulaCliStatus Outcome of the command
void InteractiveCLI::setOutputFilePath ( const std::string &  path)

Set the default output file path used by the CLI.

This is used primarily so that the CLI –ouput-file flag can affect the export path.

void InteractiveCLI::start ( )

Start taking in commands.

This is an infinite loop.

void InteractiveCLI::unusedArgs ( const std::vector< std::string > &  args,
int  numUsed 
) const

Print a warning to the user detailing extra arguments that they provided.

Parameters
argsVector of all arguments provided to the command
numUsedNumber of arguments actually used by the command

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