Dumper.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: Dumper.hpp 3140 2012-06-18 15:03:02Z susancummins $"
00002 
00008 #ifndef GPSTK_DUMPER_HPP
00009 #define GPSTK_DUMPER_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., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
00028 //
00029 //  Dagoberto Salazar - gAGE ( http://www.gage.es ). 2009, 2011
00030 //
00031 //============================================================================
00032 
00033 
00034 
00035 #include <ostream>
00036 #include "ProcessingClass.hpp"
00037 
00038 
00039 namespace gpstk
00040 {
00041 
00044 
00045 
00138    class Dumper : public ProcessingClass
00139    {
00140    public:
00141 
00143       Dumper()
00144          : outStr(&std::cout), printType(true), printTime(true),
00145            printStation(true)
00146       { };
00147 
00148 
00157       Dumper( std::ostream& out,
00158               int printtype = true,
00159               bool printtime = true,
00160               bool printstation = true )
00161          : outStr(&out), printType(printtype), printTime(printtime),
00162            printStation(printstation)
00163       { };
00164 
00165 
00170       virtual satTypeValueMap& Process( satTypeValueMap& gData )
00171          throw(ProcessingException);
00172 
00173 
00178       virtual gnssSatTypeValue& Process( gnssSatTypeValue& gData )
00179          throw(ProcessingException)
00180       { gnssRinex gRin(gData); Process(gRin); return gData; };
00181 
00182 
00187       virtual gnssRinex& Process( gnssRinex& gData )
00188          throw(ProcessingException);
00189 
00190 
00192       virtual std::ostream* getOutputStream(void) const
00193       { return outStr; };
00194 
00195 
00200       virtual Dumper& setOutputStream( std::ostream& out )
00201       { outStr = &out; return (*this); };
00202 
00203 
00205       virtual bool getPrintTypeID(void) const
00206       { return printType; };
00207 
00208 
00213       virtual Dumper& setPrintTypeID( bool printtype )
00214       { printType = printtype; return (*this); };
00215 
00216 
00218       virtual bool getPrintTime(void) const
00219       { return printTime; };
00220 
00221 
00226       virtual Dumper& setPrintTime( bool printtime )
00227       { printTime = printtime; return (*this); };
00228 
00229 
00231       virtual bool getPrintSourceID(void) const
00232       { return printStation; };
00233 
00234 
00239       virtual Dumper& setPrintSourceID( bool printstation )
00240       { printStation = printstation; return (*this); };
00241 
00242 
00253       virtual Dumper& setType( const TypeID& type )
00254       { printTypeSet.clear(); printTypeSet.insert(type); return (*this); };
00255 
00256 
00262       virtual Dumper& addType( const TypeID& type )
00263       { printTypeSet.insert(type); return (*this); };
00264 
00265 
00273       virtual Dumper& setTypeSet( const TypeIDSet& printSet )
00274       { printTypeSet.clear(); printTypeSet = printSet; return (*this); };
00275 
00276 
00282       virtual Dumper& addTypeSet( const TypeIDSet& printSet );
00283 
00284 
00287       virtual Dumper& clearTypeSet( void )
00288       { printTypeSet.clear(); return (*this); };
00289 
00290 
00292       virtual TypeIDSet getTypeSet(void) const
00293       { return printTypeSet; };
00294 
00295 
00297       virtual std::string getClassName(void) const;
00298 
00299 
00301       virtual ~Dumper() {};
00302 
00303 
00304    private:
00305 
00306 
00308       std::ostream* outStr;
00309 
00310 
00312       bool printType;
00313 
00314 
00316       bool printTime;
00317 
00318 
00320       bool printStation;
00321 
00322 
00324       TypeIDSet printTypeSet;
00325 
00326 
00328       void printTypeID( const typeValueMap& tvMap );
00329 
00330 
00331    }; // End of class 'Dumper'
00332 
00334 
00335 }  // End of namespace gpstk
00336 
00337 #endif  // GPSTK_DUMPER_HPP

Generated on Thu May 23 03:31:06 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1