WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
WXP::ResrcCL Class Reference

This class parses the command line for resource values. More...

#include "../include/ResrcCL.h"

Public Member Functions

 ResrcCL (Strings &rstr)
 
int rewind ()
 
int getKeyed (String &name, String &value)
 
int getPosition (String &value)
 

Static Public Member Functions

static int compare (const char *str, const char *name, const char *cmdln)
 

Detailed Description

This class parses the command line for resource values.

Author
Dan Vietor

Constructor & Destructor Documentation

◆ ResrcCL()

ResrcCL::ResrcCL ( Strings rstr)

Constructor. Initializes class values

Parameters
rstrStrings class containing command line arguments

Member Function Documentation

◆ compare()

int ResrcCL::compare ( const char *  str,
const char *  name,
const char *  cmdln 
)
static

Checks to see if command line value matches resource name, abbreviation or shortcut.

Parameters
strString from command line
nameFull resource name (can match subset)
cmdlnCommand line shortcut

References WXP::StrLib::equal().

Referenced by WXP::ResrcDB::create().

◆ getKeyed()

int ResrcCL::getKeyed ( String name,
String value 
)

Gets a keyed (-key=value) parameter from command line

Return values
nameName of key
valueValue
Returns
1 if more parameters, 0 if done

References WXP::String::clear(), WXP::String::copy(), WXP::StrLib::equal(), WXP::Strings::getNum(), WXP::Strings::getString(), and WXP::StrLib::index().

Referenced by WXP::ResrcDB::create().

◆ getPosition()

int ResrcCL::getPosition ( String value)

Gets each positional parameter from the command line

Return values
valueThe positional value
Returns
The index of the positional value

References WXP::String::copy(), WXP::Strings::getNum(), and WXP::Strings::getString().

Referenced by WXP::ResrcDB::create().

◆ rewind()

int ResrcCL::rewind ( )

Rewind to first command line parameter

Referenced by WXP::ResrcDB::create().


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