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

Class containing the interactive CLI. More...

#include <InteractiveCLI.h>

Public Member Functions

 HulaInteractiveCli ()
 Constuct a new instance of HulaInteractiveCli. 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 ()
 Destroy the Hula Interactive Cli:: Hula Interactive Cli object. More...
 
 ~HulaInteractiveCli ()
 Destructor for HulaInteractiveCli.
 

Detailed Description

Class containing the interactive CLI.

Constructor & Destructor Documentation

HulaInteractiveCli::HulaInteractiveCli ( )

Constuct a new instance of HulaInteractiveCli.

This will not start the command loop.

Member Function Documentation

TransportState HulaInteractiveCli::getState ( )

Destroy the Hula Interactive Cli:: Hula Interactive Cli object.

Returns
State of the transport
void HulaInteractiveCli::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 HulaInteractiveCli::missingArg ( const std::string &  argName) const

Print a warning about missing args to the specified command.

Parameters
argNameName of the missing argument
HulaCliStatus HulaInteractiveCli::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 HulaInteractiveCli::start ( )

Start taking in commands.

This is an infinite loop.

void HulaInteractiveCli::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: