Public Member Functions | Protected Member Functions | List of all members
gnsstk::CommandOptionWithDecimalArg Class Reference

Detailed Description

A standard CommandOption that requires a fixed-point decimal numeric argument.

Definition at line 423 of file CommandOption.hpp.

#include <CommandOption.hpp>

Inheritance diagram for gnsstk::CommandOptionWithDecimalArg:
Inheritance graph
[legend]

Public Member Functions

virtual std::string checkArguments ()
 
 CommandOptionWithDecimalArg (const char shOpt, const std::string &loOpt, const std::string &desc, const bool required=false)
 Constructor. More...
 
virtual std::string getArgString () const
 Returns a string with the argument format. More...
 
virtual ~CommandOptionWithDecimalArg ()
 Destructor. More...
 
- Public Member Functions inherited from gnsstk::CommandOptionWithArg
 CommandOptionWithArg (const CommandOptionType ot, const char shOpt, const std::string &loOpt, const std::string &desc, const bool required=false)
 Constructor. More...
 
virtual ~CommandOptionWithArg ()
 Destructor. More...
 
- Public Member Functions inherited from gnsstk::CommandOption
 CommandOption (const CommandOptionFlag of, const CommandOptionType ot, const char shOpt, const std::string &loOpt, const std::string &desc, const bool req=false, CommandOptionVec &optVectorList=defaultCommandOptionList)
 
std::ostream & dumpValue (std::ostream &out) const
 Displays this->value to the stream out. More...
 
virtual unsigned long getCount () const
 
std::string getDescription () const
 Returns a formatted string with the description of this option. More...
 
std::string getFullOptionString () const
 
virtual std::string getOptionString () const
 
unsigned long getOrder (unsigned long idx=-1) const
 
const std::vector< std::string > & getValue () const
 
void setDescription (const std::string &desc)
 
CommandOptionsetMaxCount (const unsigned long l)
 
struct option toGetoptLongOption () const
 Returns a struct option for use with getopt_long. More...
 
std::string toGetoptShortOption () const
 Returns a string for use with getopt. More...
 
virtual ~CommandOption ()
 Destructor. More...
 

Protected Member Functions

 CommandOptionWithDecimalArg ()
 Default Constructor. More...
 
- Protected Member Functions inherited from gnsstk::CommandOptionWithArg
 CommandOptionWithArg ()
 Default Constructor. More...
 
- Protected Member Functions inherited from gnsstk::CommandOption
 CommandOption ()
 Default Constructor. More...
 

Additional Inherited Members

- Public Types inherited from gnsstk::CommandOption
enum  CommandOptionFlag { noArgument = 0, hasArgument = 1 }
 
enum  CommandOptionType { trailingType, stdType, metaType }
 
- Protected Attributes inherited from gnsstk::CommandOption
unsigned long count
 
std::string description
 The description for the help text. More...
 
std::string longOpt
 The string for the long option (for example, "--foo"). More...
 
unsigned long maxCount
 
CommandOptionFlag optFlag
 Flag for determining whether this option has an argument or not. More...
 
CommandOptionType optType
 
std::vector< unsigned long > order
 The order in which this option was encountered on the command line. More...
 
CommandOptionParserparser
 
bool required
 Whether or not this is a required command line option. More...
 
char shortOpt
 The character for the short option (for example, '-f'). More...
 
std::vector< std::string > value
 Any arguments passed with this option get put in here. More...
 

Constructor & Destructor Documentation

◆ CommandOptionWithDecimalArg() [1/2]

gnsstk::CommandOptionWithDecimalArg::CommandOptionWithDecimalArg ( const char  shOpt,
const std::string &  loOpt,
const std::string &  desc,
const bool  required = false 
)
inline

Constructor.

Definition at line 427 of file CommandOption.hpp.

◆ ~CommandOptionWithDecimalArg()

virtual gnsstk::CommandOptionWithDecimalArg::~CommandOptionWithDecimalArg ( )
inlinevirtual

Destructor.

Definition at line 435 of file CommandOption.hpp.

◆ CommandOptionWithDecimalArg() [2/2]

gnsstk::CommandOptionWithDecimalArg::CommandOptionWithDecimalArg ( )
inlineprotected

Default Constructor.

Definition at line 445 of file CommandOption.hpp.

Member Function Documentation

◆ checkArguments()

string gnsstk::CommandOptionWithDecimalArg::checkArguments ( )
virtual

If you specified a format for the arguments (for example, digit or string), this function checks them to see if they match. If they don't, an error string is returned. If they do, an empty string is returned.

Reimplemented from gnsstk::CommandOption.

Definition at line 263 of file CommandOption.cpp.

◆ getArgString()

virtual std::string gnsstk::CommandOptionWithDecimalArg::getArgString ( ) const
inlinevirtual

Returns a string with the argument format.

Reimplemented from gnsstk::CommandOption.

Definition at line 440 of file CommandOption.hpp.


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


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:44