This class creates the resource database from the resrouce 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 resrouce file, environment variables and command line parameters.
| int ResrcDB::create | ( | Strings & | args, | |
| ResrcDBList & | key, | |||
| ResrcDBList & | pos | |||
| ) | [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::StrLib::clear(), WXP::ResrcFile::close(), WXP::ResrcFile::compare(), WXP::ResrcCL::compare(), decodeProgramName(), WXP::ResrcDBItem::env, WXP::Wxp::exit(), WXP::ResrcDBList::get(), WXP::ResrcFile::get(), WXP::ResrcEnv::get(), WXP::String::get(), WXP::Strings::getChar(), WXP::ResrcCL::getKeyed(), WXP::Strings::getNum(), WXP::ResrcCL::getPosition(), WXP::Strings::getString(), WXP::StrLib::iequal(), WXP::ResrcFile::isOpen(), WXP::String::length(), WXP::ResrcDBList::next(), WXP::Wxp::NORUN, WXP::ResrcFile::open(), WXP::ResrcFile::parseName(), WXP::ResrcDBList::rewind(), WXP::ResrcCL::rewind(), WXP::Wxp::setDatabasePath(), WXP::Wxp::setMessage(), WXP::Wxp::setProgramName(), WXP::ResrcFile::setTag(), WXP::ResrcFile::valid(), and WXP::StrLib::valid().
| int ResrcDB::decodeProgramName | ( | const char * | string, | |
| String & | prog | |||
| ) | [static] |
Decodes the program name from command line parameters. It strips off path name, extension and drive designators. So C:.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().
| int ResrcDB::printHelp | ( | const char * | name, | |
| ResrcDBList & | key, | |||
| ResrcDBList & | pos | |||
| ) | [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().
1.6.1