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     std::vector<std::string>    Parameters;
00025     std::string                 Command;
00026   
00027     public:
00028     command_line(int argc = 0,char *argv[] = NULL);
00029   
00030     void extend(std::string const &par);
00031   
00032     TSize operator~() const
00033       { return Parameters.size(); }
00034     std::string operator[](TIndex no) const
00035       { return Parameters[no]; }
00036   
00037     std::string getCommand() const
00038       { return Command; }
00039   
00040     TSize count(std::string const &mask);
00041     std::string get(std::string const &mask,TIndex matchno = 0);
00042   
00043     private:
00044     static bool isHook(std::string const &text)
00045       { return text[0] == '@'; }
00046     static bool matchMask(std::string const &mask,std::string const &par);
00047     };
00048   }
00049 
00050 
00051 
00052 #endif

Generated on Wed Oct 31 17:12:23 2001 for ixlib by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001