SMODFStream.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: SMODFStream.hpp 70 2006-08-01 18:36:21Z ehagen $"
00002 
00003 
00004 
00005 //============================================================================
00006 //
00007 //  This file is part of GPSTk, the GPS Toolkit.
00008 //
00009 //  The GPSTk is free software; you can redistribute it and/or modify
00010 //  it under the terms of the GNU Lesser General Public License as published
00011 //  by the Free Software Foundation; either version 2.1 of the License, or
00012 //  any later version.
00013 //
00014 //  The GPSTk is distributed in the hope that it will be useful,
00015 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 //  GNU Lesser General Public License for more details.
00018 //
00019 //  You should have received a copy of the GNU Lesser General Public
00020 //  License along with GPSTk; if not, write to the Free Software Foundation,
00021 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 //  
00023 //  Copyright 2004, The University of Texas at Austin
00024 //
00025 //============================================================================
00026 
00027 //============================================================================
00028 //
00029 //This software developed by Applied Research Laboratories at the University of
00030 //Texas at Austin, under contract to an agency or agencies within the U.S. 
00031 //Department of Defense. The U.S. Government retains all rights to use,
00032 //duplicate, distribute, disclose, or release this software. 
00033 //
00034 //Pursuant to DoD Directive 523024 
00035 //
00036 // DISTRIBUTION STATEMENT A: This software has been approved for public 
00037 //                           release, distribution is unlimited.
00038 //
00039 //=============================================================================
00040 
00041 
00042 
00043 
00044 
00045 
00051 #ifndef SMODFSTREAM_HPP
00052 #define SMODFSTREAM_HPP
00053 
00054 #include "FFTextStream.hpp"
00055 
00056 namespace gpstk
00057 {
00060 
00065    class SMODFStream : public gpstk::FFTextStream
00066    {
00067    public:
00068       SMODFStream()
00069             : format(undefined)
00070          {}
00071 
00077       SMODFStream(const char* fn, std::ios::openmode mode=std::ios::in)
00078          throw()
00079             : gpstk::FFTextStream(fn, mode), format(undefined)
00080          {
00081                // open a file for write in icd211 mode
00082             if  ( (mode & std::ios::out) && !(mode & std::ios::in) )
00083                format = icd211;
00084          }
00085 
00087       virtual ~SMODFStream() {}
00088 
00090       virtual void open(const char* fn, std::ios::openmode mode)
00091          { 
00092             gpstk::FFTextStream::open(fn, mode);
00093                // open a file for write in icd211 mode
00094             if  ( (mode & std::ios::out) && !(mode & std::ios::in) )
00095                format = icd211;
00096             else
00097                format = undefined;
00098          }
00099 
00103       enum FileFormat {
00104          undefined,      
00105          legacy,         
00106          icd211          
00107       };
00108 
00109       FileFormat format; 
00110    }; // class SMODFStream
00111 
00113 
00114 } // namespace sglmsn
00115 
00116 #endif

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