Public Member Functions | Public Attributes | Private Attributes

cfg_CliJob Class Reference
[Parser for config files; validation]

#include <cli_arg.h>

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

List of all members.

Public Member Functions

 cfg_CliJob (UInt32_t a_argc, char *a_argv[])
virtual ~cfg_CliJob ()
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 migration
bool recall
bool admin
bool recovery
bool maint
UInt64_t jobID
vector< val_Element< UInt64_t > > jobIds
string priorityEval
UInt32_t priority

Private Attributes

 log_CLASSID_m

Detailed Description

Definition at line 142 of file cli_arg.h.


Constructor & Destructor Documentation

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

Definition at line 1386 of file cfg_cliarg.cpp.

References val_RuleVec::Add(), admin, ap_ooJobTypeAdm, ap_ooJobTypeMaint, ap_ooJobTypeMig, ap_ooJobTypeRec, ap_ooJobTypeRecov, ap_paJobID, ap_paListOfJobID, ap_paNumber, cfg_MAX_CLI_ARGLEN, cfg_MAX_JOB_PRIORITY_MOD, cfg_MAX_JOBID, cfg_MIN_CLI_ARGLEN, cfg_MIN_JOB_PRIORITY_MOD, cfg_MIN_JOBID, dbg_DETAIL, cfg_CliBase::GetRules(), jobID, jobIds, log_DBG_m, log_FUNC_m, ap_Argument::m_long, maint, migration, ap_Argument::Parse(), priority, priorityEval, recall, recovery, and cfg_CliBase::Refresh().

    :
    cfg_CliBase(),
    migration(false),
    recall(false),
    admin(false),
    recovery(false),
    maint(false),
    priority(0)
 {

    log_FUNC_m(cfg_CliBase);

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

//    ap_IvdJobParser jobArgs(a_argc, (const char**) a_argv);
//   jobArgs.Parse();

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

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

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

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

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

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

    GetRules().Add(
        new val_Integer(
            ap_paJobID.m_long, val_Limit(cfg_MIN_JOBID, cfg_MAX_JOBID)),
        this->jobID
    );

    GetRules().Add(
        new val_UInt64List(
            ap_paListOfJobID.m_long, val_Limit(cfg_MIN_JOBID, cfg_MAX_JOBID)),
        this->jobIds
    );

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

    GetRules().Add(
        new val_Integer(
            ap_paNumber.m_long, val_Limit(cfg_MIN_JOB_PRIORITY_MOD, cfg_MAX_JOB_PRIORITY_MOD),0),
        this->priority
    );

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

Here is the call graph for this function:

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

Definition at line 145 of file cli_arg.h.

{};


Member Function Documentation

void cfg_CliJob::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 1468 of file cfg_cliarg.cpp.

                          {
    cout << ivdJob << endl;
}


Member Data Documentation

Definition at line 149 of file cli_arg.h.

Referenced by cfg_CliJob(), and main().

Definition at line 153 of file cli_arg.h.

Referenced by cfg_CliJob(), and main().

Definition at line 154 of file cli_arg.h.

Referenced by cfg_CliJob(), and main().

Reimplemented from cfg_CliBase.

Definition at line 162 of file cli_arg.h.

Definition at line 151 of file cli_arg.h.

Referenced by cfg_CliJob(), and main().

Definition at line 145 of file cli_arg.h.

Referenced by cfg_CliJob(), and main().

Definition at line 158 of file cli_arg.h.

Referenced by cfg_CliJob(), and main().

Definition at line 157 of file cli_arg.h.

Referenced by cfg_CliJob(), and main().

Definition at line 148 of file cli_arg.h.

Referenced by cfg_CliJob(), and main().

Definition at line 150 of file cli_arg.h.

Referenced by cfg_CliJob(), and main().


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