Main Page ? Class Hierarchy ? Compound List ? File List ? Compound Members ? File Members ?

CommandParser Class Reference

#include

Collaboration diagram for CommandParser:

[legend]
List of all members.

Public Types

typedef cmt_map< ActionType,
cmt_string >?
HelpMap
typedef cmt_vector< cmt_string >? HelpTexts

Static Public Methods

HelpMap &? get_help ()
HelpTexts &? get_help_texts ()
const cmt_string &? get_help_text (ActionType key)
void? show_all ()
void? show (ActionType action)

Private Methods

? CommandParser ()

Static Private Methods

CommandParser &? instance ()

Private Attributes

HelpMap? m_help
HelpTexts? m_help_texts

Member Typedef Documentation

typedef cmt_mapcmt_string> CommandParser::HelpMap
?

Definition at line 93 of file cmt_syntax.h.

typedef cmt_vector<cmt_string> CommandParser::HelpTexts
?

Definition at line 94 of file cmt_syntax.h.


Constructor & Destructor Documentation

CommandParser::CommandParser (? ? )? [private]
?

Definition at line 1620 of file cmt_syntax.cxx.

References action_awk, action_broadcast, action_build, action_build_CMT_pacman, action_build_constituent_makefile, action_build_constituents_makefile, action_build_dependencies, action_build_library_links, action_build_make_setup, action_build_msdev, action_build_os9_makefile, action_build_prototype, action_build_readme, action_build_tag_makefile, action_build_temporary_name, action_build_triggers, action_build_vsnet, action_build_windefs, action_check_configuration, action_check_files, action_check_version, action_checkout, action_cleanup, action_config, action_create, action_create_project, action_cvsbranches, action_cvssubpackages, action_cvstags, action_do, action_expand_model, action_filter, action_help, action_load, action_lock, action_none, action_remove, action_remove_library_links, action_run, action_run_sequence, action_set_version, action_set_versions, action_setup, action_show, action_show_action, action_show_action_names, action_show_action_value, action_show_actions, action_show_all_tags, action_show_applied_patterns, action_show_author, action_show_branches, action_show_clients, action_show_cmtpath_patterns, action_show_constituent, action_show_constituent_names, action_show_constituents, action_show_cycles, action_show_fragment, action_show_fragments, action_show_groups, action_show_include_dirs, action_show_language, action_show_languages, action_show_macro, action_show_macro_names, action_show_macro_value, action_show_macros, action_show_manager, action_show_packages, action_show_path, action_show_pattern, action_show_pattern_names, action_show_patterns, action_show_projects, action_show_pwd, action_show_set, action_show_set_names, action_show_set_value, action_show_sets, action_show_setup, action_show_strategies, action_show_tags, action_show_use_paths, action_show_uses, action_show_version, action_show_versions, action_system, action_unlock, action_version, cmt_map< ActionType, cmt_string >::add(), cmt_vector< cmt_string >::add(), cmt_vector< cmt_string >::clear(), m_help, and m_help_texts.

