Public Member Functions | Public Attributes | Private Attributes

cfg_Cli_fsc Class Reference
[Parser for config files; validation]

#include <cli_arg.h>

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

List of all members.

Public Member Functions

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

Public Attributes

string path
string shRelFile
bool shVector
bool shData
bool openDB
string fscPosition
vector< val_Element< UInt32_t > > fileID
cmn_Path outputFile
UInt32_t mediumKey
UInt32_t mediumVol
bool winPathSeparator
bool detailed

Private Attributes

 log_CLASSID_m

Detailed Description

Definition at line 300 of file cli_arg.h.


Constructor & Destructor Documentation

cfg_Cli_fsc::cfg_Cli_fsc ( UInt32_t  a_argc,
char *  a_argv[] 
)

Definition at line 1866 of file cfg_cliarg.cpp.

References val_RuleVec::Add(), ap_ooData, ap_ooVector, ap_paFileName, ap_paMediumKey, ap_paVolumeNumber, ap_poListOfFileID, cfg_MAX_CLI_ARGLEN, cfg_MAX_FILEID, cfg_MAX_JOB_PRIORITY_MOD, cfg_MAX_MEDIUM_KEY, cfg_MAX_PATHNAME, cfg_MAX_VOLUME_NUM, cfg_MIN_CLI_ARGLEN, cfg_MIN_JOB_PRIORITY_MOD, cfg_MIN_MEDIUM_KEY, cfg_MIN_PATHNAME, cfg_MIN_VOLUME_NUM, dbg_DETAIL, fileID, fscPosition, cfg_CliBase::GetRules(), log_DBG_m, log_FUNC_m, ap_Argument::m_long, mediumKey, mediumVol, openDB, outputFile, ap_Argument::Parse(), path, cfg_CliBase::Refresh(), shData, shRelFile, shVector, and winPathSeparator.

    :
    cfg_CliBase(),
    shRelFile(" "),
    shVector(false),
    shData(false),
    openDB(false),
    mediumKey(0),
    mediumVol(0),
    winPathSeparator(false) {

    log_FUNC_m(cfg_Cli_fsc);
    string uselessvar; // used just for adding rule

    pf_ValueList parsed;
    ivd_fsc.Parse(a_argc, a_argv, parsed);

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

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

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

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

     GetRules().Add(
        new val_StrictString(
            ap_goRelFile.m_long, val_Limit(cfg_MIN_JOB_PRIORITY_MOD, cfg_MAX_JOB_PRIORITY_MOD)),
        this->shRelFile
    );

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

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

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

    GetRules().Add(
        new val_Integer(
            ap_paMediumKey.m_long, val_Limit(cfg_MIN_MEDIUM_KEY, cfg_MAX_MEDIUM_KEY)),
        this->mediumKey
    );

    GetRules().Add(
        new val_StrictString(
            ap_ooVolumeNum.m_long, val_Limit(cfg_MIN_VOLUME_NUM, cfg_MAX_VOLUME_NUM)),
        uselessvar
    );

    GetRules().Add(
        new val_Integer(
            ap_paVolumeNumber.m_long, val_Limit(cfg_MIN_VOLUME_NUM, cfg_MAX_VOLUME_NUM), 1, 1, "0"),
        this->mediumVol
        );

    GetRules().Add(
        new val_StrictString(
            ap_opOutputFileName.m_long, val_Limit(cfg_MIN_PATHNAME, cfg_MAX_PATHNAME)),
            uselessvar
        );

    GetRules().Add(
        new val_Path(
            ap_paFileName.m_long, val_Limit(cfg_MIN_PATHNAME, cfg_MAX_PATHNAME)),
            this->outputFile
        );

    GetRules().Add(
        new val_Bool(
            ap_ooSeparator.m_long, val_Limit(cfg_MIN_PATHNAME, cfg_MAX_PATHNAME)),
            this->winPathSeparator
        );

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

Here is the call graph for this function:

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

Definition at line 303 of file cli_arg.h.

{};


Member Function Documentation

void cfg_Cli_fsc::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 1969 of file cfg_cliarg.cpp.

                           {
    cout << ivd_fsc << endl;
    cout << endl << "Option description:" << endl;
    cout << "   -p  show permanent database information header" << endl;
    cout << "   -j  dump of journal files" << endl;
    cout << "       -L show changes in data location rel. file" << endl;
    cout << "       -G show changes in generation rel. file" << endl;
    cout << "       -C show changes in copy rel. file" << endl;
    cout << "       -S show changes in split rel. file" << endl;
    cout << "       -V information about released and used vectors" << endl;
    cout << "       -D hexdump of written data" << endl;

    cout << "   <fileID...>  For each fileId displays file's FSC information." << endl;
    cout << "When only partition name is specified then interactive mode gets off." << endl;
    cout << "       -O Open DB to reply transactions by reading journal." << endl;
    cout << endl;

    cout
        << "Medium dump status flags: " << endl
        << "  dir: this entry is a directory" << endl
        << "  deleted: file was already deleted on the file system (not necessarily in this generation)" << endl
        << "  last: last generation of this file/directory" << endl
        << "  no-NSC: the file/directory doesn't have its name stored in the NSC" << endl << endl;

    cout
        << "Medium dump data type flags" << endl
        << "  H: header" << endl
        << "  D: data" << endl
        << "  A: alternate data stream" << endl
        << "  M: meta data stream" << endl;
}


Member Data Documentation

Definition at line 322 of file cli_arg.h.

Definition at line 315 of file cli_arg.h.

Referenced by cfg_Cli_fsc(), and main().

Definition at line 313 of file cli_arg.h.

Referenced by cfg_Cli_fsc(), and main().

Reimplemented from cfg_CliBase.

Definition at line 325 of file cli_arg.h.

Definition at line 319 of file cli_arg.h.

Referenced by cfg_Cli_fsc(), and main().

Definition at line 320 of file cli_arg.h.

Referenced by cfg_Cli_fsc(), and main().

Definition at line 311 of file cli_arg.h.

Referenced by cfg_Cli_fsc(), and main().

Definition at line 318 of file cli_arg.h.

Referenced by cfg_Cli_fsc(), and main().

Definition at line 307 of file cli_arg.h.

Referenced by cfg_Cli_fsc(), and main().

Definition at line 310 of file cli_arg.h.

Referenced by cfg_Cli_fsc(), and main().

Definition at line 308 of file cli_arg.h.

Referenced by cfg_Cli_fsc(), and main().

Definition at line 309 of file cli_arg.h.

Referenced by cfg_Cli_fsc(), and main().

Definition at line 321 of file cli_arg.h.

Referenced by cfg_Cli_fsc(), and main().


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