00001 /* 00002 This is a descendent of argument that will display a usage statement. 00003 00004 Copyright (C) 2002 Ross A. Beyer 00005 00006 Contact Author: Ross A. Beyer, rbeyer@rossbeyer.net 00007 00008 CVS $Id: usage_arg.hpp,v 1.2 2003/03/03 00:52:30 rbeyer Exp $ 00009 00010 00011 License & Copyright Information 00012 ------------------------------- 00013 00014 This file is part of the commandl package, 00015 $Name: commandl_Beta-1 $. 00016 00017 The commandl packge is free software; you can redistribute it 00018 and/or modify it under the terms of the GNU General Public License 00019 as published by the Free Software Foundation; either version 2 of the 00020 License, or (at your option) any later version. 00021 00022 The commandl package is distributed in the hope that it will be useful, 00023 but WITHOUT ANY WARRANTY; without even the implied warranty of 00024 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00025 GNU General Public License for more details. 00026 00027 You should have received a copy of the GNU General Public License 00028 along with this program; if not, write to the Free Software 00029 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00030 00031 */ 00032 00033 #ifndef USAGE_ARG_HEADER // Begin the Header Guard to prevent multiple 00034 #define USAGE_ARG_HEADER // inclusions. 00035 00036 #include "argument.hpp" 00037 #include <iosfwd> 00038 00039 namespace commandl 00040 { 00041 00045 class usage_arg : public argument 00046 { 00047 00048 // ==================== Constructors & Destructor ===================== // 00049 public: 00050 00051 usage_arg 00052 ( 00053 std::vector<std::string>, // keys 00054 std::string = "" // description 00055 ); 00056 00057 usage_arg 00058 ( 00059 std::string, // key 00060 std::string = "" // description 00061 ); 00062 00063 virtual ~usage_arg() 00064 {}; 00065 00066 // =========================== Accessors ============================== // 00067 public: 00068 00069 00070 // =========================== Methods ================================ // 00071 public: 00072 00073 // value(s) prefix, key, assignment 00074 virtual 00075 void operator() ( 00076 const std::string&, // prefix 00077 const std::string&, // key 00078 const unsigned long // order 00079 ); 00080 virtual 00081 void operator() ( 00082 const std::string&, // value 00083 const std::string&, // prefix 00084 const std::string&, // key 00085 const std::string&, // assign 00086 const unsigned long // order 00087 ); 00088 virtual 00089 void operator() ( 00090 const std::vector<std::string>&, // values 00091 const std::string&, // prefix 00092 const std::string&, // key 00093 const std::string&, // assign 00094 const unsigned long // order 00095 ); 00096 00097 // --------------------------- Protected Methods ---------------------- // 00098 protected: 00099 00100 00101 // --------------------------- Private Methods ------------------------ // 00102 private: 00103 00104 00105 // =========================== Member Variables ======================= // 00106 protected: 00107 00108 00109 }; // End of the class declaration 00110 00111 } // End of the namespace declaration 00112 00113 #endif // End the Header Guard 00114