CommandOptionWithCommonTimeArg Class Reference
[Command-Line OptionsGPStk Time Group]

#include <CommandOptionWithCommonTimeArg.hpp>

Inheritance diagram for CommandOptionWithCommonTimeArg:

Inheritance graph
[legend]
Collaboration diagram for CommandOptionWithCommonTimeArg:

Collaboration graph
[legend]
List of all members.

Detailed Description

Command-line option class for processing time strings. This class is allows the programmer to add command-line options to an application that can parse strings containing representations of time. The programmer must specify the format to be accepted. Refer to each TimeTag class' getDefaultFormat() for details on the formatting specifications.

Definition at line 62 of file CommandOptionWithCommonTimeArg.hpp.

Public Member Functions

 CommandOptionWithCommonTimeArg (const char shOpt, const std::string &loOpt, const std::string &timeFormat, const std::string &desc, const bool required=false)
 Constructor.
virtual ~CommandOptionWithCommonTimeArg ()
 Destructor.
virtual std::string getArgString () const
 Returns a string with the argument format (just "TIME", not scanning format).
virtual std::string checkArguments ()
 Validate arguments passed using this option (and store them).
std::vector< CommonTimegetTime () const
 Return the times scanned in from the command line.

Protected Member Functions

 CommandOptionWithCommonTimeArg ()
 Default Constructor.

Protected Attributes

std::vector< CommonTimetimes
 Collection of times scanned in from the command line.
std::string timeSpec
 Format used to scan times in.


Constructor & Destructor Documentation

CommandOptionWithCommonTimeArg const char  shOpt,
const std::string &  loOpt,
const std::string &  timeFormat,
const std::string &  desc,
const bool  required = false
[inline]
 

Constructor.

Parameters:
shOpt The one character command line option. Set to 0 if unused.
loOpt The long command option. Set to std::string() if unused.
timeFormat format for scanning argument into a CommonTime (
See also:
scanTime() in TimeString.hpp and TimeString.cpp for details).
Parameters:
desc A string describing what this option does.
required Set to true if this is a required option.

Definition at line 75 of file CommandOptionWithCommonTimeArg.hpp.

virtual ~CommandOptionWithCommonTimeArg  )  [inline, virtual]
 

Destructor.

Definition at line 85 of file CommandOptionWithCommonTimeArg.hpp.

CommandOptionWithCommonTimeArg  )  [inline, protected]
 

Default Constructor.

Definition at line 105 of file CommandOptionWithCommonTimeArg.hpp.


Member Function Documentation

string checkArguments  )  [virtual]
 

Validate arguments passed using this option (and store them).

Reimplemented from CommandOption.

Definition at line 52 of file CommandOptionWithCommonTimeArg.cpp.

References gpstk::scanTime(), CommandOptionWithCommonTimeArg::times, and CommandOptionWithCommonTimeArg::timeSpec.

virtual std::string getArgString  )  const [inline, virtual]
 

Returns a string with the argument format (just "TIME", not scanning format).

Reimplemented from CommandOption.

Definition at line 89 of file CommandOptionWithCommonTimeArg.hpp.

std::vector<CommonTime> getTime  )  const [inline]
 

Return the times scanned in from the command line.

Definition at line 96 of file CommandOptionWithCommonTimeArg.hpp.


Member Data Documentation

std::vector<CommonTime> times [protected]
 

Collection of times scanned in from the command line.

Definition at line 100 of file CommandOptionWithCommonTimeArg.hpp.

Referenced by CommandOptionWithCommonTimeArg::checkArguments().

std::string timeSpec [protected]
 

Format used to scan times in.

Definition at line 102 of file CommandOptionWithCommonTimeArg.hpp.

Referenced by CommandOptionWithCommonTimeArg::checkArguments().


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 03:31:34 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1