00001 #pragma ident "$Id: CommandOptionWithCommonTimeArg.hpp 1161 2008-03-27 17:16:22Z ckiesch $" 00002 00008 #ifndef COMMANDOPTIONWITHTIMEARG_HPP 00009 #define COMMANDOPTIONWITHTIMEARG_HPP 00010 00011 //============================================================================ 00012 // 00013 // This file is part of GPSTk, the GPS Toolkit. 00014 // 00015 // The GPSTk is free software; you can redistribute it and/or modify 00016 // it under the terms of the GNU Lesser General Public License as published 00017 // by the Free Software Foundation; either version 2.1 of the License, or 00018 // any later version. 00019 // 00020 // The GPSTk is distributed in the hope that it will be useful, 00021 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00023 // GNU Lesser General Public License for more details. 00024 // 00025 // You should have received a copy of the GNU Lesser General Public 00026 // License along with GPSTk; if not, write to the Free Software Foundation, 00027 // Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00028 // 00029 // Copyright 2004, The University of Texas at Austin 00030 // 00031 //============================================================================ 00032 00033 //============================================================================ 00034 // 00035 //This software developed by Applied Research Laboratories at the University of 00036 //Texas at Austin, under contract to an agency or agencies within the U.S. 00037 //Department of Defense. The U.S. Government retains all rights to use, 00038 //duplicate, distribute, disclose, or release this software. 00039 // 00040 //Pursuant to DoD Directive 523024 00041 // 00042 // DISTRIBUTION STATEMENT A: This software has been approved for public 00043 // release, distribution is unlimited. 00044 // 00045 //============================================================================= 00046 00047 #include "CommandOption.hpp" 00048 #include "CommonTime.hpp" 00049 00050 namespace gpstk 00051 { 00054 00062 class CommandOptionWithCommonTimeArg : public gpstk::CommandOptionWithAnyArg 00063 { 00064 public: 00075 CommandOptionWithCommonTimeArg(const char shOpt, 00076 const std::string& loOpt, 00077 const std::string& timeFormat, 00078 const std::string& desc, 00079 const bool required = false) 00080 : gpstk::CommandOptionWithAnyArg(shOpt, loOpt, desc, required), 00081 timeSpec(timeFormat) 00082 {} 00083 00085 virtual ~CommandOptionWithCommonTimeArg() {} 00086 00089 virtual std::string getArgString() const 00090 { return "TIME"; } 00091 00093 virtual std::string checkArguments(); 00094 00096 std::vector<CommonTime> getTime() const { return times; } 00097 00098 protected: 00100 std::vector<CommonTime> times; 00102 std::string timeSpec; 00103 00105 CommandOptionWithCommonTimeArg() {} 00106 00107 }; // class CommandOptionWithCommonTimeArg 00108 00110 00111 } // namespace gpstk 00112 00113 #endif
1.3.9.1