TypeID.cpp

Go to the documentation of this file.
00001 #pragma ident "$Id: TypeID.cpp 2936 2011-10-23 19:01:00Z yanweignss $"
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 "TypeID.hpp"
00032 
00033 
00034 namespace gpstk
00035 {
00036 
00037    std::map< TypeID::ValueType, std::string > TypeID::tStrings;
00038 
00039 
00040    TypeID::Initializer TypeIDsingleton;
00041 
00042       // It should be initialize by false, NEVER CHANGE IT!!!
00043    bool TypeID::bUserTypeIDRegistered = false;
00044 
00045       // Map holding user defined TypeIDs by a string
00046    std::map<std::string,TypeID> TypeID::mapUserTypeID;
00047 
00048 
00049       // Let's assign type descriptions
00050    TypeID::Initializer::Initializer()
00051    {
00052       tStrings[Unknown]    = "UnknownType";
00053       tStrings[C1]         = "C1";
00054       tStrings[C2]         = "C2";
00055       tStrings[P1]         = "P1";
00056       tStrings[P2]         = "P2";
00057       tStrings[L1]         = "L1";
00058       tStrings[L2]         = "L2";
00059       tStrings[D1]         = "D1";
00060       tStrings[D2]         = "D2";
00061       tStrings[S1]         = "S1";
00062       tStrings[S2]         = "S2";
00063       tStrings[T1]         = "T1";
00064       tStrings[T2]         = "T2";
00065       tStrings[SSI1]       = "SSI1";
00066       tStrings[LLI1]       = "LLI1";
00067       tStrings[SSI2]       = "SSI2";
00068       tStrings[LLI2]       = "LLI2";
00069       tStrings[C5]         = "C5";
00070       tStrings[L5]         = "L5";
00071       tStrings[D5]         = "D5";
00072       tStrings[S5]         = "S5";
00073       tStrings[SSI5]       = "SSI5";
00074       tStrings[LLI5]       = "LLI5";
00075       tStrings[C6]         = "C6";
00076       tStrings[L6]         = "L6";
00077       tStrings[D6]         = "D6";
00078       tStrings[S6]         = "S6";
00079       tStrings[SSI6]       = "SSI6";
00080       tStrings[LLI6]       = "LLI6";
00081       tStrings[C7]         = "C7";
00082       tStrings[L7]         = "L7";
00083       tStrings[D7]         = "D7";
00084       tStrings[S7]         = "S7";
00085       tStrings[SSI7]       = "SSI7";
00086       tStrings[LLI7]       = "LLI7";
00087       tStrings[C8]         = "C8";
00088       tStrings[L8]         = "L8";
00089       tStrings[D8]         = "D8";
00090       tStrings[S8]         = "S8";
00091       tStrings[SSI8]       = "SSI8";
00092       tStrings[LLI8]       = "LLI8";
00093       tStrings[PC]         = "PC";
00094       tStrings[LC]         = "LC";
00095       tStrings[PI]         = "PI";
00096       tStrings[LI]         = "LI";
00097       tStrings[Pdelta]     = "Pdelta";
00098       tStrings[Ldelta]     = "Ldelta";
00099       tStrings[MWubbena]   = "MWubbena";
00100       tStrings[GRAPHIC1]   = "GRAPHIC1";
00101       tStrings[GRAPHIC2]   = "GRAPHIC2";
00102       tStrings[GRAPHIC5]   = "GRAPHIC5";
00103       tStrings[GRAPHIC6]   = "GRAPHIC6";
00104       tStrings[GRAPHIC7]   = "GRAPHIC7";
00105       tStrings[GRAPHIC8]   = "GRAPHIC8";
00106       tStrings[WL]         = "WL";
00107       tStrings[WL1]        = "WL1";
00108       tStrings[WL2]        = "WL2";
00109       tStrings[WL3]        = "WL3";
00110       tStrings[WL4]        = "WL4";
00111       tStrings[EWL]        = "EWL";
00112       tStrings[L1dot]      = "L1dot";
00113       tStrings[L1dot2]     = "L1dot2";
00114       tStrings[L2dot]      = "L2dot";
00115       tStrings[L2dot2]     = "L2dot2";
00116       tStrings[L5dot]      = "L5dot";
00117       tStrings[L5dot2]     = "L5dot2";
00118       tStrings[P1dot]      = "P1dot";
00119       tStrings[P1dot2]     = "P1dot2";
00120       tStrings[P2dot]      = "P2dot";
00121       tStrings[P2dot2]     = "P2dot2";
00122       tStrings[P5dot]      = "P5dot";
00123       tStrings[P5dot2]     = "P5dot2";
00124       tStrings[L6dot]      = "L6dot";
00125       tStrings[L6dot2]     = "L6dot2";
00126       tStrings[L7dot]      = "L7dot";
00127       tStrings[L7dot2]     = "L7dot2";
00128       tStrings[L8dot]      = "L8dot";
00129       tStrings[L8dot2]     = "L8dot2";
00130       tStrings[LCdot]      = "LCdot";
00131       tStrings[LCdot2]     = "LCdot2";
00132       tStrings[LIdot]      = "LIdot";
00133       tStrings[LIdot2]     = "LIdot2";
00134       tStrings[Ldeltadot]  = "Ldeltadot";
00135       tStrings[Ldeltadot2] = "Ldeltadot2";
00136       tStrings[rho]        = "rho";
00137       tStrings[rhodot]     = "rhodot";
00138       tStrings[rhodot2]    = "rhodot2";
00139       tStrings[dtSat]      = "dtSat";
00140       tStrings[dtSatdot]   = "dtSatdot";
00141       tStrings[dtSatdot2]  = "dtSatdot2";
00142       tStrings[rel]        = "rel";
00143       tStrings[gravDelay]  = "gravDelay";
00144       tStrings[tropo]      = "tropo";
00145       tStrings[dryTropo]   = "dryTropo";
00146       tStrings[dryMap]     = "dryTropoMap";
00147       tStrings[wetTropo]   = "wetTropo";
00148       tStrings[wetMap]     = "wetTropoMap";
00149       tStrings[tropoSlant] = "slantTropo";
00150       tStrings[iono]       = "verticalIono";
00151       tStrings[ionoTEC]    = "TotalElectronContent";
00152       tStrings[ionoMap]    = "ionoMap";
00153       tStrings[ionoMap2]   = "ionoMap2";
00154       tStrings[ionoL1]     = "slantIonoL1";
00155       tStrings[ionoL2]     = "slantIonoL2";
00156       tStrings[ionoL5]     = "slantIonoL5";
00157       tStrings[ionoL6]     = "slantIonoL6";
00158       tStrings[ionoL7]     = "slantIonoL7";
00159       tStrings[ionoL8]     = "slantIonoL8";
00160       tStrings[windUp]     = "windup";
00161       tStrings[satPCenter] = "satPhaseCenter";
00162       tStrings[satX]       = "satX";
00163       tStrings[satY]       = "satY";
00164       tStrings[satZ]       = "satZ";
00165       tStrings[satVX]      = "satVX";
00166       tStrings[satVY]      = "satVY";
00167       tStrings[satVZ]      = "satVZ";
00168       tStrings[satAX]      = "satAX";
00169       tStrings[satAY]      = "satAY";
00170       tStrings[satAZ]      = "satAZ";
00171       tStrings[satJ2kX]    = "satJ2kX";
00172       tStrings[satJ2kY]    = "satJ2kY";
00173       tStrings[satJ2kZ]    = "satJ2kZ";
00174       tStrings[satJ2kVX]   = "satJ2kVX";
00175       tStrings[satJ2kVY]   = "satJ2kVY";
00176       tStrings[satJ2kVZ]   = "satJ2kVZ";
00177       tStrings[satJ2kAX]   = "satJ2kAX";
00178       tStrings[satJ2kAY]   = "satJ2kAY";
00179       tStrings[satJ2kAZ]   = "satJ2kAZ";
00180       tStrings[elevation]  = "elevation";
00181       tStrings[azimuth]    = "azimuth";
00182 
00183       tStrings[CSL1]       = "CSL1";
00184       tStrings[CSL2]       = "CSL2";
00185       tStrings[CSL5]       = "CSL5";
00186       tStrings[CSL6]       = "CSL6";
00187       tStrings[CSL7]       = "CSL7";
00188       tStrings[CSL8]       = "CSL8";
00189       tStrings[satArc]     = "satArc";
00190       tStrings[BL1]        = "ambiguityL1";
00191       tStrings[BL2]        = "ambiguityL2";
00192       tStrings[BL5]        = "ambiguityL5";
00193       tStrings[BL6]        = "ambiguityL6";
00194       tStrings[BL7]        = "ambiguityL7";
00195       tStrings[BL8]        = "ambiguityL8";
00196       tStrings[BLC]        = "ambiguityLC";
00197       tStrings[BWL]        = "ambiguityWL";
00198       tStrings[BWL2]       = "ambiguityWL2";
00199       tStrings[BWL3]       = "ambiguityWL3";
00200       tStrings[BWL4]       = "ambiguityWL4";
00201       tStrings[mpC1]       = "multipathC1";
00202       tStrings[mpC2]       = "multipathC2";
00203       tStrings[mpC5]       = "multipathC5";
00204       tStrings[mpC6]       = "multipathC6";
00205       tStrings[mpC7]       = "multipathC7";
00206       tStrings[mpC8]       = "multipathC8";
00207       tStrings[mpL1]       = "multipathL1";
00208       tStrings[mpL2]       = "multipathL2";
00209       tStrings[mpL5]       = "multipathL5";
00210       tStrings[mpL6]       = "multipathL6";
00211       tStrings[mpL7]       = "multipathL7";
00212       tStrings[mpL8]       = "multipathL8";
00213       tStrings[instC1]     = "instrumentalC1";
00214       tStrings[instC2]     = "instrumentalC2";
00215       tStrings[instC5]     = "instrumentalC5";
00216       tStrings[instC6]     = "instrumentalC6";
00217       tStrings[instC7]     = "instrumentalC7";
00218       tStrings[instC8]     = "instrumentalC8";
00219       tStrings[instL1]     = "instrumentalL1";
00220       tStrings[instL2]     = "instrumentalL2";
00221       tStrings[instL5]     = "instrumentalL5";
00222       tStrings[instL6]     = "instrumentalL6";
00223       tStrings[instL7]     = "instrumentalL7";
00224       tStrings[instL8]     = "instrumentalL8";
00225 
00226       tStrings[prefitP1]   = "prefitResidualCodeP1";
00227       tStrings[prefitP2]   = "prefitResidualCodeP2";
00228       tStrings[prefitL1]   = "prefitResidualPhaseL1";
00229       tStrings[prefitL2]   = "prefitResidualPhaseL2";
00230       tStrings[postfitP1]  = "postfitResidualCodeP1";
00231       tStrings[postfitP2]  = "postfitResidualCodeP2";
00232       tStrings[postfitL1]  = "postfitResidualPhaseL1";
00233       tStrings[postfitL2]  = "postfitResidualPhaseL2";
00234 
00235       tStrings[prefitC5]   = "prefitResidualCodeC5";
00236       tStrings[prefitL5]   = "prefitResidualPhaseL5";
00237       tStrings[postfitC5]  = "postfitResidualCodeC5";
00238       tStrings[postfitL5]  = "postfitResidualPhaseL5";
00239 
00240       tStrings[prefitGRAPHIC1]  = "prefitResidualGRAPHIC1";
00241       tStrings[prefitGRAPHIC2]  = "prefitResidualGRAPHIC2";
00242       tStrings[postfitGRAPHIC1] = "postfitResidualGRAPHIC1";
00243       tStrings[postfitGRAPHIC2] = "postfitResidualGRAPHIC2";
00244       tStrings[prefitMWubbena]   = "prefitMWubbena";
00245       tStrings[prefitWL]   = "prefitResidualWL";
00246       tStrings[prefitWL2]  = "prefitResidualWL2";
00247       tStrings[prefitWL3]  = "prefitResidualWL3";
00248       tStrings[prefitWL4]  = "prefitResidualWL4";
00249       tStrings[postfitWL]  = "postfitResidualWL";
00250       tStrings[postfitWL2] = "postfitResidualWL2";
00251       tStrings[postfitWL3] = "postfitResidualWL3";
00252       tStrings[postfitWL4] = "postfitResidualWL4";
00253       tStrings[prefitC]    = "prefitResidualCode";
00254       tStrings[prefitL]    = "prefitResidualPhase";
00255       tStrings[postfitC]   = "posfitResidualCode";
00256       tStrings[postfitL]   = "posfitResidualPhase";
00257       tStrings[dx]         = "dx";
00258       tStrings[dy]         = "dy";
00259       tStrings[dz]         = "dz";
00260       tStrings[cdt]        = "cdt";
00261       tStrings[cdtSat]     = "cdtSat";
00262       tStrings[dLat]       = "dLat";
00263       tStrings[dLon]       = "dLon";
00264       tStrings[dH]         = "dH";
00265       tStrings[dSatX]      = "dSatX";
00266       tStrings[dSatY]      = "dSatY";
00267       tStrings[dSatZ]      = "dSatZ";
00268       tStrings[dSatR]      = "dSatR";
00269       tStrings[dSatT]      = "dSatT";
00270       tStrings[dSatN]      = "dSatN";
00271       tStrings[weight]     = "weight";
00272       tStrings[codeBias]   = "codeBias";
00273 
00274       tStrings[cdtC1]    = "cdtC1";
00275       tStrings[cdtP1]    = "cdtP1";
00276       tStrings[cdtC2]    = "cdtC2";
00277       tStrings[cdtP2]    = "cdtP2";
00278       tStrings[cdtC5]    = "cdtC5";
00279       tStrings[cdtP5]    = "cdtP5";
00280       tStrings[cdtL1]    = "cdtL1";
00281       tStrings[cdtL2]    = "cdtL2";
00282       tStrings[cdtL5]    = "cdtL5";
00283       tStrings[cdtPC]    = "cdtPC";
00284       tStrings[cdtLC]    = "cdtLC";
00285       tStrings[cdtWL]    = "cdtWL";
00286       tStrings[cdtWL2]    = "cdtWL2";
00287       tStrings[cdtWL3]    = "cdtWL3";
00288       tStrings[cdtWL4]    = "cdtWL4";
00289       tStrings[cdtMW]    = "cdtMW";
00290 
00291       tStrings[cdtSatC1]    = "cdtSatC1";
00292       tStrings[cdtSatP1]    = "cdtSatP1";
00293       tStrings[cdtSatC2]    = "cdtSatC2";
00294       tStrings[cdtSatP2]    = "cdtSatP2";
00295       tStrings[cdtSatC5]    = "cdtSatC5";
00296       tStrings[cdtSatP5]    = "cdtSatP5";
00297       tStrings[cdtSatL1]    = "cdtSatL1";
00298       tStrings[cdtSatL2]    = "cdtSatL2";
00299       tStrings[cdtSatL5]    = "cdtSatL5";
00300       tStrings[cdtSatPC]    = "cdtSatPC";
00301       tStrings[cdtSatLC]    = "cdtSatLC";
00302       tStrings[cdtSatWL]    = "cdtSatWL";
00303       tStrings[cdtSatMW]    = "cdtSatMW";
00304 
00305       tStrings[recX]       = "RxPositionX";
00306       tStrings[recY]       = "RxPositionY";
00307       tStrings[recZ]       = "RxPositionZ";
00308       tStrings[recVX]      = "RxVelocityX";
00309       tStrings[recVY]      = "RxVelocityY";
00310       tStrings[recVZ]      = "RxVelocityZ";
00311       tStrings[recAX]      = "RxAccelerationX";
00312       tStrings[recAY]      = "RxAccelerationY";
00313       tStrings[recAZ]      = "RxAccelerationZ";
00314       tStrings[recLat]     = "RxLat";
00315       tStrings[recLon]     = "RxLon";
00316       tStrings[recH]       = "RxH";
00317       tStrings[recVLat]    = "RxVelocityLat";
00318       tStrings[recVLon]    = "RxVelocityLon";
00319       tStrings[recVH]      = "RxVelocityH";
00320       tStrings[recALat]    = "RxAccelerationLat";
00321       tStrings[recALon]    = "RxAccelerationLon";
00322       tStrings[recAH]      = "RxAccelerationH";
00323       tStrings[recJ2kX]    = "RxJ2kPositionX";
00324       tStrings[recJ2kY]    = "RxJ2kPositionY";
00325       tStrings[recJ2kZ]    = "RxJ2kPositionZ";
00326       tStrings[recJ2kVX]   = "RxJ2kVelocityX";
00327       tStrings[recJ2kVY]   = "RxJ2kVelocityY";
00328       tStrings[recJ2kVZ]   = "RxJ2kVelocityZ";
00329       tStrings[recJ2kAX]   = "RxJ2kAccelerationX";
00330       tStrings[recJ2kAY]   = "RxJ2kAccelerationY";
00331       tStrings[recJ2kAZ]   = "RxJ2kAccelerationZ";
00332       tStrings[sigma]      = "sigma";
00333       tStrings[iura]       = "iura";
00334       tStrings[dummy0]     = "dummy0";
00335       tStrings[dummy1]     = "dummy1";
00336       tStrings[dummy2]     = "dummy2";
00337       tStrings[dummy3]     = "dummy3";
00338       tStrings[dummy4]     = "dummy4";
00339       tStrings[dummy5]     = "dummy5";
00340       tStrings[dummy6]     = "dummy6";
00341       tStrings[dummy7]     = "dummy7";
00342       tStrings[dummy8]     = "dummy8";
00343       tStrings[dummy9]     = "dummy9";
00344       tStrings[Last]       = "Last";
00345       tStrings[Placeholder]= "Placeholder";
00346    }
00347 
00348 
00349       // Assignment operator
00350    TypeID TypeID::operator=(const TypeID& right)
00351    {
00352       if ( this == &right ) return (*this);
00353       (*this).type = right.type;
00354       return *this;
00355    }
00356 
00357 
00358       // Convenience output method
00359    std::ostream& TypeID::dump(std::ostream& s) const
00360    {
00361       s << TypeID::tStrings[type];
00362 
00363       return s;
00364    } // TypeID::dump()
00365 
00366 
00367       // Returns true if this is a valid TypeID. Basically just
00368       // checks that the enum is defined
00369    bool TypeID::isValid() const
00370    {
00371       return !(type==Unknown);
00372    }
00373 
00374 
00375       /* Static method to add new TypeID's
00376        * @param string      Identifying string for the new TypeID
00377        */
00378    TypeID::ValueType TypeID::newValueType(const std::string& s)
00379    {
00380       ValueType newId =
00381          static_cast<ValueType>(TypeID::tStrings.rbegin()->first + 1);
00382 
00383       TypeID::tStrings[newId] = s;
00384 
00385       return newId;
00386    }
00387 
00388 
00389    namespace StringUtils
00390    {
00391 
00392          // convert this object to a string representation
00393       std::string asString(const TypeID& p)
00394       {
00395          std::ostringstream oss;
00396          p.dump(oss);
00397          return oss.str();
00398       }
00399 
00400    }  // End of namespace StringUtils
00401 
00402 
00403       // stream output for TypeID
00404    std::ostream& operator<<(std::ostream& s, const TypeID& p)
00405    {
00406       p.dump(s);
00407       return s;
00408    }
00409 
00410 
00411       // Conversion from RinexObsType to TypeID
00412    TypeID::ValueType RinexType2TypeID(const RinexObsHeader::RinexObsType& rot)
00413    {
00414         if (rot == RinexObsHeader::UN) return TypeID::Unknown;
00415         if (rot == RinexObsHeader::C1) return TypeID::C1;
00416         if (rot == RinexObsHeader::C2) return TypeID::C2;
00417         if (rot == RinexObsHeader::P1) return TypeID::P1;
00418         if (rot == RinexObsHeader::P2) return TypeID::P2;
00419         if (rot == RinexObsHeader::L1) return TypeID::L1;
00420         if (rot == RinexObsHeader::L2) return TypeID::L2;
00421         if (rot == RinexObsHeader::D1) return TypeID::D1;
00422         if (rot == RinexObsHeader::D2) return TypeID::D2;
00423         if (rot == RinexObsHeader::S1) return TypeID::S1;
00424         if (rot == RinexObsHeader::S2) return TypeID::S2;
00425         // v 2.11
00426         if (rot == RinexObsHeader::C5) return TypeID::C5;
00427         if (rot == RinexObsHeader::L5) return TypeID::L5;
00428         if (rot == RinexObsHeader::D5) return TypeID::D5;
00429         if (rot == RinexObsHeader::S5) return TypeID::S5;
00430         // Galileo-related
00431         if (rot == RinexObsHeader::C6) return TypeID::C6;
00432         if (rot == RinexObsHeader::L6) return TypeID::L6;
00433         if (rot == RinexObsHeader::D6) return TypeID::D6;
00434         if (rot == RinexObsHeader::S6) return TypeID::S6;
00435         if (rot == RinexObsHeader::C7) return TypeID::C7;
00436         if (rot == RinexObsHeader::L7) return TypeID::L7;
00437         if (rot == RinexObsHeader::D7) return TypeID::D7;
00438         if (rot == RinexObsHeader::S7) return TypeID::S7;
00439         if (rot == RinexObsHeader::C8) return TypeID::C8;
00440         if (rot == RinexObsHeader::L8) return TypeID::L8;
00441         if (rot == RinexObsHeader::D8) return TypeID::D8;
00442         if (rot == RinexObsHeader::S8) return TypeID::S8;
00443 
00444         // Just in case, but it should never get this far
00445         return TypeID::Unknown;
00446    }
00447 
00448 
00450    void TypeID::regTypeIDs(RegTypeID* pReg, bool bAdd)
00451    {
00452       //
00453       if(!bAdd && bUserTypeIDRegistered)
00454       {
00455          unregAll();
00456       }
00457          
00458       pReg->regAll();
00459 
00460       bUserTypeIDRegistered = true;
00461 
00462    }
00463 
00464       // Return the new TypeID
00465    TypeID TypeID::regByName(std::string name,std::string desc)
00466    {
00467 
00468       std::map<std::string,TypeID>::iterator it = mapUserTypeID.find(name);
00469 
00470       if(it != mapUserTypeID.end())
00471       {
00472          return it->second;
00473       }
00474       else
00475       {
00476          TypeID newID = TypeID::newValueType(desc);
00477 
00478          mapUserTypeID.insert(std::pair<std::string,TypeID>(name, newID));
00479 
00480          return newID;
00481       }
00482 
00483    }  // End of 'TypeID::registerTypeID(std::string name,std::string desc)'
00484 
00485 
00486 
00487       // unregister a TypeID by it's name string
00488    void TypeID::unregByName(std::string name)
00489    {
00490       std::map<std::string,TypeID>::iterator it = mapUserTypeID.find(name);
00491 
00492       if(it!=mapUserTypeID.end())
00493       {
00494          TypeID delID = it->second;
00495 
00496          std::map<TypeID::ValueType,std::string>::iterator it2 = TypeID::tStrings.find(delID.type);
00497          if(it2!=TypeID::tStrings.end())
00498          {
00499             TypeID::tStrings.erase(it2);
00500          }
00501 
00502          mapUserTypeID.erase(it);
00503       }
00504       else
00505       {
00506          // the TypeID have not been registered
00507          // we do nothing
00508       }
00509 
00510    } // End of 'TypeID::unregisterTypeID(std::string name)'
00511 
00512 
00513 
00514       // unregister all TypeIDs registered by name string
00515    void TypeID::unregAll()
00516    {
00517       std::map<std::string,TypeID>::iterator it = mapUserTypeID.begin();
00518 
00519       for(it=mapUserTypeID.begin(); it!=mapUserTypeID.end(); it++)
00520       {
00521          TypeID delID = it->second;
00522 
00523          std::map<TypeID::ValueType,std::string>::iterator it2 = TypeID::tStrings.find(delID.type);
00524          if(it2!=TypeID::tStrings.end())
00525          {
00526             TypeID::tStrings.erase(it2);
00527          }
00528       }
00529       mapUserTypeID.clear();
00530 
00531       bUserTypeIDRegistered = false;
00532 
00533    }  // End of 'TypeID::unregisterAll()'
00534 
00535       // get the user registered TypeID by name string
00536    TypeID TypeID::byName(std::string name)
00537       throw(InvalidRequest)
00538    {
00539       // registerMyTypeID();
00540 
00541       std::map<std::string,TypeID>::iterator it = mapUserTypeID.find(name);
00542       if(it != mapUserTypeID.end())
00543       {
00544          return it->second;
00545       }
00546       else
00547       {
00548          InvalidRequest e("There are no registered TypeID name as '" 
00549             + name + "'.");
00550          GPSTK_THROW(e);
00551       }
00552    } // End of 'TypeID TypeID::byName(std::string name)'
00553 
00554 } // End of namespace gpstk
00555 
00556 

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