DataHeaders.cpp

Go to the documentation of this file.
00001 #pragma ident "$Id: DataHeaders.cpp 1940 2009-06-13 11:10:37Z architest $"
00002 
00008 //============================================================================
00009 //
00010 //  This file is part of GPSTk, the GPS Toolkit.
00011 //
00012 //  The GPSTk is free software; you can redistribute it and/or modify
00013 //  it under the terms of the GNU Lesser General Public License as published
00014 //  by the Free Software Foundation; either version 2.1 of the License, or
00015 //  any later version.
00016 //
00017 //  The GPSTk is distributed in the hope that it will be useful,
00018 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 //  GNU Lesser General Public License for more details.
00021 //
00022 //  You should have received a copy of the GNU Lesser General Public
00023 //  License along with GPSTk; if not, write to the Free Software Foundation,
00024 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 //
00026 //  Dagoberto Salazar - gAGE ( http://www.gage.es ). 2007, 2008, 2009
00027 //
00028 //============================================================================
00029 
00030 
00031 #include "DataHeaders.hpp"
00032 
00033 
00034 using namespace std;
00035 
00036 
00037 namespace gpstk
00038 {
00039 
00040 
00041       // Assignment operator
00042    sourceHeader& sourceHeader::operator=(const sourceHeader& right)
00043    {
00044 
00045       if ( this == &right )
00046       {
00047          return (*this);
00048       }
00049 
00050       source = right.source;
00051 
00052       return (*this);
00053 
00054    }  // End of operator 'sourceHeader::operator=()'
00055 
00056 
00057 
00058       // Convenience output method for sourceHeader
00059    std::ostream& sourceHeader::dump(std::ostream& s) const
00060    {
00061 
00062       s << source;
00063 
00064       return s;
00065 
00066    }  // End of method 'sourceHeader::dump()'
00067 
00068 
00069 
00070       // stream output for sourceHeader
00071    std::ostream& operator<<( std::ostream& s,
00072                              const sourceHeader& sh )
00073    {
00074 
00075       sh.dump(s);
00076 
00077       return s;
00078 
00079    }  // End of 'operator<<' for sourceHeader
00080 
00081 
00082 
00083       // Assignment operator
00084    sourceEpochHeader& sourceEpochHeader::operator=(
00085                                                 const sourceEpochHeader& right )
00086    {
00087 
00088       if ( this == &right )
00089       {
00090          return (*this);
00091       }
00092 
00093       source = right.source;
00094       epoch = right.epoch;
00095 
00096       return (*this);
00097 
00098    }  // End of 'sourceEpochHeader::operator=()'
00099 
00100 
00101 
00102       // Convenience output method for sourceEpochHeader
00103    std::ostream& sourceEpochHeader::dump(std::ostream& s) const
00104    {
00105 
00106       s << source << " " << epoch;
00107 
00108       return s;
00109 
00110    }  // End of method 'sourceEpochHeader::dump()'
00111 
00112 
00113 
00114       // stream output for sourceEpochHeader
00115    std::ostream& operator<<( std::ostream& s,
00116                              const sourceEpochHeader& seh )
00117    {
00118 
00119         seh.dump(s);
00120 
00121         return s;
00122 
00123    }  // End of 'operator<<' for sourceEpochHeader
00124 
00125 
00126 
00127       // Explicit constructor
00128    sourceEpochRinexHeader::sourceEpochRinexHeader( const sourceHeader& sh,
00129                                                    const DayTime& time,
00130                                                    const std::string& antType,
00131                                                    const Triple& antPos,
00132                                                    const short& flag )
00133       : antennaType(antType), antennaPosition(antPos), epochFlag(flag)
00134    {
00135 
00136       source.sourceName = sh.source.sourceName;
00137       source.type = sh.source.type;
00138       epoch = time;
00139 
00140    }  // End of constructor 'sourceEpochRinexHeader::sourceEpochRinexHeader()'
00141 
00142 
00143 
00144       // Assignment operator
00145    sourceEpochRinexHeader& sourceEpochRinexHeader::operator=(
00146                                           const sourceEpochRinexHeader& right)
00147    {
00148 
00149       if ( this == &right )
00150       {
00151          return (*this);
00152       }
00153 
00154       source = right.source;
00155       epoch = right.epoch;
00156       antennaType = right.antennaType;
00157       antennaPosition = right.antennaPosition;
00158       epochFlag = right.epochFlag;
00159 
00160       return (*this);
00161 
00162    }  // End of operator 'sourceEpochRinexHeader::operator=()'
00163 
00164 
00165 
00166       // Convenience output method for sourceEpochRinexHeader
00167    std::ostream& sourceEpochRinexHeader::dump(std::ostream& s) const
00168    {
00169 
00170       s << source          << " "
00171         << epoch           << " "
00172         << antennaType     << " "
00173         << antennaPosition << " "
00174         << epochFlag;
00175 
00176         return s;
00177 
00178    }  // End of method 'sourceEpochRinexHeader::dump()'
00179 
00180 
00181 
00182       // stream output for sourceEpochRinexHeader
00183    std::ostream& operator<<( std::ostream& s,
00184                              const sourceEpochRinexHeader& serh )
00185    {
00186 
00187       serh.dump(s);
00188 
00189       return s;
00190 
00191    }  // End of 'operator<<' for sourceEpochRinexHeader
00192 
00193 
00194 
00195       // Assignment operator from a sourceTypeHeader
00196    sourceTypeHeader& sourceTypeHeader::operator=(const sourceTypeHeader& right)
00197    {
00198 
00199       if ( this == &right )
00200       {
00201          return (*this);
00202       }
00203 
00204       source = right.source;
00205       type = right.type;
00206 
00207       return (*this);
00208 
00209    }  // End of operator 'sourceTypeHeader::operator=()'
00210 
00211 
00212 
00213       // Convenience output method for sourceTypeHeader
00214    std::ostream& sourceTypeHeader::dump(std::ostream& s) const
00215    {
00216 
00217       s << source << " " << type;
00218 
00219       return s;
00220 
00221    }  // End of method 'sourceTypeHeader::dump()'
00222 
00223 
00224 
00225       // stream output for sourceTypeHeader
00226    std::ostream& operator<<( std::ostream& s,
00227                              const sourceTypeHeader& sth )
00228    {
00229 
00230       sth.dump(s);
00231 
00232       return s;
00233 
00234    }  // End of 'operator<<' for sourceTypeHeader
00235 
00236 
00237 
00238       // Assignment operator from a sourceSatHeader
00239    sourceSatHeader& sourceSatHeader::operator=(const sourceSatHeader& right)
00240    {
00241 
00242       if ( this == &right )
00243       {
00244          return (*this);
00245       }
00246 
00247       source = right.source;
00248       satellite = right.satellite;
00249 
00250       return (*this);
00251 
00252    }  // End of operator 'sourceSatHeader::operator=()'
00253 
00254 
00255 
00256       // Convenience output method for sourceSatHeader
00257    std::ostream& sourceSatHeader::dump(std::ostream& s) const
00258    {
00259 
00260       s << source << " " << satellite;
00261 
00262       return s;
00263 
00264    }  // End of method 'sourceSatHeader::dump()'
00265 
00266 
00267 
00268       // stream output for sourceSatHeader
00269    std::ostream& operator<<( std::ostream& s,
00270                              const sourceSatHeader& ssh )
00271    {
00272 
00273       ssh.dump(s);
00274 
00275       return s;
00276 
00277    }  // End of 'operator<<' for sourceSatHeader
00278 
00279 
00280 
00281       // Assignment operator from a sourceEpochSatHeader
00282    sourceEpochSatHeader& sourceEpochSatHeader::operator=(
00283                                              const sourceEpochSatHeader& right )
00284    {
00285 
00286       if ( this == &right )
00287       {
00288          return (*this);
00289       }
00290 
00291       source = right.source;
00292       epoch = right.epoch;
00293       satellite = right.satellite;
00294 
00295       return (*this);
00296 
00297    }  // End of operator 'sourceEpochSatHeader::operator=()'
00298 
00299 
00300 
00301       // Convenience output method for sourceEpochSatHeader
00302    std::ostream& sourceEpochSatHeader::dump(std::ostream& s) const
00303    {
00304 
00305       s << source << " "
00306         << epoch  << " "
00307         << satellite;
00308 
00309       return s;
00310 
00311    }  // End of method 'sourceEpochSatHeader::dump()'
00312 
00313 
00314 
00315       // stream output for sourceEpochSatHeader
00316    std::ostream& operator<<( std::ostream& s,
00317                              const sourceEpochSatHeader& sesh )
00318    {
00319 
00320       sesh.dump(s);
00321 
00322       return s;
00323 
00324    }  // End of 'operator<<' for sourceEpochSatHeader
00325 
00326 
00327 
00328       // Assignment operator from a sourceEpochTypeHeader
00329    sourceEpochTypeHeader& sourceEpochTypeHeader::operator=(
00330                                           const sourceEpochTypeHeader& right )
00331    {
00332 
00333       if ( this == &right )
00334       {
00335          return (*this);
00336       }
00337 
00338       source = right.source;
00339       epoch = right.epoch;
00340       type = right.type;
00341 
00342       return (*this);
00343 
00344    }  // End of operator 'sourceEpochTypeHeader::operator=()'
00345 
00346 
00347 
00348       // Convenience output method for sourceEpochTypeHeader
00349    std::ostream& sourceEpochTypeHeader::dump(std::ostream& s) const
00350    {
00351 
00352       s << source << " "
00353         << epoch  << " "
00354         << type;
00355 
00356       return s;
00357 
00358    }  // End of method 'sourceEpochTypeHeader::dump()'
00359 
00360 
00361 
00362       // stream output for sourceEpochTypeHeader
00363    std::ostream& operator<<( std::ostream& s,
00364                              const sourceEpochTypeHeader& seth )
00365    {
00366 
00367       seth.dump(s);
00368 
00369       return s;
00370 
00371    }  // End of 'operator<<' for sourceEpochTypeHeader
00372 
00373 
00374 
00375 }  // End of namespace gpstk

Generated on Tue May 22 03:30:57 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1