01621 {
01622   static HelpMap& help = m_help;
01623 
01624   static HelpTexts& help_texts = m_help_texts;
01625 
01626   help_texts.clear ();
01627 
01628   help_texts.add () =  "none";
01629   help_texts.add () =  "awk";
01630   help_texts.add () =  "broadcast [-select=list] [-exclude=list] [-local] [-global] [-begin=pattern] [-depth=n]  : apply a command to [some of] the used packages";
01631   help_texts.add () =  "build ;
01632   help_texts.add () =  "build constituent_makefile   : generate constituent Makefile fragment";
01633   help_texts.add () =  "build constituents_makefile : generate constituents.make";
01634   help_texts.add () =  "build dependencies      : generate dependencies";
01635   help_texts.add () =  "build library_links     : build symbolic links towards all imported libraries";
01636   help_texts.add () =  "build make_setup        : build a compiled version of setup scripts";
01637   help_texts.add () =  "build msdev             : generate MSDEV files";
01638   help_texts.add () =  "build CMT_pacman        : generate PACMAN manifest file for CMT";
01639   help_texts.add () =  "build vsnet             : generate VS.NET files";
01640   help_texts.add () =  "build os9_makefile      : generate Makefile for OS9";
01641   help_texts.add () =  "build prototype         : generate prototype file";
01642   help_texts.add () =  "build readme            : generate README.html";
01643   help_texts.add () =  "build tag_makefile      : generate tag specific Makefile";
01644   help_texts.add () =  "build temporary_name    : generate a name for a temprary file";
01645   help_texts.add () =  "build triggers  : generate library trigger file";
01646   help_texts.add () =  "build windefs  : generate def file for Windows shared libraries";
01647   help_texts.add () =  "check ;
01648   help_texts.add () =  "check configuration     : check configuration";
01649   help_texts.add () =  "check files   : compare two files and overrides  by  if different";
01650   help_texts.add () =  "check version     : check if a name follows a version tag syntax ";
01651   help_texts.add () =  "co | checkout           : perform a cvs checkout over a CMT package";
01652   help_texts.add () =  "cleanup [-csh|-sh|-bat] : generate a cleanup script";
01653   help_texts.add () =  "config                  : generate setup and cleanup scripts";
01654   help_texts.add () =  "create   [] : create and configure a new package";
01655   help_texts.add () =  "create_project   : create and configure a new project";
01656   help_texts.add () =  "cvsbranches       : display the subdirectories for a module";
01657   help_texts.add () =  "cvssubpackagess   : display the subpackages for a module";
01658   help_texts.add () =  "cvstags           : display the CVS tags for a module";
01659   help_texts.add () =  "do  [=] ... : Execute an action";
01660   help_texts.add () =  "expand model     : ";
01661   help_texts.add () =  "filter         : filter a file against CMT macros and env. variables";
01662   help_texts.add () =  "help | -help | --help   : display this help";
01663   help_texts.add () =  "load";
01664   help_texts.add () =  "lock [

[]] : lock a package"

; 01665 help_texts.add () = "remove [] : remove a package version"; 01666 help_texts.add () = "remove library_links : remove symbolic links towards all imported libraries"; 01667 help_texts.add () = "run '' : apply a command"; 01668 help_texts.add () = "run_sequence : execute a cmt equence file"; 01669 help_texts.add () = "set version : generate a version file in the current package"; 01670 help_texts.add () = "set versions : generate version files into packages"; 01671 help_texts.add () = "setup [-csh|-sh|-bat] : generate a setup script"; 01672 help_texts.add () = "show ; 01673 help_texts.add () = "show action : a formatted action definition"; 01674 help_texts.add () = "show action_value : a raw action definition"; 01675 help_texts.add () = "show action_names : all action names"; 01676 help_texts.add () = "show actions : all action definitions"; 01677 help_texts.add () = "show all_tags : all defined tags"; 01678 help_texts.add () = "show applied_patterns : all patterns actually applied"; 01679 help_texts.add () = "show author : package author"; 01680 help_texts.add () = "show branches : added branches"; 01681 help_texts.add () = "show clients : package clients"; 01682 help_texts.add () = "show cmtpath_patterns : cmtpath_patterns"; 01683 help_texts.add () = "show constituent : constituent definition"; 01684 help_texts.add () = "show constituent_names : constituent names"; 01685 help_texts.add () = "show constituents : constituent definitions"; 01686 help_texts.add () = "show cycles : cycles in the use graph"; 01687 help_texts.add () = "show fragment : one fragment definition"; 01688 help_texts.add () = "show fragments : fragment definitions"; 01689 help_texts.add () = "show groups : group definitions"; 01690 help_texts.add () = "show include_dirs : "; 01691 help_texts.add () = "show language : language definition"; 01692 help_texts.add () = "show languages : language definitions"; 01693 help_texts.add () = "show macro : a formatted macro definition"; 01694 help_texts.add () = "show macro_value : a raw macro definition"; 01695 help_texts.add () = "show macro_names : all macro names"; 01696 help_texts.add () = "show macros : all macro definitions"; 01697 help_texts.add () = "show manager : package manager"; 01698 help_texts.add () = "show packages : packages reachable from the current context"; 01699 help_texts.add () = "show path : the package search list"; 01700 help_texts.add () = "show pattern : the pattern definition and usages"; 01701 help_texts.add () = "show pattern_names : pattern names"; 01702 help_texts.add () = "show patterns : the pattern definitions"; 01703 help_texts.add () = "show projects : project definitions"; 01704 help_texts.add () = "show setup : setup definitions"; 01705 help_texts.add () = "show pwd : filtered current directory"; 01706 help_texts.add () = "show set : a formatted set definition"; 01707 help_texts.add () = "show set_names : set names"; 01708 help_texts.add () = "show set_value : a raw set definition"; 01709 help_texts.add () = "show sets : set definitions"; 01710 help_texts.add () = "show strategies : all strategies (build & version)"; 01711 help_texts.add () = "show tags : all currently active tags"; 01712 help_texts.add () = "show use_paths : all paths to the used package"; 01713 help_texts.add () = "show uses : used packages"; 01714 help_texts.add () = "show version : version of the current package"; 01715 help_texts.add () = "show versions : visible versions of the selected package"; 01716 help_texts.add () = "system : display the system tag"; 01717 help_texts.add () = "unlock [

[]] : unlock a package"

