Public Member Functions | Public Attributes | Private Attributes

cfg_CliMedium Class Reference
[Parser for config files; validation]

#include <cli_arg.h>

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

List of all members.

Public Member Functions

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

Public Attributes

bool pool
bool partition
bool force
bool init
bool volume
bool unreliable
bool unusable
bool good
bool offline
bool online
bool best_effort
string poolpart
string barCode
string sourceBarCode
string targetBarCode
vector< val_Element< string > > barcodes
vector< val_Element< UInt32_t > > volNumbers
UInt32_t volNumber
string into
string path

Private Attributes

 log_CLASSID_m

Detailed Description

Definition at line 208 of file cli_arg.h.


Constructor & Destructor Documentation

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

Definition at line 1574 of file cfg_cliarg.cpp.

References val_RuleVec::Add(), ap_ooForce, ap_ooInit, ap_paBarCode, ap_paListOfVolNum, ap_paSourceBarCode, ap_paTargetBarCode, ap_paVolumeNumber, barCode, best_effort, cfg_MAX_CLI_ARGLEN, cfg_MAX_PATHNAME, cfg_MAX_VOLUME_NUM, cfg_MIN_CLI_ARGLEN, cfg_MIN_PATHNAME, cfg_MIN_VOLUME_NUM, dbg_DETAIL, force, cfg_CliBase::GetRules(), good, init, into, log_DBG_m, log_FUNC_m, ap_Argument::m_long, offline, online, ap_Argument::Parse(), path, pool, cfg_CliBase::Refresh(), sourceBarCode, targetBarCode, unreliable, unusable, volNumber, volNumbers, and volume.

    :
    cfg_CliBase(),
    pool(false),
    partition(false),
    force(false),
    init(false),
    volume(false),
    unreliable(false),
    unusable(false),
    good(false),
    offline(false),
    online(false),
    best_effort(false),
    poolpart(" ") {

    log_FUNC_m(cfg_CliMedium);

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

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

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

// Anto: not used
//     GetRules().Add(
//         new val_Bool(
//             ap_omPartition.m_long,val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
//         this->partition
//     );

    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_Bool(
            ap_ooInit.m_long,val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
        this->init
    );

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

// Anto: not used
//     GetRules().Add(
//         new val_StrictString(
//             ap_goPoolPart.m_long, val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
//         this->poolpart
//     );

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

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

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

// Anto: not used
//     GetRules().Add(
//         new val_StrictStringList(
//             ap_paListOfBarCode.m_long,
//             val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
//         this->barcodes
//     );

    GetRules().Add(
        new val_UInt32List(
            ap_paListOfVolNum.m_long,
            val_Limit(cfg_MIN_VOLUME_NUM, cfg_MAX_VOLUME_NUM)),
        this->volNumbers
    );

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

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

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

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

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

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

    GetRules().Add(
        new val_Integer(
            ap_paVolumeNumber.m_long,
            val_Limit(cfg_MIN_VOLUME_NUM, cfg_MAX_VOLUME_NUM)),
        this->volNumber
    );

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

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

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

Here is the call graph for this function:

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

Definition at line 211 of file cli_arg.h.

{};


Member Function Documentation

void cfg_CliMedium::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 1732 of file cfg_cliarg.cpp.

                             {
    cout << ivdMedium << endl;
}


Member Data Documentation

Definition at line 229 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Definition at line 232 of file cli_arg.h.

Definition at line 225 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Definition at line 215 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Definition at line 221 of file cli_arg.h.

Referenced by cfg_CliMedium().

Definition at line 216 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Definition at line 237 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Reimplemented from cfg_CliBase.

Definition at line 242 of file cli_arg.h.

Definition at line 222 of file cli_arg.h.

Referenced by cfg_CliMedium().

Definition at line 223 of file cli_arg.h.

Referenced by cfg_CliMedium().

Definition at line 214 of file cli_arg.h.

Definition at line 238 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Definition at line 211 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Definition at line 228 of file cli_arg.h.

Definition at line 230 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Definition at line 231 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Definition at line 219 of file cli_arg.h.

Referenced by cfg_CliMedium().

Definition at line 220 of file cli_arg.h.

Referenced by cfg_CliMedium().

Definition at line 235 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Definition at line 233 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Definition at line 217 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().


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