00001 #pragma ident "$Id: FFData.hpp 3140 2012-06-18 15:03:02Z susancummins $"
00002
00003
00004
00010 #ifndef GPSTK_FFDATA_HPP
00011 #define GPSTK_FFDATA_HPP
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 #include <iostream>
00055 #include <typeinfo>
00056
00057 #include "FFStreamError.hpp"
00058 #include "StringUtils.hpp"
00059
00060 namespace gpstk
00061 {
00064
00066 class FFStream;
00067
00094 class FFData
00095 {
00096 public:
00098 virtual ~FFData(void) {};
00099
00104 void putRecord(FFStream& s) const
00105 throw(FFStreamError, gpstk::StringUtils::StringException);
00106
00120 void getRecord(FFStream& s)
00121 throw(FFStreamError, gpstk::StringUtils::StringException);
00122
00127 virtual void dump(std::ostream& s) const {}
00128
00133 virtual bool isHeader() const {return false;}
00138 virtual bool isData() const {return false;}
00139
00149 friend std::ostream& operator<<(std::ostream& o, const FFData& f)
00150 throw(FFStreamError, gpstk::StringUtils::StringException);
00151
00170 friend std::istream& operator>>(std::istream& i, FFData& f)
00171 throw(FFStreamError, gpstk::StringUtils::StringException);
00172
00173 friend class FFStream;
00174
00175 protected:
00177 virtual void reallyGetRecord(FFStream& s)
00178 throw(std::exception, gpstk::StringUtils::StringException,
00179 gpstk::FFStreamError) = 0;
00180
00182 virtual void reallyPutRecord(FFStream& s) const
00183 throw(std::exception, gpstk::StringUtils::StringException,
00184 gpstk::FFStreamError) = 0;
00185 };
00186
00188
00189 }
00190
00191 #endif