00001 #pragma ident "$Id: ProcessingVector.cpp 1351 2008-08-07 14:33:39Z 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 00027 // 00028 //============================================================================ 00029 00030 00031 #include "ProcessingVector.hpp" 00032 00033 00034 namespace gpstk 00035 { 00036 00037 // Index initially assigned to this class 00038 int ProcessingVector::classIndex = 10500000; 00039 00040 00041 // Returns an index identifying this object. 00042 int ProcessingVector::getIndex(void) const 00043 { return (*this).index; } 00044 00045 00046 // Returns a string identifying this object. 00047 std::string ProcessingVector::getClassName(void) const 00048 { return "ProcessingVector"; } 00049 00050 00051 00052 /* Processing method. It returns a gnnsSatTypeValue object. 00053 * 00054 * @param gData Data object holding the data. 00055 */ 00056 gnssSatTypeValue& ProcessingVector::Process(gnssSatTypeValue& gData) 00057 { 00058 00059 try 00060 { 00061 00062 std::vector<ProcessingClass*>::const_iterator pos; 00063 for (pos = procvector.begin(); pos != procvector.end(); ++pos) 00064 { 00065 (*pos)->Process(gData); 00066 } 00067 00068 return gData; 00069 00070 } 00071 catch(...) 00072 { 00073 00074 // This method must throw the same exceptions it may get from 00075 // the 'ProcessingList' elements, without altering them. 00076 throw; 00077 00078 } 00079 00080 } // End of method 'ProcessingVector::Process()' 00081 00082 00083 00084 /* Processing method. It returns a gnnsRinex object. 00085 * 00086 * @param gData Data object holding the data. 00087 */ 00088 gnssRinex& ProcessingVector::Process(gnssRinex& gData) 00089 { 00090 00091 try 00092 { 00093 00094 std::vector<ProcessingClass*>::const_iterator pos; 00095 for (pos = procvector.begin(); pos != procvector.end(); ++pos) 00096 { 00097 (*pos)->Process(gData); 00098 } 00099 00100 return gData; 00101 00102 00103 } 00104 catch(...) 00105 { 00106 00107 // This method must throw the same exceptions it may get from 00108 // the 'ProcessingList' elements, without altering them. 00109 throw; 00110 00111 } 00112 00113 } // End of method 'ProcessingVector::Process()' 00114 00115 00116 00117 } // End of namespace gpstk
1.3.9.1