lintel 0.2.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lintel::ProcessArgumentService Class Reference

#include <ProcessArgumentService.h>

Public Member Functions

 ProcessArgumentService (const std::vector< std::shared_ptr< ArgumentProvider > > &argumentProviders)
 
void parseArguments (const std::vector< std::string > &arguments)
 
void processNewFlag (const std::string &argument, std::string &flag, std::vector< std::string > &args, Argument *&temp)
 

Detailed Description

Service for parsing command-line arguments and populating a map of flags to Argument objects.

Constructor & Destructor Documentation

◆ ProcessArgumentService()

lintel::ProcessArgumentService::ProcessArgumentService ( const std::vector< std::shared_ptr< ArgumentProvider > > &  argumentProviders)
explicit

Constructor.

Parameters
argumentProvidersproviders that register known flags

Member Function Documentation

◆ parseArguments()

void lintel::ProcessArgumentService::parseArguments ( const std::vector< std::string > &  arguments)

Parse command-line arguments.

Parameters
argumentsargument strings to parse

◆ processNewFlag()

void lintel::ProcessArgumentService::processNewFlag ( const std::string &  argument,
std::string &  flag,
std::vector< std::string > &  args,
Argument *&  temp 
)

Process a new flag and its associated arguments.

Parameters
argumentcurrent argument string
flagcurrent flag being processed
argscollected arguments for the flag
temppointer to the current Argument being populated

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