; 01718 help_texts.add () = "version : version of CMT"; 01719 help_texts.add () = ""; 01720 01721 //"build : build various components :" 01722 //"show : display various infos on :" 01723 01724 help.add (action_none, help_texts[action_none]); 01725 help.add (action_awk, help_texts[action_awk]); 01726 help.add (action_broadcast, help_texts[action_broadcast]); 01727 help.add (action_build, help_texts[action_build]); 01728 help.add (action_build_constituent_makefile, help_texts[action_build_constituent_makefile]); 01729 help.add (action_build_constituents_makefile, help_texts[action_build_constituents_makefile]); 01730 help.add (action_build_dependencies, help_texts[action_build_dependencies]); 01731 help.add (action_build_library_links, help_texts[action_build_library_links]); 01732 help.add (action_build_make_setup, help_texts[action_build_make_setup]); 01733 help.add (action_build_msdev, help_texts[action_build_msdev]); 01734 help.add (action_build_CMT_pacman, help_texts[action_build_CMT_pacman]); 01735 help.add (action_build_vsnet, help_texts[action_build_vsnet]); 01736 help.add (action_build_os9_makefile, help_texts[action_build_os9_makefile]); 01737 help.add (action_build_prototype, help_texts[action_build_prototype]); 01738 help.add (action_build_readme, help_texts[action_build_readme]); 01739 help.add (action_build_tag_makefile, help_texts[action_build_tag_makefile]); 01740 help.add (action_build_temporary_name, help_texts[action_build_temporary_name]); 01741 help.add (action_build_triggers, help_texts[action_build_triggers]); 01742 help.add (action_build_windefs, help_texts[action_build_windefs]); 01743 help.add (action_check_configuration, help_texts[action_check_configuration]); 01744 help.add (action_check_files, help_texts[action_check_files]); 01745 help.add (action_check_version, help_texts[action_check_version]); 01746 help.add (action_checkout, help_texts[action_checkout]); 01747 help.add (action_cleanup, help_texts[action_cleanup]); 01748 help.add (action_config, help_texts[action_config]); 01749 help.add (action_create, help_texts[action_create]); 01750 help.add (action_create_project, help_texts[action_create_project]); 01751 help.add (action_cvsbranches, help_texts[action_cvsbranches]); 01752 help.add (action_cvssubpackages, help_texts[action_cvssubpackages]); 01753 help.add (action_cvstags, help_texts[action_cvstags]); 01754 help.add (action_do, help_texts[action_do]); 01755 help.add (action_expand_model, help_texts[action_expand_model]); 01756 help.add (action_filter, help_texts[action_filter]); 01757 help.add (action_help, help_texts[action_help]); 01758 help.add (action_load, help_texts[action_load]); 01759 help.add (action_lock, help_texts[action_lock]); 01760 help.add (action_remove, help_texts[action_remove]); 01761 help.add (action_remove_library_links, help_texts[action_remove_library_links]); 01762 help.add (action_run, help_texts[action_run]); 01763 help.add (action_run_sequence, help_texts[action_run_sequence]); 01764 help.add (action_set_version, help_texts[action_set_version]); 01765 help.add (action_set_versions, help_texts[action_set_versions]); 01766 help.add (action_setup, help_texts[action_setup]); 01767 help.add (action_show, help_texts[action_show]); 01768 help.add (action_show_action, help_texts[action_show_action]); 01769 help.add (action_show_action_value, help_texts[action_show_action_value]); 01770 help.add (action_show_action_names, help_texts[action_show_action_names]); 01771 help.add (action_show_actions, help_texts[action_show_actions]); 01772 help.add (action_show_all_tags, help_texts[action_show_all_tags]); 01773 help.add (action_show_applied_patterns, help_texts[action_show_applied_patterns]); 01774 help.add (action_show_author, help_texts[action_show_author]); 01775 help.add (action_show_branches, help_texts[action_show_branches]); 01776 help.add (action_show_clients, help_texts[action_show_clients]); 01777 help.add (action_show_cmtpath_patterns, help_texts[action_show_cmtpath_patterns]); 01778 help.add (action_show_constituent, help_texts[action_show_constituent]); 01779 help.add (action_show_constituent_names, help_texts[action_show_constituent_names]); 01780 help.add (action_show_constituents, help_texts[action_show_constituents]); 01781 help.add (action_show_cycles, help_texts[action_show_cycles]); 01782 help.add (action_show_fragment, help_texts[action_show_fragment]); 01783 help.add (action_show_fragments, help_texts[action_show_fragments]); 01784 help.add (action_show_groups, help_texts[action_show_groups]); 01785 help.add (action_show_include_dirs, help_texts[action_show_include_dirs]); 01786 help.add (action_show_language, help_texts[action_show_language]); 01787 help.add (action_show_languages, help_texts[action_show_languages]); 01788 help.add (action_show_macro, help_texts[action_show_macro]); 01789 help.add (action_show_macro_value, help_texts[action_show_macro_value]); 01790 help.add (action_show_macro_names, help_texts[action_show_macro_names]); 01791 help.add (action_show_macros, help_texts[action_show_macros]); 01792 help.add (action_show_manager, help_texts[action_show_manager]); 01793 help.add (action_show_packages, help_texts[action_show_packages]); 01794 help.add (action_show_path, help_texts[action_show_path]); 01795 help.add (action_show_pattern, help_texts[action_show_pattern]); 01796 help.add (action_show_pattern_names, help_texts[action_show_pattern_names]); 01797 help.add (action_show_patterns, help_texts[action_show_patterns]); 01798 help.add (action_show_projects, help_texts[action_show_projects]); 01799 help.add (action_show_setup, help_texts[action_show_setup]); 01800 help.add (action_show_pwd, help_texts[action_show_pwd]); 01801 help.add (action_show_set, help_texts[action_show_set]); 01802 help.add (action_show_set_names, help_texts[action_show_set_names]); 01803 help.add (action_show_set_value, help_texts[action_show_set_value]); 01804 help.add (action_show_sets, help_texts[action_show_sets]); 01805 help.add (action_show_strategies, help_texts[action_show_strategies]); 01806 help.add (action_show_tags, help_texts[action_show_tags]); 01807 help.add (action_show_use_paths, help_texts[action_show_use_paths]); 01808 help.add (action_show_uses, help_texts[action_show_uses]); 01809 help.add (action_show_version, help_texts[action_show_version]); 01810 help.add (action_show_versions, help_texts[action_show_versions]); 01811 help.add (action_system, help_texts[action_system]); 01812 help.add (action_unlock, help_texts[action_unlock]); 01813 help.add (action_version, help_texts[action_version]); 01814 }

