Public Member Functions | Public Attributes | Private Attributes

cfg_CliFile Class Reference
[Parser for config files; validation]

#include <cli_arg.h>

Inheritance diagram for cfg_CliFile:
Inheritance graph
[legend]
Collaboration diagram for cfg_CliFile:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 cfg_CliFile (UInt32_t a_argc, _TCHAR *a_argv[])
virtual ~cfg_CliFile ()
virtual void HelpDump ()
 it it called at cc_HELP command each cli must implement its own method base HelpDump display common help

Public Attributes

vector< val_Element< string > > filenames
vector< val_Element< UInt32_t > > fileID
bool force
string path
string into
string history
string recall
string timeStamp
UInt64_t migID
string date
string inputFile
bool utf8
bool size
UInt64_t m_colId
string m_hostname
UInt32_t m_port
string m_pathPos

Private Attributes

 log_CLASSID_m

Detailed Description

Definition at line 409 of file cli_arg.h.


Constructor & Destructor Documentation

cfg_CliFile::cfg_CliFile ( UInt32_t  a_argc,
_TCHAR *  a_argv[] 
)

Definition at line 2420 of file cfg_cliarg.cpp.

References val_RuleVec::Add(), ap_ooForce, ap_ooSize, ap_ooUTF8, ap_paListOfFiles, ap_paPath, ap_pmColId, ap_pmHost, ap_pmPort, ap_poInputFile, ap_poListOfFileID, cfg_MAX_CLI_ARGLEN, cfg_MAX_COLID, cfg_MAX_FILEID, cfg_MAX_MIGID, cfg_MAX_PATHNAME, cfg_MAX_PORT, cfg_MIN_CLI_ARGLEN, cfg_MIN_COLID, cfg_MIN_FILEID, cfg_MIN_MIGID, cfg_MIN_PATHNAME, cfg_MIN_PORT, date, dbg_DETAIL, fileID, filenames, force, cfg_CliBase::FreeUTF8Argv(), cfg_CliBase::GetRules(), history, inputFile, into, cfg_CliBase::LocaleToUTF8Argv(), log_DBG_m, log_FUNC_m, m_colId, m_hostname, ap_Argument::m_long, m_pathPos, m_port, migID, ap_Argument::Parse(), path, recall, cfg_CliBase::Refresh(), size, timeStamp, and utf8.

    : cfg_CliBase(),
      force(false),
      utf8(false),
      size(false),
      m_colId(0),
      m_port(0) {

    log_FUNC_m(cfg_CliFile);

    pf_ValueList parsed;
    char** args = LocaleToUTF8Argv(a_argc, a_argv);
    ivdfile.Parse(a_argc, args, parsed);
    FreeUTF8Argv(a_argc, args);

    log_DBG_m(dbg_DETAIL,
        "Parsed options: " << endl <<  parsed );

    GetRules().Add(
        new val_Bool(
            ap_ooForce.m_long,val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
        this->force
    );

    GetRules().Add(
        new val_StrictStringList(
            ap_paListOfFiles.m_long, val_Limit(cfg_MIN_PATHNAME, cfg_MAX_PATHNAME)),
        this->filenames
    );

    GetRules().Add(
        new val_UInt32List(
            ap_poListOfFileID.m_long, val_Limit(cfg_MIN_FILEID, cfg_MAX_FILEID)),
        this->fileID
    );

    GetRules().Add(
        new val_Path(
            ap_poInputFile.m_long, val_Limit(0, cfg_MAX_PATHNAME)),
        this->inputFile
    );

    GetRules().Add(
        new val_Bool(
            ap_ooUTF8.m_long,val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
        this->utf8
    );

    GetRules().Add(
        new val_Bool(
            ap_ooSize.m_long,val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
        this->size
    );

    GetRules().Add(
        new val_StrictString(
            ap_patimeStamp.m_long, val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
        this->timeStamp
    );

    GetRules().Add(
        new val_StrictString(
            ap_potimeStamp.m_long, val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
        this->timeStamp
    );

    GetRules().Add(
        new val_StrictString(
            ap_opDate.m_long, val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
        this->date
    );

    GetRules().Add(
        new val_Integer(
            ap_opMigID.m_long, val_Limit(cfg_MIN_MIGID, cfg_MAX_MIGID)),
        this->migID
    );

    GetRules().Add(
        new val_StrictString(
            ap_paInto.m_long, val_Limit(cfg_MIN_PATHNAME, cfg_MAX_PATHNAME)),
        this->into
    );

    GetRules().Add(
        new val_StrictString(
            ap_paPath.m_long, val_Limit(cfg_MIN_PATHNAME, cfg_MAX_PATHNAME)),
        this->path
    );

    GetRules().Add(
        new val_StrictString(
            ap_gmGetInfo.m_long, val_Limit(cfg_MIN_PATHNAME, cfg_MAX_PATHNAME)),
        this->m_pathPos
    );

    GetRules().Add(
        new val_StrictString(
            ap_omPath.m_long, val_Limit(cfg_MIN_PATHNAME, cfg_MAX_PATHNAME)),
        this->path
    );

    GetRules().Add(
        new val_StrictString(
            ap_cmHistory.m_long, val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
        this->history
    );

    GetRules().Add(
        new val_StrictString(
            ap_cmRecall.m_long, val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
        this->recall
    );

    GetRules().Add(
        new val_Integer(
            ap_pmColId.m_long, val_Limit(cfg_MIN_COLID, cfg_MAX_COLID)),
        this->m_colId
    );

    GetRules().Add(
        new val_Integer(
            ap_pmPort.m_long, val_Limit(cfg_MIN_PORT, cfg_MAX_PORT)),
        this->m_port
    );

    GetRules().Add(
        new val_StrictString(
            ap_pmHost.m_long, val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
        this->m_hostname
    );

    // Validate and convert options
    Refresh(parsed);
}

Here is the call graph for this function:

virtual cfg_CliFile::~cfg_CliFile (  )  [inline, virtual]

Definition at line 413 of file cli_arg.h.

{};


Member Function Documentation

void cfg_CliFile::HelpDump (  )  [virtual]

it it called at cc_HELP command each cli must implement its own method base HelpDump display common help

Reimplemented from cfg_CliBase.

Definition at line 2556 of file cfg_cliarg.cpp.

                           {
    cout << ivdfile << endl;
    cout << endl << "Description of Data field in the history output." << endl;
    cout << "Part of file that is migrated:"  << endl;
    cout << "  H - header" << endl;
    cout << "  D - data" << endl;
    cout << "  M - meta data" << endl;
    cout << "  A - alternate data stream" << endl;
    cout << endl;
}


Member Data Documentation

Definition at line 428 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 419 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 418 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 421 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 424 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 429 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 423 of file cli_arg.h.

Referenced by cfg_CliFile().

Reimplemented from cfg_CliBase.

Definition at line 442 of file cli_arg.h.

Definition at line 433 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 434 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 437 of file cli_arg.h.

Referenced by cfg_CliFile().

Definition at line 435 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 427 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 422 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 425 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 431 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 426 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 430 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().


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