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

ixlib_cmdline.hh

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 //  Description      : Command line handling.
00003 // ----------------------------------------------------------------------------
00004 //  (c) Copyright 1997 by iXiONmedia, all rights reserved.
00005 // ----------------------------------------------------------------------------
00006 
00007 
00008 
00009 
00010 #ifndef IXLIB_CMDLINE
00011 #define IXLIB_CMDLINE
00012 
00013 
00014 
00015 
00016 #include <vector>
00017 #include <ixlib_string.hh>
00018 
00019 
00020 
00021 
00022 namespace ixion {
00023   class command_line {
00024     vector<string>       Parameters;
00025     string               Command;
00026   
00027     public:
00028     command_line(int argc = 0,char *argv[] = NULL);
00029   
00030     void extend(string const &par);
00031   
00032     TSize operator~() const
00033       { return Parameters.size(); }
00034     string operator[](TIndex no) const
00035       { return Parameters[no]; }
00036   
00037     string getCommand() const
00038       { return Command; }
00039   
00040     TSize count(string const &mask);
00041     string get(string const &mask,TIndex matchno = 0);
00042   
00043     private:
00044     static bool isHook(string const &text)
00045       { return text[0] == '@'; }
00046     static bool matchMask(string const &mask,string const &par);
00047     };
00048   }
00049 
00050 
00051 
00052 #endif

Generated at Tue Apr 17 18:29:42 2001 for ixlib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001