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

This class sets up some static classes used by WXP programs. More...

#include "../include/Prog.h"

Static Public Member Functions

static int readResrcFile (const char *prog, const char *name, const char *tag, const char *file)
 
static int readResrcFile (const char *prog, const char *file)
 
static int readResrcFile (const char *prog)
 
static int readResrcFile ()
 
static int printProg (int level, const char *string)
 
static int printProg (const char *string)
 
static int printHelp (ResrcDBList &res_key, ResrcDBList &res_pos, const char *descript)
 
static int setCommand (const char *string)
 
static int prompt (const char *prompt, char *str, int len)
 
static int prompt (const char *prompt, String &str)
 
static String prompt (const char *prompt)
 

Detailed Description

This class sets up some static classes used by WXP programs.

Author
Dan Vietor

Member Function Documentation

◆ printHelp()

int Prog::printHelp ( ResrcDBList res_key,
ResrcDBList res_pos,
const char *  descript 
)
static

Prints syntax and help on command line parameters.

Parameters
res_keyThe keyed resources
res_posThe positional resources
descriptA brief program description

References WXP::Wxp::outMessage(), and WXP::ResrcDB::printHelp().

◆ printProg() [1/2]

int Prog::printProg ( const char *  string)
static

Prints program title tag with WXP version number. Used by WXP programs. Print level is Wxp::MESS.

Parameters
levelPrint level (WXP::OUT2, WXP::PRINT, etc)
stringProgram name

References printProg().

◆ printProg() [2/2]

int Prog::printProg ( int  level,
const char *  string 
)
static

Prints program title tag with WXP version number. Used by WXP programs

Parameters
levelPrint level (Wxp::OUT2, Wxp::PRINT, etc)
stringProgram name

References WXP::Wxp::getVersion(), and WXP::Wxp::outMessage().

Referenced by printProg().

◆ prompt() [1/3]

String Prog::prompt ( const char *  promptstr)
static

Prompts the user for data

Parameters
promptstrPrompt string
Returns
String to save data into

References prompt(), and WXP::String::set().

◆ prompt() [2/3]

int Prog::prompt ( const char *  promptstr,
char *  str,
int  len 
)
static

Prompts the user for data

Parameters
promptstrPrompt string
strString to save data into
lenThe length of the string

References setCommand(), and WXP::StrLib::trimWS().

Referenced by prompt(), WXP::Menu::prompt(), and prompt().

◆ prompt() [3/3]

int Prog::prompt ( const char *  promptstr,
String str 
)
static

Prompts the user for data

Parameters
promptstrPrompt string
strString to save data into

References prompt(), and WXP::String::set().

◆ readResrcFile() [1/4]

int Prog::readResrcFile ( )
static

A simple resource file reader. Uses the default resource file name.

References readResrcFile().

Referenced by readResrcFile(), readResrcFile(), and readResrcFile().

◆ readResrcFile() [2/4]

int Prog::readResrcFile ( const char *  prog)
static

A simple resource file reader. Uses the default resource file name.

Parameters
progProgram name

References readResrcFile().

◆ readResrcFile() [3/4]

int Prog::readResrcFile ( const char *  prog,
const char *  file 
)
static

A simple resource file reader

Parameters
progProgram name
fileFilename or directory of where resource file is located

References readResrcFile().

◆ readResrcFile() [4/4]

int Prog::readResrcFile ( const char *  prog,
const char *  name,
const char *  tag,
const char *  file 
)
static

◆ setCommand()

int Prog::setCommand ( const char *  string)
static

Parses a prompted command

Parameters
stringThe command string
Deprecated:

References WXP::StrLib::equal(), WXP::Wxp::exit(), and WXP::Wxp::NOERR.

Referenced by prompt().


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