WXP C++ Library Version 6.74.9
|
This class creates the resource database from the resource file, environment variables and command line parameters. More...
#include "../include/ResrcDB.h"
Static Public Member Functions | |
static int | create (Strings &args, ResrcDBList &key, ResrcDBList &pos) |
static int | decodeProgramName (const char *string, String &prog) |
static int | printHelp (const char *name, ResrcDBList &key, ResrcDBList &pos) |
This class creates the resource database from the resource file, environment variables and command line parameters.
|
static |
Creates the resource database from command line arguments, environment variables and resource files.
args | Command line parameters |
key | DBList of keyed parameters |
pos | DBList of positional parameters |
References WXP::Resrc::BASE, WXP::StrLib::clear(), WXP::ResrcFile::close(), WXP::Resrc::COMMAND, WXP::ResrcFile::compare(), WXP::ResrcCL::compare(), decodeProgramName(), WXP::Resrc::ENV, WXP::ResrcDBItem::env, WXP::Wxp::exit(), WXP::Resrc::FILE, WXP::String::get(), WXP::ResrcDBList::get(), WXP::ResrcEnv::get(), WXP::ResrcFile::get(), WXP::Strings::getChar(), WXP::ResrcCL::getKeyed(), WXP::ResrcDBList::getNum(), WXP::Strings::getNum(), WXP::ResrcCL::getPosition(), WXP::Strings::getString(), WXP::StrLib::iequal(), WXP::Wxp::isDebug(), WXP::ResrcFile::isOpen(), WXP::String::length(), WXP::ResrcDBItem::name, WXP::ResrcDBList::next(), WXP::Wxp::NORUN, WXP::ResrcFile::open(), WXP::ResrcFile::parseName(), WXP::ResrcCL::rewind(), WXP::ResrcDBList::rewind(), WXP::Wxp::setDatabasePath(), WXP::Wxp::setMessageLevel(), WXP::Wxp::setProgramName(), WXP::ResrcFile::setTag(), WXP::License::valid(), WXP::StrLib::valid(), and WXP::ResrcFile::valid().
|
static |
Decodes the program name from command line parameters. It strips off path name, extension and drive designators. So C:\WXP\SFCWX.EXE becomes sfcwx.
string | Command name (from argv[0]) |
prog | Program name (no path) |
References WXP::String::copy(), WXP::String::get(), WXP::String::length(), WXP::String::lowCase(), and WXP::String::trunc().
Referenced by create().
|
static |
Prints help information to screen from resource database items
name | Program name |
key | Keyed resource parameters |
pos | Positional resource parameters |
References WXP::Wxp::getVersion(), WXP::ResrcDBItem::help, WXP::ResrcDBList::next(), WXP::Wxp::outMessage(), and WXP::ResrcDBList::rewind().
Referenced by WXP::Prog::printHelp().