AntexHeader.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: AntexHeader.hpp 2293 2010-02-12 18:14:16Z btolman $"
00002 
00008 #ifndef GPSTK_ANTEX_HEADER_HPP
00009 #define GPSTK_ANTEX_HEADER_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 <string>
00048 #include <vector>
00049 
00050 #include "AntexBase.hpp"
00051 #include "FFStream.hpp"
00052 
00053 namespace gpstk
00054 {
00057 
00062    class AntexHeader : public AntexBase
00063    {
00064    public:
00065 
00067       AntexHeader() : version(1.3), valid(false) {}
00068 
00070       inline void clear()
00071       {
00072          version = 1.3;
00073          valid = false;
00074          commentList.clear();
00075       }
00076 
00079 
00080       static const std::string versionString;         
00081       static const std::string pcvTypeString;         
00082       static const std::string headerCommentString;   
00083       static const std::string endOfHeaderString;     
00084 
00085 
00088       enum validBits
00089       {
00090          versionValid = 0x01,           
00091          systemValid = 0x02,            
00092          pcvTypeValid = 0x04,           
00093          commentValid = 0x08,           
00094          endValid   = 0x080000000,      
00095          allValid13 = 0x080000007       
00096       };
00097 
00099 
00100       unsigned long valid;
00101       double version;                        
00102       char system;                           
00103       char pcvType;                          
00104       std::string refAntType;                
00105       std::string refAntSerNum;              
00106       std::vector<std::string> commentList;  
00107 
00108      
00110       virtual ~AntexHeader() {}
00111 
00112          // our common interface
00114       virtual bool isHeader() const {return true;}
00115      
00118       virtual void dump(std::ostream& s) const;
00119 
00122       void ParseHeaderRecord(std::string& line)
00123          throw(FFStreamError);
00124 
00127       void WriteHeaderRecords(FFStream& s) const
00128          throw(FFStreamError, StringUtils::StringException);
00129 
00131       bool isValid() const { return ((valid & allValid13) == allValid13); }
00132          
00133    protected:
00135       virtual void reallyPutRecord(FFStream& s) const
00136          throw(std::exception, FFStreamError, StringUtils::StringException);
00137 
00145       virtual void reallyGetRecord(FFStream& s) 
00146          throw(std::exception, FFStreamError, StringUtils::StringException);
00147 
00148    }; // end class AntexHeader
00149 
00151 
00152 } // namespace
00153 
00154 #endif // GPSTK_ANTEX_HEADER_HPP

Generated on Thu Jul 29 03:30:51 2010 for GPS ToolKit Software Library by  doxygen 1.3.9.1