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.


Detailed Description

Definition at line 393 of file cli_arg.h.


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

Private Attributes

 log_CLASSID_m

Constructor & Destructor Documentation

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

Definition at line 2356 of file cfg_cliarg.cpp.

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

02357     : cfg_CliBase()
02358     , force(false)
02359     , utf8(false)
02360     , size(false)
02361  {
02362 
02363     log_FUNC_m(cfg_CliFile);
02364 
02365     pf_ValueList parsed;
02366     char** args = LocaleToUTF8Argv(a_argc, a_argv);
02367     ivdfile.Parse(a_argc, args, parsed);
02368     FreeUTF8Argv(a_argc, args);
02369 
02370     log_DBG_m(dbg_DETAIL,
02371         "Parsed options: " << endl <<  parsed );
02372 
02373     GetRules().Add(
02374         new val_Bool(
02375             ap_ooForce.m_long,val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
02376         this->force
02377     );
02378 
02379     GetRules().Add(
02380         new val_StrictStringList(
02381             ap_paListOfFiles.m_long, val_Limit(cfg_MIN_PATHNAME, cfg_MAX_PATHNAME)),
02382         this->filenames
02383     );
02384 
02385     GetRules().Add(
02386         new val_UInt32List(
02387             ap_poListOfFileID.m_long, val_Limit(cfg_MIN_FILEID, cfg_MAX_FILEID)),
02388         this->fileID
02389     );
02390 
02391     GetRules().Add(
02392         new val_Path(
02393             ap_poInputFile.m_long, val_Limit(0, cfg_MAX_PATHNAME)),
02394         this->inputFile
02395     );
02396 
02397     GetRules().Add(
02398         new val_Bool(
02399             ap_ooUTF8.m_long,val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
02400         this->utf8
02401     );
02402 
02403     GetRules().Add(
02404         new val_Bool(
02405             ap_ooSize.m_long,val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
02406         this->size
02407     );
02408 
02409     GetRules().Add(
02410         new val_StrictString(
02411             ap_patimeStamp.m_long, val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
02412         this->timeStamp
02413     );
02414 
02415     GetRules().Add(
02416         new val_StrictString(
02417             ap_potimeStamp.m_long, val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
02418         this->timeStamp
02419     );
02420 
02421     GetRules().Add(
02422         new val_StrictString(
02423             ap_opDate.m_long, val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
02424         this->date
02425     );
02426 
02427     GetRules().Add(
02428         new val_Integer(
02429             ap_opMigID.m_long, val_Limit(cfg_MIN_MIGID, cfg_MAX_MIGID)),
02430         this->migID
02431     );
02432 
02433     GetRules().Add(
02434         new val_StrictString(
02435             ap_paInto.m_long, val_Limit(cfg_MIN_PATHNAME, cfg_MAX_PATHNAME)),
02436         this->into
02437     );
02438 
02439     GetRules().Add(
02440         new val_StrictString(
02441             ap_paPath.m_long, val_Limit(cfg_MIN_PATHNAME, cfg_MAX_PATHNAME)),
02442         this->path
02443     );
02444 
02445     GetRules().Add(
02446         new val_StrictString(
02447             ap_cmHistory.m_long, val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
02448         this->history
02449     );
02450 
02451     GetRules().Add(
02452         new val_StrictString(
02453             ap_cmRecall.m_long, val_Limit(cfg_MIN_CLI_ARGLEN, cfg_MAX_CLI_ARGLEN)),
02454         this->recall
02455     );
02456 
02457     // Validate and convert options
02458     Refresh(parsed);
02459 }

Here is the call graph for this function:

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

Definition at line 397 of file cli_arg.h.

00397 {};


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

02461                            {
02462     cout << ivdfile << endl;
02463     cout << endl << "Description of Data field in the history output." << endl;
02464     cout << "Part of file that is migrated:"  << endl;
02465     cout << "  H - header" << endl;
02466     cout << "  D - data" << endl;
02467     cout << "  M - meta data" << endl;
02468     cout << "  A - alternate data stream" << endl;
02469     cout << endl;
02470 }


Member Data Documentation

Definition at line 402 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 403 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 405 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 406 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 407 of file cli_arg.h.

Referenced by cfg_CliFile().

Definition at line 408 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 409 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 410 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 411 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 412 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 413 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 414 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Definition at line 415 of file cli_arg.h.

Referenced by _tmain(), and cfg_CliFile().

Reimplemented from cfg_CliBase.

Definition at line 420 of file cli_arg.h.


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

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