Member Function Documentation

CommandParser::HelpMap & CommandParser::get_help (? ? )? [static]
?

Definition at line 1517 of file cmt_syntax.cxx.

References instance(), and m_help.

01518 {
01519   static CommandParser& me = instance ();
01520 
01521   return (me.m_help);
01522 }

const cmt_string & CommandParser::get_help_text (? ActionType? ? key )? [static]
?

Definition at line 1531 of file cmt_syntax.cxx.

References ActionType, and get_help_texts().

Referenced by show().

01532 {
01533   static const HelpTexts& help = get_help_texts ();
01534 
01535   const cmt_string& h = help[key];
01536   return (h);
01537 }

CommandParser::HelpTexts & CommandParser::get_help_texts (? ? )? [static]
?

Definition at line 1524 of file cmt_syntax.cxx.

References instance(), and m_help_texts.

Referenced by get_help_text(), show(), and show_all().

01525 {
01526   static CommandParser& me = instance ();
01527 
01528   return (me.m_help_texts);
01529 }

CommandParser & CommandParser::instance (? ? )? [static, private]
?

Definition at line 1614 of file cmt_syntax.cxx.

Referenced by get_help(), and get_help_texts().

01615 {
01616   static CommandParser me;
01617   return (me);
01618 }

void CommandParser::show (? ActionType? ? action )? [static]
?

