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.


Detailed Description

Definition at line 194 of file cli_arg.h.


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 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

Constructor & Destructor Documentation

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

Definition at line 1520 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, ap_Argument::Parse(), path, pool, cfg_CliBase::Refresh(), sourceBarCode, targetBarCode, unreliable, unusable, volNumber, volNumbers, and volume.

01521     :
01522     cfg_CliBase(),
01523     pool(false),
01524     partition(false),
01525     force(false),
01526     init(false),
01527     volume(false),
01528     unreliable(false),
01529     unusable(false),
01530     good(false),
01531     best_effort(false),
01532     poolpart(" ")
01533 
01534  {
01535 
01536     log_FUNC_m(cfg_CliMedium);
01537 
01538     pf_ValueList parsed;
01539     ivdMedium.Parse(a_argc, a_argv, parsed);
01540 
01541     log_DBG_m(dbg_DETAIL,
01542         "Parsed options: " << endl <<  parsed );
01543 
01544     GetRules().Add(
01545         new val_Bool(
01546             ap_omPool.m_long,val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
01547         this->pool
01548     );
01549 
01550 // Anto: not used
01551 //     GetRules().Add(
01552 //         new val_Bool(
01553 //             ap_omPartition.m_long,val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
01554 //         this->partition
01555 //     );
01556 
01557     GetRules().Add(
01558         new val_Bool(
01559             ap_ooForce.m_long,val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
01560         this->force
01561     );
01562 
01563     GetRules().Add(
01564         new val_Bool(
01565             ap_ooInit.m_long,val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
01566         this->init
01567     );
01568 
01569     GetRules().Add(
01570         new val_Bool(
01571             ap_ooVolumeNums.m_long,val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
01572         this->volume
01573     );
01574 
01575 // Anto: not used
01576 //     GetRules().Add(
01577 //         new val_StrictString(
01578 //             ap_goPoolPart.m_long, val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
01579 //         this->poolpart
01580 //     );
01581 
01582     GetRules().Add(
01583         new val_StrictString(
01584             ap_paBarCode.m_long, val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
01585         this->barCode
01586     );
01587 
01588     GetRules().Add(
01589         new val_StrictString(
01590         ap_paSourceBarCode.m_long, val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
01591         this->sourceBarCode
01592     );
01593 
01594     GetRules().Add(
01595         new val_StrictString(
01596         ap_paTargetBarCode.m_long, val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
01597         this->targetBarCode
01598     );
01599 
01600 // Anto: not used
01601 //     GetRules().Add(
01602 //         new val_StrictStringList(
01603 //             ap_paListOfBarCode.m_long,
01604 //             val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
01605 //         this->barcodes
01606 //     );
01607 
01608     GetRules().Add(
01609         new val_UInt32List(
01610             ap_paListOfVolNum.m_long,
01611             val_Limit(cfg_MIN_VOLUME_NUM, cfg_MAX_VOLUME_NUM)),
01612         this->volNumbers
01613     );
01614 
01615     GetRules().Add(
01616         new val_Bool(
01617             ap_cmUnreliableMedium.m_long,
01618             val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
01619         this->unreliable
01620     );
01621 
01622     GetRules().Add(
01623         new val_Bool(
01624             ap_cmUnusableMedium.m_long,
01625             val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
01626         this->unusable
01627     );
01628 
01629     GetRules().Add(
01630         new val_Bool(
01631             ap_cmGoodMedium.m_long,val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
01632         this->good
01633     );
01634 
01635     GetRules().Add(
01636         new val_Bool(
01637             ap_ooBestEffortHidden.m_long,val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
01638         this->best_effort
01639     );
01640 
01641     GetRules().Add(
01642         new val_Integer(
01643             ap_paVolumeNumber.m_long,
01644             val_Limit(cfg_MIN_VOLUME_NUM, cfg_MAX_VOLUME_NUM)),
01645         this->volNumber
01646     );
01647 
01648     GetRules().Add(
01649         new val_StrictString(
01650             ap_ooInto.m_long, val_Limit(cfg_MIN_PATHNAME, cfg_MAX_PATHNAME)),
01651         this->into
01652     );
01653 
01654     GetRules().Add(
01655         new val_Path(
01656             ap_omPath.m_long, val_Limit(cfg_MIN_PATHNAME, cfg_MAX_CLI_ARGLEN)),
01657         this->path
01658     );
01659 
01660     // Validate and convert options
01661     Refresh(parsed);
01662 }

Here is the call graph for this function:

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

Definition at line 197 of file cli_arg.h.

00197 {};


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 1666 of file cfg_cliarg.cpp.

01666                              {
01667     cout << ivdMedium << endl;
01668 }


Member Data Documentation

Definition at line 197 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Definition at line 200 of file cli_arg.h.

Definition at line 201 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Definition at line 202 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Definition at line 203 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Definition at line 205 of file cli_arg.h.

Referenced by cfg_CliMedium().

Definition at line 206 of file cli_arg.h.

Referenced by cfg_CliMedium().

Definition at line 207 of file cli_arg.h.

Referenced by cfg_CliMedium().

Definition at line 209 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Definition at line 212 of file cli_arg.h.

Definition at line 213 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Definition at line 214 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 216 of file cli_arg.h.

Definition at line 217 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Definition at line 219 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Definition at line 221 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Definition at line 222 of file cli_arg.h.

Referenced by cfg_CliMedium(), and main().

Reimplemented from cfg_CliBase.

Definition at line 226 of file cli_arg.h.


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

Generated on Mon Feb 27 19:03:37 2012 for OPENARCHIVE by  doxygen 1.5.6