OTB
9.0.0
Orfeo Toolbox
|
#include <otbWrapperCommandLineParser.h>
Public Types | |
typedef itk::SmartPointer< const Self > | ConstPointer |
enum | ParseResultType { OK, NOMODULENAME, MULTIPLEMODULENAME, INVALIDMODULENAME, NOMODULEPATH, INVALIDMODULEPATH, DEFAULT } |
typedef itk::SmartPointer< Self > | Pointer |
typedef CommandLineParser | Self |
typedef itk::Object | Superclass |
Public Member Functions | |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
std::vector< std::string > | GetAttribut (const std::string &key, const std::string &exp) |
std::vector< std::string > | GetAttribut (const std::string &key, const std::vector< std::string > &exp) |
std::string | GetAttributAsString (const std::string &key, const std::string &exp) |
std::string | GetAttributAsString (const std::string &key, const std::vector< std::string > &exp) |
virtual const char * | GetNameOfClass () const |
Static Public Member Functions | |
static Pointer | New () |
bool | IsAttributExists (const std::string &key, const std::string &exp) |
bool | IsAttributExists (const std::string &key, const std::vector< std::string > &exp) |
CommandLineParser::ParseResultType | GetPaths (std::vector< std::string > &paths, const std::string &exp) |
CommandLineParser::ParseResultType | GetPaths (std::vector< std::string > &paths, const std::vector< std::string > &exp) |
std::string | GetPathsAsString (const std::string &exp) |
std::string | GetPathsAsString (const std::vector< std::string > &vexp) |
CommandLineParser::ParseResultType | GetModuleName (std::string &modName, const std::string &exp) |
CommandLineParser::ParseResultType | GetModuleName (std::string &modName, const std::vector< std::string > &exp) |
std::vector< std::string > | GetKeyList (const std::string &exp) |
std::vector< std::string > | GetKeyList (const std::vector< std::string > &exp) |
CommandLineParser () | |
~CommandLineParser () override | |
CommandLineParser (const CommandLineParser &)=delete | |
void | operator= (const CommandLineParser &)=delete |
bool | IsAValidKey (const std::string &foundKey) |
This class check the validity of a command line application.
To be valid, the expression must be as follow: ModuleName (ModulePaths) –attribut1_Key attrubut1_Value –attribut2_Key attrubut2_Value After the attribute key, if the user give several values (expression without "--" separated by space), it will automacally be interpreted as a list.
Definition at line 43 of file otbWrapperCommandLineParser.h.
typedef itk::SmartPointer<const Self> otb::Wrapper::CommandLineParser::ConstPointer |
Definition at line 50 of file otbWrapperCommandLineParser.h.
typedef itk::SmartPointer<Self> otb::Wrapper::CommandLineParser::Pointer |
Definition at line 49 of file otbWrapperCommandLineParser.h.
Standard class typedefs.
Definition at line 47 of file otbWrapperCommandLineParser.h.
typedef itk::Object otb::Wrapper::CommandLineParser::Superclass |
Definition at line 48 of file otbWrapperCommandLineParser.h.
Parse result enum
Enumerator | |
---|---|
OK | |
NOMODULENAME | |
MULTIPLEMODULENAME | |
INVALIDMODULENAME | |
NOMODULEPATH | |
INVALIDMODULEPATH | |
DEFAULT |
Definition at line 59 of file otbWrapperCommandLineParser.h.
|
protected |
Constructor
|
overrideprotected |
Destructor
|
privatedelete |
Look if a given key is in an expression.
virtual::itk::LightObject::Pointer otb::Wrapper::CommandLineParser::CreateAnother | ( | void | ) | const |
std::vector<std::string> otb::Wrapper::CommandLineParser::GetAttribut | ( | const std::string & | key, |
const std::string & | exp | ||
) |
Get the attribute associated to a key (list of element after the key and before the next "--") as a vector of string.
std::vector<std::string> otb::Wrapper::CommandLineParser::GetAttribut | ( | const std::string & | key, |
const std::vector< std::string > & | exp | ||
) |
std::string otb::Wrapper::CommandLineParser::GetAttributAsString | ( | const std::string & | key, |
const std::string & | exp | ||
) |
Get the attribute associated to a key (list of element after the key and before the next "--") as a string separated by spaces.
std::string otb::Wrapper::CommandLineParser::GetAttributAsString | ( | const std::string & | key, |
const std::vector< std::string > & | exp | ||
) |
std::vector<std::string> otb::Wrapper::CommandLineParser::GetKeyList | ( | const std::string & | exp | ) |
Get the list of keys in an expression. That is to say each word starting by "--".
std::vector<std::string> otb::Wrapper::CommandLineParser::GetKeyList | ( | const std::vector< std::string > & | exp | ) |
Look if a given key is in an expression.
CommandLineParser::ParseResultType otb::Wrapper::CommandLineParser::GetModuleName | ( | std::string & | modName, |
const std::string & | exp | ||
) |
Get the module name in an expression. It can be the first element of the expression (if the expression doesn't start with a "--" or the attribute associated to the key m_ModuleNameKey).
CommandLineParser::ParseResultType otb::Wrapper::CommandLineParser::GetModuleName | ( | std::string & | modName, |
const std::vector< std::string > & | exp | ||
) |
Look if a given key is in an expression.
|
virtual |
RTTI support
CommandLineParser::ParseResultType otb::Wrapper::CommandLineParser::GetPaths | ( | std::vector< std::string > & | paths, |
const std::string & | exp | ||
) |
Get the paths executables in an expression. Store the list in a vector of string.
CommandLineParser::ParseResultType otb::Wrapper::CommandLineParser::GetPaths | ( | std::vector< std::string > & | paths, |
const std::vector< std::string > & | exp | ||
) |
Look if a given key is in an expression.
std::string otb::Wrapper::CommandLineParser::GetPathsAsString | ( | const std::string & | exp | ) |
Get the paths executables in an expression. Store the list in a vector of string.
std::string otb::Wrapper::CommandLineParser::GetPathsAsString | ( | const std::vector< std::string > & | vexp | ) |
Look if a given key is in an expression.
bool otb::Wrapper::CommandLineParser::IsAttributExists | ( | const std::string & | key, |
const std::string & | exp | ||
) |
Look if a given key is in an expression.
bool otb::Wrapper::CommandLineParser::IsAttributExists | ( | const std::string & | key, |
const std::vector< std::string > & | exp | ||
) |
Look if a given key is in an expression.
|
private |
Return true if the found key is valid : not a number
|
static |
Defining ::New() static method
|
privatedelete |
Look if a given key is in an expression.