Definition at line 1573 of file cmt_syntax.cxx.

References action_build, action_build_constituent_makefile, action_build_windefs, action_check, action_check_configuration, action_check_version, action_show, action_show_versions, ActionType, get_help_text(), and get_help_texts().

Referenced by Cmt::do_help().

01574 {
01575   static HelpTexts& help_texts = get_help_texts ();
01576 
01577   if (action == action_build)
01578     {
01579       int i;
01580 
01581       for (i = action_build_constituent_makefile; i <= action_build_windefs; i++)
01582         {
01583           const cmt_string& s = help_texts[i];
01584           cerr << "#   " << s << endl;
01585         }
01586     }
01587   if (action == action_check)
01588     {
01589       int i;
01590 
01591       for (i = action_check_configuration; i <= action_check_version; i++)
01592         {
01593           const cmt_string& s = help_texts[i];
01594           cerr << "#   " << s << endl;
01595         }
01596     }
01597   else if (action == action_show)
01598     {
01599       int i;
01600 
01601       for (i = (action_show + 1); i <= action_show_versions; i++)
01602         {
01603           const cmt_string& s = help_texts[i];
01604           cerr << "#   " << s << endl;
01605         }
01606     }
01607   else
01608     {
01609       const cmt_string& s = get_help_text (action);
01610       cerr << "#" << s << endl;
01611     }
01612 }

void CommandParser::show_all (? ? )? [static]
?

Definition at line 1539 of file cmt_syntax.cxx.

References get_help_texts().

Referenced by Cmt::do_help().

01540 {
01541   static HelpTexts& help_texts = get_help_texts ();
01542 
01543   cerr << "#> cmt command [option...]" << endl;
01544   cerr << "# command :" << endl;
01545 
01546   int i;
01547 
01548   for (i = 0; ; i++)
01549     {
01550       const cmt_string& s = help_texts[i];
01551       if (s == "") break;
01552       cerr << "#   " << s << endl;
01553     }
01554 
01555   cerr << "# global options :" << endl;
01556 
01557   cerr << "#   -quiet                  : don't print errors" << endl;
01558   cerr << "#   -use=

:: : set package version path"

<< endl; 01559 cerr << "# -pack= : set package" << endl; 01560 cerr << "# -version= : set version" << endl; 01561 cerr << "# -path= : set root path" << endl; 01562 cerr << "# -f= : set input file" << endl; 01563 cerr << "# -e= : add a one line statement" << endl; 01564 cerr << "# -tag= : select a new tag-set" << endl; 01565 cerr << "# -tag_add= : add specific comma-separated tag(s)" << endl; 01566 cerr << "# -tag_remove= : remove specific comma-separated tag(s)" << endl; 01567 cerr << "# -with_version_directory : reset to default structuring style" << endl; 01568 cerr << "# -without_version_directory : switch structuring style" << endl; 01569 cerr << "# -cleanup : activate install area cleanup" << endl; 01570 cerr << "# -no_cleanup : inhibit install area cleanup" << endl; 01571 }

Member Data Documentation

HelpMap CommandParser::m_help [private]
?

Definition at line 107 of file cmt_syntax.h.

Referenced by CommandParser(), and get_help().

HelpTexts CommandParser::m_help_texts [private]
?

Definition at line 108 of file cmt_syntax.h.

Referenced by CommandParser(), and get_help_texts().


The documentation for this class was generated from the following files:
Generated on Wed Sep 1 11:00:12 2004 for CMT by 1.2.18