BasicFramework.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: BasicFramework.hpp 2511 2011-02-18 06:05:52Z yanweignss $"
00002 
00008 #ifndef GPSTK_BASICFRAMEWORK_HPP
00009 #define GPSTK_BASICFRAMEWORK_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 
00048 #include "CommandOptionParser.hpp"
00049 #include "MainAdapter.hpp"
00050 
00051 namespace gpstk
00052 {
00053 
00078 
00092    class BasicFramework
00093    {
00094    public:
00095 
00096 
00103       BasicFramework( const std::string& applName,
00104                       const std::string& applDesc )
00105          throw();
00106 
00107 
00109       virtual ~BasicFramework() {};
00110 
00111 
00123       virtual bool initialize( int argc,
00124                                char *argv[],
00125                                bool pretty = true )
00126          throw();
00127 
00128 
00139       virtual bool initialize( std::string cmdLine,
00140                                bool pretty = true )
00141          throw();
00142 
00143 
00149       bool run() throw();
00150 
00151 
00152    protected:
00153 
00154       int debugLevel;           
00155       int verboseLevel;         
00156       std::string argv0;        
00157       std::string appDesc;      
00158 
00160 
00161       CommandOptionNoArg debugOption; 
00162       CommandOptionNoArg verboseOption;
00163       CommandOptionNoArg helpOption;
00165 
00166 
00172       virtual void completeProcessing();
00173 
00174 
00181       virtual void additionalSetup() {};
00182 
00183 
00188       virtual void spinUp() {};
00189 
00190 
00195       virtual void process() {};
00196 
00197 
00203       virtual void shutDown() {};
00204 
00205 
00206    private:
00207 
00208 
00209          // Do not allow the use of the default constructor.
00210       BasicFramework();
00211 
00212    }; // End of class 'BasicFramework'
00213 
00215 
00216 }  // End of namespace gpstk
00217 #endif   // GPSTK_BASICFRAMEWORK_HPP

Generated on Wed Feb 8 03:30:57 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1