diff --git a/core/lib/AppFrame/BasicFramework.cpp b/core/lib/AppFrame/BasicFramework.cpp index a2c74d8c0..e18c74b32 100644 --- a/core/lib/AppFrame/BasicFramework.cpp +++ b/core/lib/AppFrame/BasicFramework.cpp @@ -53,7 +53,7 @@ namespace gpstk BasicFramework :: BasicFramework( const string& applName, const string& applDesc ) - throw() + noexcept : debugLevel(0), verboseLevel(0), exitCode(0), @@ -69,7 +69,7 @@ namespace gpstk bool BasicFramework :: initialize( int argc, char *argv[], bool pretty ) - throw() + noexcept { // Creating the parser here ensures that all the subclasses' @@ -122,7 +122,7 @@ namespace gpstk bool BasicFramework :: run() - throw() + noexcept { try diff --git a/core/lib/AppFrame/BasicFramework.hpp b/core/lib/AppFrame/BasicFramework.hpp index f49c32151..05721d9a7 100644 --- a/core/lib/AppFrame/BasicFramework.hpp +++ b/core/lib/AppFrame/BasicFramework.hpp @@ -109,7 +109,7 @@ namespace gpstk */ BasicFramework( const std::string& applName, const std::string& applDesc ) - throw(); + noexcept; /// Destructor. @@ -130,7 +130,7 @@ namespace gpstk virtual bool initialize( int argc, char *argv[], bool pretty = true ) - throw(); + noexcept; /** Run the program. Processes only once (refer to subclasses @@ -138,7 +138,7 @@ namespace gpstk * * @return false if an exception occurred */ - bool run() throw(); + bool run() noexcept; /** A place to store the exit code for the application. diff --git a/core/lib/AppFrame/InOutFramework.hpp b/core/lib/AppFrame/InOutFramework.hpp index fdce0aaee..9c01e2af6 100644 --- a/core/lib/AppFrame/InOutFramework.hpp +++ b/core/lib/AppFrame/InOutFramework.hpp @@ -78,7 +78,7 @@ namespace gpstk */ InOutFramework( const std::string& applName, const std::string& applDesc ) - throw() + noexcept : LoopedFramework(applName, applDesc) {}; @@ -90,7 +90,7 @@ namespace gpstk bool initialize( int argc, char *argv[], bool pretty = true ) - throw() + noexcept { using std::ios; diff --git a/core/lib/AppFrame/LoopedFramework.hpp b/core/lib/AppFrame/LoopedFramework.hpp index 5c56e23f1..e767b2868 100644 --- a/core/lib/AppFrame/LoopedFramework.hpp +++ b/core/lib/AppFrame/LoopedFramework.hpp @@ -75,7 +75,7 @@ namespace gpstk */ LoopedFramework(const std::string& applName, const std::string& applDesc) - throw() + noexcept : BasicFramework(applName, applDesc), timeToDie(false) { } diff --git a/core/lib/ClockModel/ClockModel.hpp b/core/lib/ClockModel/ClockModel.hpp index b64ff85b2..3691fe236 100644 --- a/core/lib/ClockModel/ClockModel.hpp +++ b/core/lib/ClockModel/ClockModel.hpp @@ -60,7 +60,7 @@ namespace gpstk class ClockModel { public: - ClockModel() throw() {}; + ClockModel() noexcept {}; virtual double getOffset(const gpstk::CommonTime& t) const = 0; diff --git a/core/lib/ClockModel/EpochClockModel.hpp b/core/lib/ClockModel/EpochClockModel.hpp index b7e76ef07..f0f11f1fa 100644 --- a/core/lib/ClockModel/EpochClockModel.hpp +++ b/core/lib/ClockModel/EpochClockModel.hpp @@ -66,7 +66,7 @@ namespace gpstk : ObsClockModel(sigma, elmask, mode), valid(false), clkc(0){} #pragma clang diagnostic pop virtual double getOffset(const gpstk::CommonTime& t) const - throw(gpstk::InvalidArgumentException) + noexcept(false) { if (t!=time) { @@ -77,7 +77,7 @@ namespace gpstk }; virtual bool isOffsetValid(const gpstk::CommonTime& t) const - throw(gpstk::InvalidArgumentException) + noexcept(false) { if (t!=time) { @@ -91,12 +91,12 @@ namespace gpstk // An unchecked accessor for programs that don't need the generic // interface double getOffset() const - throw() {return clkc;}; + noexcept {return clkc;}; bool isOffsetValid() const - throw() {return valid;}; + noexcept {return valid;}; - virtual void addEpoch(const ORDEpoch& oe) throw(gpstk::InvalidValue) + virtual void addEpoch(const ORDEpoch& oe) noexcept(false) { gpstk::Stats stat = simpleOrdClock(oe); clkc = stat.Average(); diff --git a/core/lib/ClockModel/LinearClockModel.cpp b/core/lib/ClockModel/LinearClockModel.cpp index 2783e1de6..c191d06a9 100644 --- a/core/lib/ClockModel/LinearClockModel.cpp +++ b/core/lib/ClockModel/LinearClockModel.cpp @@ -49,7 +49,7 @@ namespace gpstk { using namespace std; - void LinearClockModel::reset() throw() + void LinearClockModel::reset() noexcept { startTime = gpstk::CommonTime::END_OF_TIME; endTime = gpstk::CommonTime::BEGINNING_OF_TIME; @@ -60,7 +60,7 @@ namespace gpstk } void LinearClockModel::addEpoch(const ORDEpoch& oe) - throw(gpstk::InvalidValue) + noexcept(false) { ORDEpoch::ORDMap::const_iterator itr; const gpstk::CommonTime t=oe.time; @@ -137,7 +137,7 @@ namespace gpstk } } - void LinearClockModel::dump(std::ostream& s, short detail) const throw() + void LinearClockModel::dump(std::ostream& s, short detail) const noexcept { s << "base: " << baseTime << ", start: " << startTime diff --git a/core/lib/ClockModel/LinearClockModel.hpp b/core/lib/ClockModel/LinearClockModel.hpp index 5b15c51a0..12238231d 100644 --- a/core/lib/ClockModel/LinearClockModel.hpp +++ b/core/lib/ClockModel/LinearClockModel.hpp @@ -64,7 +64,7 @@ namespace gpstk :ObsClockModel(sigma, elmask, mode) {reset();}; virtual double getOffset(const gpstk::CommonTime& t) const - throw() + noexcept { if (!isOffsetValid(t)) return 0; @@ -72,16 +72,16 @@ namespace gpstk return clockModel.Slope()*(t-baseTime) + clockModel.Intercept(); }; - virtual bool isOffsetValid(const gpstk::CommonTime& t) const throw() + virtual bool isOffsetValid(const gpstk::CommonTime& t) const noexcept {return t >= startTime && t <= endTime && clockModel.N() > 1;}; /// Add in the given ord to the clock model - virtual void addEpoch(const ORDEpoch& oe) throw(gpstk::InvalidValue); + virtual void addEpoch(const ORDEpoch& oe) noexcept(false); /// Reset the accumulated statistics on the clock - void reset() throw(); + void reset() noexcept; - void dump(std::ostream& s, short detail=1) const throw(); + void dump(std::ostream& s, short detail=1) const noexcept; friend std::ostream& operator<<(std::ostream& s, const LinearClockModel& r) { r.dump(s, 0); return s; }; diff --git a/core/lib/ClockModel/ORDEpoch.hpp b/core/lib/ClockModel/ORDEpoch.hpp index c90c5d7c3..197ea4b55 100644 --- a/core/lib/ClockModel/ORDEpoch.hpp +++ b/core/lib/ClockModel/ORDEpoch.hpp @@ -62,7 +62,7 @@ namespace gpstk /// defines a store for each SV's ord, indexed by prn typedef std::map ORDMap; - ORDEpoch& removeORD(const SatID& svid) throw() + ORDEpoch& removeORD(const SatID& svid) noexcept { ORDMap::iterator i = ords.find(svid); if(i != ords.end()) @@ -70,7 +70,7 @@ namespace gpstk return *this; } - ORDEpoch& applyClockModel(const ClockModel& cm) throw() + ORDEpoch& applyClockModel(const ClockModel& cm) noexcept { if (cm.isOffsetValid(time)) { @@ -80,7 +80,7 @@ namespace gpstk return *this; } - ORDEpoch& removeOffset(const double offset) throw() + ORDEpoch& removeOffset(const double offset) noexcept { ORDMap::iterator i; for (i = ords.begin(); i != ords.end(); i++) @@ -96,7 +96,7 @@ namespace gpstk friend std::ostream& operator<<(std::ostream& s, const ORDEpoch& oe) - throw() + noexcept { s << "t=" << oe.time << " clk=" << oe.clockOffset << std::endl; diff --git a/core/lib/ClockModel/ObsClockModel.cpp b/core/lib/ClockModel/ObsClockModel.cpp index df9b10396..27599c73f 100644 --- a/core/lib/ClockModel/ObsClockModel.cpp +++ b/core/lib/ClockModel/ObsClockModel.cpp @@ -54,7 +54,7 @@ namespace gpstk ObsClockModel::SvStatus ObsClockModel::getSvStatus(const SatID& svid) const - throw(gpstk::ObjectNotFound) + noexcept(false) { SvStatusMap::const_iterator i = status.find(svid); if(i == status.end()) @@ -70,7 +70,7 @@ namespace gpstk ObsClockModel& ObsClockModel::setSvModeMap(const SvModeMap& right) - throw() + noexcept { for(int prn = 1; prn <= gpstk::MAX_PRN; prn++) modes[SatID(prn, SatID::systemGPS)] = IGNORE; @@ -83,7 +83,7 @@ namespace gpstk ObsClockModel::SvMode ObsClockModel::getSvMode(const SatID& svid) const - throw(gpstk::ObjectNotFound) + noexcept(false) { SvModeMap::const_iterator i = modes.find(svid); if(i == modes.end()) @@ -99,7 +99,7 @@ namespace gpstk gpstk::Stats ObsClockModel::simpleOrdClock(const ORDEpoch& oe) - throw(gpstk::InvalidValue) + noexcept(false) { gpstk::Stats stat; @@ -167,7 +167,7 @@ namespace gpstk return stat; } - void ObsClockModel::dump(ostream& s, short detail) const throw() + void ObsClockModel::dump(ostream& s, short detail) const noexcept { s << "min elev:" << elvmask << ", max sigma:" << sigmam diff --git a/core/lib/ClockModel/ObsClockModel.hpp b/core/lib/ClockModel/ObsClockModel.hpp index d4f7e10c1..9a70c2ef3 100644 --- a/core/lib/ClockModel/ObsClockModel.hpp +++ b/core/lib/ClockModel/ObsClockModel.hpp @@ -94,7 +94,7 @@ namespace gpstk setSvMode(mode); } - virtual void addEpoch(const ORDEpoch& re) throw(gpstk::InvalidValue) = 0; + virtual void addEpoch(const ORDEpoch& re) noexcept(false) = 0; // set accessor methods ---------------------------------------------- @@ -103,7 +103,7 @@ namespace gpstk * @param right #SvModeMap * @return a reference to this object */ - ObsClockModel& setSvModeMap(const SvModeMap& right) throw(); + ObsClockModel& setSvModeMap(const SvModeMap& right) noexcept; /** * set the SvMode for a particular SV. @@ -111,7 +111,7 @@ namespace gpstk * @param mode #SvMode for the SV * @return a reference to this object */ - ObsClockModel& setSvMode(const SatID& svid, const SvMode& mode) throw() + ObsClockModel& setSvMode(const SatID& svid, const SvMode& mode) noexcept { modes[svid] = mode; return *this; } /** @@ -119,7 +119,7 @@ namespace gpstk * @param mode #SvMode for the SVs * @return a reference to this object */ - ObsClockModel& setSvMode(const SvMode& mode) throw() + ObsClockModel& setSvMode(const SvMode& mode) noexcept { for(int prn = 1; prn <= gpstk::MAX_PRN; prn++) { @@ -134,7 +134,7 @@ namespace gpstk * @param right sigma multiple value * @return a reference to this object */ - ObsClockModel& setSigmaMultiplier(double right) throw() + ObsClockModel& setSigmaMultiplier(double right) noexcept { sigmam = right; return *this; } /** @@ -142,13 +142,13 @@ namespace gpstk * @param right elevation mask angle value * @return a reference to this object */ - ObsClockModel& setElevationMask(double right) throw() + ObsClockModel& setElevationMask(double right) noexcept { elvmask = right; return *this; } /** Set useWonkyData true and ords that are flagged as wonky will be included in any clock estimation calculations. **/ - ObsClockModel& setUseWonkyData(bool right) throw() + ObsClockModel& setUseWonkyData(bool right) noexcept { useWonkyData = right; return *this; } // get accessor methods ---------------------------------------------- @@ -158,7 +158,7 @@ namespace gpstk * computation. * @return a const reference to the #SvStatusMap */ - const SvStatusMap& getSvStatusMap() const throw() + const SvStatusMap& getSvStatusMap() const noexcept { return status; }; /** @@ -167,13 +167,13 @@ namespace gpstk * @return #SvStatus * @exception ObjectNotFound an ORD for that SV is not in the map */ - SvStatus getSvStatus(const SatID& svid) const throw(ObjectNotFound); + SvStatus getSvStatus(const SatID& svid) const noexcept(false); /** * get the map indicating how to use each ORD in the bias computation. * @return a const reference to the #SvModeMap */ - const SvModeMap& getSvModeMap() const throw() { return modes; } + const SvModeMap& getSvModeMap() const noexcept { return modes; } /** * get how a particular ORD is to be used in the bias computation. @@ -181,25 +181,25 @@ namespace gpstk * @return #SvMode * @exception ObjectNotFound a mode for that SV is not in the map */ - SvMode getSvMode(const SatID& svid) const throw(ObjectNotFound); + SvMode getSvMode(const SatID& svid) const noexcept(false); /** * returns the sigma multiple value used for ORD stripping. * @return sigma multiple */ - double getSigmaMultiplier() const throw() { return sigmam; } + double getSigmaMultiplier() const noexcept { return sigmam; } /** * returns the elevation mask angle used for ORD stripping. * @return elevation mask angle */ - double getElevationMask() const throw() { return elvmask; } + double getElevationMask() const noexcept { return elvmask; } /** * return the current value of the userWonkyData flag. */ - bool getUseWonkyData() const throw() + bool getUseWonkyData() const noexcept { return useWonkyData; } /** Computes an average of all ORD in the epoch that pass the @@ -208,9 +208,9 @@ namespace gpstk * statistics. This is effectivly a simple single epoch clock * model. */ Stats simpleOrdClock(const ORDEpoch& oe) - throw(InvalidValue); + noexcept(false); - virtual void dump(std::ostream& s, short detail=1) const throw(); + virtual void dump(std::ostream& s, short detail=1) const noexcept; friend std::ostream& operator<<(std::ostream& s, const ObsClockModel& r) { r.dump(s, 0); return s; }; diff --git a/core/lib/ClockModel/ObsEpochMap.cpp b/core/lib/ClockModel/ObsEpochMap.cpp index c140db445..2fcc743b4 100644 --- a/core/lib/ClockModel/ObsEpochMap.cpp +++ b/core/lib/ClockModel/ObsEpochMap.cpp @@ -49,7 +49,7 @@ namespace gpstk // These are just to facilitate debugging. The format of the data output // is quite ad-hoc and may change. std::ostream& operator<<(std::ostream& s, const SvObsEpoch& obs) - throw() + noexcept { SvObsEpoch::const_iterator i; for (i=obs.begin(); i != obs.end(); i++) @@ -62,7 +62,7 @@ namespace gpstk } std::ostream& operator<<(std::ostream& s, const ObsEpoch& oe) - throw() + noexcept { s << oe.time << ", rxClock: " << oe.rxClock << endl; ObsEpoch::const_iterator i; diff --git a/core/lib/ClockModel/ObsEpochMap.hpp b/core/lib/ClockModel/ObsEpochMap.hpp index d0c0ed814..5ee208c2a 100644 --- a/core/lib/ClockModel/ObsEpochMap.hpp +++ b/core/lib/ClockModel/ObsEpochMap.hpp @@ -73,8 +73,8 @@ namespace gpstk /// A time history of the observations collected from a single receiver. typedef std::map ObsEpochMap; - std::ostream& operator<<(std::ostream& s, const SvObsEpoch& obs) throw(); - std::ostream& operator<<(std::ostream& s, const ObsEpoch& oe) throw(); + std::ostream& operator<<(std::ostream& s, const SvObsEpoch& obs) noexcept; + std::ostream& operator<<(std::ostream& s, const ObsEpoch& oe) noexcept; //@} diff --git a/core/lib/ClockModel/ObsRngDev.cpp b/core/lib/ClockModel/ObsRngDev.cpp index ccb6554a9..a47f9af29 100644 --- a/core/lib/ClockModel/ObsRngDev.cpp +++ b/core/lib/ClockModel/ObsRngDev.cpp @@ -261,7 +261,7 @@ namespace gpstk } std::ostream& operator<<(std::ostream& s, const ObsRngDev& ord) - throw() + noexcept { std::ios::fmtflags oldFlags = s.flags(); s << "t=" << printTime(ord.obstime,"%Y/%03j %02H:%02M:%04.1f") diff --git a/core/lib/ClockModel/ObsRngDev.hpp b/core/lib/ClockModel/ObsRngDev.hpp index 484eea69e..0aa863fca 100644 --- a/core/lib/ClockModel/ObsRngDev.hpp +++ b/core/lib/ClockModel/ObsRngDev.hpp @@ -75,7 +75,7 @@ namespace gpstk * Creates an empty, useless object to facilitate STL * containers of this object. */ - ObsRngDev() throw() + ObsRngDev() noexcept : obstime(CommonTime::END_OF_TIME), wonky(0) {} /** * constructor. @@ -218,65 +218,65 @@ namespace gpstk double gamma = GAMMA_GPS); /// destructor - virtual ~ObsRngDev() throw() {} + virtual ~ObsRngDev() noexcept {} // get accessor methods ---------------------------------------------- /** * returns the time of the SV observation * \return time of SV observation */ - const CommonTime& getTime() const throw() { return obstime; } + const CommonTime& getTime() const noexcept { return obstime; } /** * returns the observed SV's identifier * \return svid */ - SatID getSvID() const throw() { return svid; } + SatID getSvID() const noexcept { return svid; } /** * returns the SV azimuth angle (in degrees) in relation to the rx * \return SV azimuth angle */ - vfloat getAzimuth() const throw() { return azimuth; } + vfloat getAzimuth() const noexcept { return azimuth; } /** * returns elevation (in degrees) of the SV in relation to the rx * \return SV elevation angle */ - vfloat getElevation() const throw() { return elevation; } + vfloat getElevation() const noexcept { return elevation; } /** * returns the 6-bit SV health bitfield from epehemeris, subframe 1 * \return SV health bitfield */ - vshort getHealth() const throw() { return health; } + vshort getHealth() const noexcept { return health; } /** * returns the Issue Of Data, Clock (IODC) from ephemeris, subframe 1 * \return ephemeris IODC */ - vshort getIODC() const throw() { return iodc; } + vshort getIODC() const noexcept { return iodc; } /** * returns the observed range deviation (ORD) (in meters) * \returns ORD */ - double getORD() const throw() { return ord; } + double getORD() const noexcept { return ord; } /** * returns the ionospheric offset (in meters) * \returns ionospheric offset */ - vdouble getIono() const throw() { return iono; } + vdouble getIono() const noexcept { return iono; } /** * returns the tropospheric offset (in meters) * \returns tropospheric offset */ - vdouble getTrop() const throw() { return trop; } + vdouble getTrop() const noexcept { return trop; } friend std::ostream& operator<<(std::ostream& s, - const ObsRngDev& r) throw(); + const ObsRngDev& r) noexcept; void applyClockOffset(double clockOffset) {ord -= clockOffset;} diff --git a/core/lib/CommandLine/CommandLine.cpp b/core/lib/CommandLine/CommandLine.cpp index f70cc2a32..b3d989a50 100644 --- a/core/lib/CommandLine/CommandLine.cpp +++ b/core/lib/CommandLine/CommandLine.cpp @@ -73,7 +73,7 @@ using namespace StringUtils; // the main entry point int CommandLine::ProcessCommandLine(int argc, char** argv, string PrgmDesc, string& Usage, string& Errors, vector& Unrecog) - throw(Exception) + noexcept(false) { try { int i,j; @@ -169,7 +169,7 @@ catch(...) { Exception e("Unknown exception"); GPSTK_THROW(e); } // ----------------------------------------------------------------------------------- // public -void CommandLine::DumpConfiguration(ostream& os, string tag) throw(Exception) +void CommandLine::DumpConfiguration(ostream& os, string tag) noexcept(false) { try { size_t i,j; @@ -280,7 +280,7 @@ catch(...) { Exception e("Unknown exception"); GPSTK_THROW(e); } // the rest are private // ----------------------------------------------------------------------------------- -bool CommandLine::ValidateCommandLine(string& msg) throw(Exception) +bool CommandLine::ValidateCommandLine(string& msg) noexcept(false) { try { bool isValid(true); @@ -364,7 +364,7 @@ catch(...) { Exception e("Unknown exception"); GPSTK_THROW(e); } } // ----------------------------------------------------------------------------------- -void CommandLine::BuildSyntaxPage(void) throw(Exception) +void CommandLine::BuildSyntaxPage(void) noexcept(false) { try { size_t i,j,k; @@ -459,7 +459,7 @@ catch(...) { Exception e("Unknown exception"); GPSTK_THROW(e); } // ----------------------------------------------------------------------------------- // re-entrant! void CommandLine::PreProcessArgs(const char *in_arg, vector& Args, - string& Errors) throw(Exception) + string& Errors) noexcept(false) { try { static bool found_cfg_file=false; @@ -612,7 +612,7 @@ catch(...) { Exception e("Unknown exception"); GPSTK_THROW(e); } // ----------------------------------------------------------------------------------- void expand_args(vector& oldvalues, vector& newvalues, string& msg) - throw(Exception) + noexcept(false) { try { string arg; @@ -650,7 +650,7 @@ catch(...) { Exception e("Unknown exception"); GPSTK_THROW(e); } // ----------------------------------------------------------------------------------- // fill values for each option, and Errors and Unrecog void CommandLine::Parse(vector& Args, string& Errors, vector& Unrecog) - throw(Exception) + noexcept(false) { try { size_t i,j; @@ -737,7 +737,7 @@ catch(...) { Exception e("Unknown exception"); GPSTK_THROW(e); } } // ----------------------------------------------------------------------------------- -string CommandLine::SyntaxPage(void) throw(Exception) +string CommandLine::SyntaxPage(void) noexcept(false) { try { if(syntaxPageBuilt == 2) { @@ -769,7 +769,7 @@ catch(...) { Exception e("Unknown exception"); GPSTK_THROW(e); } // ----------------------------------------------------------------------------------- void CommandLine::Postprocess(string& Errors, vector& Unrecog) - throw(Exception) + noexcept(false) { try { size_t i,k; diff --git a/core/lib/CommandLine/CommandLine.hpp b/core/lib/CommandLine/CommandLine.hpp index f003e3924..61704773d 100644 --- a/core/lib/CommandLine/CommandLine.hpp +++ b/core/lib/CommandLine/CommandLine.hpp @@ -289,7 +289,7 @@ class CommandLine { // ------------------------------------------------------------- /// Define the text after 'Usage: '; default is ' [options] ...' - void DefineUsageString(std::string str) throw() + void DefineUsageString(std::string str) noexcept { syntaxPage = "Usage: " + str; syntaxPageBuilt = 1; @@ -309,37 +309,37 @@ class CommandLine { /// 1 help was requested int ProcessCommandLine(int argc, char** argv, std::string PrgmDesc, std::string& Usage, std::string& Errors, std::vector& Unrec) - throw(gpstk::Exception); + noexcept(false); /// Dump the configuration. Output is of the form /// longOpt Descript : values /// if tag is not empty (the default), begin each line with it. void DumpConfiguration(std::ostream& os, std::string tag=std::string()) - throw(gpstk::Exception); + noexcept(false); private: /// determine if the command line, as declared, is valid - bool ValidateCommandLine(std::string& msg) throw(gpstk::Exception); + bool ValidateCommandLine(std::string& msg) noexcept(false); /// Build the syntax page - void BuildSyntaxPage(void) throw(gpstk::Exception); + void BuildSyntaxPage(void) noexcept(false); /// Preprocess the arguments by pulling out debug, etc, replace deprecated options, /// drop ignored options, open --file files, open list files (@file) and parse /// comma-separated values void PreProcessArgs(const char *arg, std::vector& Args, - std::string& Errors) throw(gpstk::Exception); + std::string& Errors) noexcept(false); /// Parse the (preprocessed) list of args void Parse(std::vector& Args, std::string& Errors, - std::vector& Unrecog) throw(gpstk::Exception); + std::vector& Unrecog) noexcept(false); /// Generate the usage string (syntax page) - std::string SyntaxPage(void) throw(gpstk::Exception); + std::string SyntaxPage(void) noexcept(false); /// Post process - convert value strings to real values void Postprocess(std::string& Errors, std::vector& Unrecog) - throw(gpstk::Exception); + noexcept(false); }; // end class CommandLine diff --git a/core/lib/CommandLine/CommandOption.hpp b/core/lib/CommandLine/CommandOption.hpp index 1434bd4e3..57a5c3628 100644 --- a/core/lib/CommandLine/CommandOption.hpp +++ b/core/lib/CommandLine/CommandOption.hpp @@ -295,7 +295,7 @@ namespace gpstk /// Destructor virtual ~CommandOptionNoArg() {} /// Returns true if this option was found on the command line - operator bool() const throw() { return (getCount() != 0); } + operator bool() const noexcept { return (getCount() != 0); } protected: /// Default Constructor diff --git a/core/lib/FileDirProc/FileFilterFrame.hpp b/core/lib/FileDirProc/FileFilterFrame.hpp index cbeec5eed..02ed742ef 100644 --- a/core/lib/FileDirProc/FileFilterFrame.hpp +++ b/core/lib/FileDirProc/FileFilterFrame.hpp @@ -76,7 +76,7 @@ namespace gpstk gpstk::CommonTime::BEGINNING_OF_TIME, const gpstk::CommonTime& end = gpstk::CommonTime::END_OF_TIME) - throw(gpstk::Exception); + noexcept(false); /// Takes a list of files to open in lieu of day times FileFilterFrame(const std::vector& fileList, @@ -84,7 +84,7 @@ namespace gpstk gpstk::CommonTime::BEGINNING_OF_TIME, const gpstk::CommonTime& end = gpstk::CommonTime::END_OF_TIME) - throw(gpstk::Exception); + noexcept(false); /// Takes a file name for a single file filter. /// This can throw an exception when there's a file error. @@ -93,7 +93,7 @@ namespace gpstk gpstk::CommonTime::BEGINNING_OF_TIME, const gpstk::CommonTime& end = gpstk::CommonTime::END_OF_TIME) - throw(gpstk::Exception); + noexcept(false); /// Uses the FileSpec to retrieve files. Use filter like you would /// in FileHunter, to filter FOR stations, receivers, etc. @@ -105,7 +105,7 @@ namespace gpstk gpstk::CommonTime::END_OF_TIME, const std::vector& filter = std::vector()) - throw(gpstk::Exception); + noexcept(false); /// Gets the files from the file spec and the time, then adds /// the data to the filter. Use filter like you would @@ -118,7 +118,7 @@ namespace gpstk gpstk::CommonTime::END_OF_TIME, const std::vector& filter = std::vector()) - throw(gpstk::Exception); + noexcept(false); /// Reads in the file and adds the data to the filter. FileFilterFrame& @@ -127,7 +127,7 @@ namespace gpstk gpstk::CommonTime::BEGINNING_OF_TIME, const gpstk::CommonTime& end = gpstk::CommonTime::END_OF_TIME) - throw(gpstk::Exception); + noexcept(false); /// Takes a list of files to open in lieu of day times FileFilterFrame& @@ -136,7 +136,7 @@ namespace gpstk gpstk::CommonTime::BEGINNING_OF_TIME, const gpstk::CommonTime& end = gpstk::CommonTime::END_OF_TIME) - throw(gpstk::Exception); + noexcept(false); virtual ~FileFilterFrame() {} @@ -152,7 +152,7 @@ namespace gpstk */ bool writeFile(const std::string& outputFile, const bool append = false) const - throw(gpstk::Exception); + noexcept(false); /** * Writes the data to the supplied stream. @@ -164,13 +164,13 @@ namespace gpstk * FileFilterFrameWithHeader for those file types. */ bool writeFile(FileStream& stream) const - throw(gpstk::Exception); + noexcept(false); protected: /// Run init() to load the data into the filter. void init(const std::vector& filter= std::vector()) - throw(gpstk::Exception); + noexcept(false); protected: @@ -187,7 +187,7 @@ namespace gpstk FileFilterFrame :: FileFilterFrame(const gpstk::CommonTime& start, const gpstk::CommonTime& end) - throw(gpstk::Exception) + noexcept(false) : startTime(start), endTime(end) {} @@ -196,7 +196,7 @@ namespace gpstk FileFilterFrame(const std::vector& fileList, const gpstk::CommonTime& start, const gpstk::CommonTime& end) - throw(gpstk::Exception) + noexcept(false) : startTime(start), endTime(end) { typename std::vector::const_iterator itr; @@ -212,7 +212,7 @@ namespace gpstk FileFilterFrame(const std::string& filename, const gpstk::CommonTime& start, const gpstk::CommonTime& end) - throw(gpstk::Exception) + noexcept(false) : fs(filename), startTime(start), endTime(end) { init(); @@ -224,7 +224,7 @@ namespace gpstk const gpstk::CommonTime& start, const gpstk::CommonTime& end, const std::vector& filter) - throw(gpstk::Exception) + noexcept(false) : fs(spec), startTime(start), endTime(end) { init(filter); @@ -237,7 +237,7 @@ namespace gpstk const gpstk::CommonTime& start, const gpstk::CommonTime& end, const std::vector& filter) - throw(gpstk::Exception) + noexcept(false) { startTime = start; endTime = end; @@ -253,7 +253,7 @@ namespace gpstk newSource(const std::string& filename, const gpstk::CommonTime& start, const gpstk::CommonTime& end) - throw(gpstk::Exception) + noexcept(false) { startTime = start; endTime = end; @@ -269,7 +269,7 @@ namespace gpstk newSource(const std::vector& fileList, const gpstk::CommonTime& start, const gpstk::CommonTime& end) - throw(gpstk::Exception) + noexcept(false) { startTime = start; endTime = end; @@ -287,7 +287,7 @@ namespace gpstk void FileFilterFrame :: init(const std::vector& filter) - throw(gpstk::Exception) + noexcept(false) { // find the files FileHunter fh(fs); @@ -322,7 +322,7 @@ namespace gpstk bool FileFilterFrame :: writeFile(const std::string& str, const bool append) const - throw(gpstk::Exception) + noexcept(false) { if (!this->dataVec.empty()) { @@ -345,7 +345,7 @@ namespace gpstk template bool FileFilterFrame :: writeFile(FileStream& stream) - const throw(gpstk::Exception) + const noexcept(false) { if (!this->dataVec.empty()) { diff --git a/core/lib/FileDirProc/FileFilterFrameWithHeader.hpp b/core/lib/FileDirProc/FileFilterFrameWithHeader.hpp index 0b4881996..d84b9d09a 100644 --- a/core/lib/FileDirProc/FileFilterFrameWithHeader.hpp +++ b/core/lib/FileDirProc/FileFilterFrameWithHeader.hpp @@ -78,7 +78,7 @@ namespace gpstk gpstk::CommonTime::BEGINNING_OF_TIME, const gpstk::CommonTime& end = gpstk::CommonTime::END_OF_TIME) - throw(gpstk::Exception) : + noexcept(false) : FileFilterFrame(start, end) {} @@ -88,7 +88,7 @@ namespace gpstk gpstk::CommonTime::BEGINNING_OF_TIME, const gpstk::CommonTime& end = gpstk::CommonTime::END_OF_TIME) - throw(gpstk::Exception) : + noexcept(false) : FileFilterFrame(fileList, start, end) { std::vector::const_iterator itr = fileList.begin(); @@ -107,7 +107,7 @@ namespace gpstk gpstk::CommonTime::BEGINNING_OF_TIME, const gpstk::CommonTime& end = gpstk::CommonTime::END_OF_TIME) - throw(gpstk::Exception) : + noexcept(false) : FileFilterFrame(filename, start, end) {init();} @@ -121,7 +121,7 @@ namespace gpstk gpstk::CommonTime::END_OF_TIME, const std::vector& filter = std::vector()) - throw(gpstk::Exception) : + noexcept(false) : FileFilterFrame(spec, start, end, filter) {init(filter);} @@ -136,7 +136,7 @@ namespace gpstk gpstk::CommonTime::END_OF_TIME, const std::vector& filter = std::vector()) - throw(gpstk::Exception) + noexcept(false) { FileFilterFrame::newSource(filespec, start, end, filter); @@ -151,7 +151,7 @@ namespace gpstk gpstk::CommonTime::BEGINNING_OF_TIME, const gpstk::CommonTime& end = gpstk::CommonTime::END_OF_TIME) - throw(gpstk::Exception) + noexcept(false) { FileFilterFrame::newSource(filename, start, end); @@ -166,7 +166,7 @@ namespace gpstk gpstk::CommonTime::BEGINNING_OF_TIME, const gpstk::CommonTime& end = gpstk::CommonTime::END_OF_TIME) - throw(gpstk::Exception) + noexcept(false) { FileFilterFrame::newSource(fileList, start, end); @@ -190,7 +190,7 @@ namespace gpstk */ bool writeFile(const std::string& outputFile, const FileHeader& fh) const - throw(gpstk::Exception); + noexcept(false); /// Returns a list of the data in *this that isn't in r. template @@ -255,16 +255,16 @@ namespace gpstk { return headerList.size(); } typename std::list::const_iterator beginHeader() const - throw(gpstk::InvalidRequest); + noexcept(false); typename std::list::const_iterator endHeader() const - throw(gpstk::InvalidRequest); + noexcept(false); typename std::list::iterator beginHeader() - throw(gpstk::InvalidRequest); + noexcept(false); typename std::list::iterator endHeader() - throw(gpstk::InvalidRequest); + noexcept(false); bool emptyHeader() const { return headerList.empty(); } @@ -273,26 +273,26 @@ namespace gpstk { return headerList.size(); } FileHeader& frontHeader() - throw(gpstk::InvalidRequest); + noexcept(false); const FileHeader& frontHeader() const - throw(gpstk::InvalidRequest); + noexcept(false); FileHeader& backHeader() - throw(gpstk::InvalidRequest); + noexcept(false); const FileHeader& backHeader() const - throw(gpstk::InvalidRequest); + noexcept(false); protected: /// Run init() to load the data into the filter. void init(const std::vector& filter= std::vector()) - throw(gpstk::Exception); + noexcept(false); /// Check to make sure headerList is empty /// @throw InvalidRequest if headerList is empty - inline void chl(const std::string& req) throw(gpstk::InvalidRequest) + inline void chl(const std::string& req) noexcept(false) { gpstk::InvalidRequest exc("Header list is empty attempting to" " satisfy "+req+" request."); @@ -312,7 +312,7 @@ namespace gpstk bool FileFilterFrameWithHeader:: writeFile(const std::string& outputFile, const FileHeader& fh) const - throw(gpstk::Exception) + noexcept(false) { // make the directory (if needed) std::string::size_type pos = outputFile.rfind('/'); @@ -334,7 +334,7 @@ namespace gpstk template typename std::list::const_iterator FileFilterFrameWithHeader::beginHeader() - const throw(gpstk::InvalidRequest) + const noexcept(false) { try { chl("beginHeader"); } catch(gpstk::InvalidRequest exc) @@ -345,7 +345,7 @@ namespace gpstk template typename std::list::const_iterator FileFilterFrameWithHeader::endHeader() - const throw(gpstk::InvalidRequest) + const noexcept(false) { try { chl("endHeader"); } catch(gpstk::InvalidRequest exc) @@ -356,7 +356,7 @@ namespace gpstk template typename std::list::iterator FileFilterFrameWithHeader::beginHeader() - throw(gpstk::InvalidRequest) + noexcept(false) { try { chl("beginHeader"); } catch(gpstk::InvalidRequest exc) @@ -368,7 +368,7 @@ namespace gpstk template typename std::list::iterator FileFilterFrameWithHeader::endHeader() - throw(gpstk::InvalidRequest) + noexcept(false) { try { chl("endHeader"); } catch(gpstk::InvalidRequest exc) @@ -379,7 +379,7 @@ namespace gpstk template FileHeader& FileFilterFrameWithHeader::frontHeader() - throw(gpstk::InvalidRequest) + noexcept(false) { try { chl("frontHeader"); } catch(gpstk::InvalidRequest exc) @@ -391,7 +391,7 @@ namespace gpstk template const FileHeader& FileFilterFrameWithHeader::frontHeader() - const throw(gpstk::InvalidRequest) + const noexcept(false) { try { chl("frontHeader"); } catch(gpstk::InvalidRequest exc) @@ -403,7 +403,7 @@ namespace gpstk template FileHeader& FileFilterFrameWithHeader::backHeader() - throw(gpstk::InvalidRequest) + noexcept(false) { try { chl("backHeader"); } catch(gpstk::InvalidRequest exc) @@ -415,7 +415,7 @@ namespace gpstk template const FileHeader& FileFilterFrameWithHeader::backHeader() - const throw(gpstk::InvalidRequest) + const noexcept(false) { try { chl("backHeader"); } catch(gpstk::InvalidRequest exc) @@ -427,7 +427,7 @@ namespace gpstk void FileFilterFrameWithHeader :: init(const std::vector& filter) - throw(gpstk::Exception) + noexcept(false) { // find the files FileHunter fh(this->fs); diff --git a/core/lib/FileDirProc/FileSpec.cpp b/core/lib/FileDirProc/FileSpec.cpp index 93162dac5..5bd6da2b6 100644 --- a/core/lib/FileDirProc/FileSpec.cpp +++ b/core/lib/FileDirProc/FileSpec.cpp @@ -102,7 +102,7 @@ namespace gpstk } string FileSpec::convertFileSpecType(const FileSpecType fst) - throw(FileSpecException) + noexcept(false) { if (fst == station) return string("n"); else if (fst == receiver) return string("r"); @@ -141,7 +141,7 @@ namespace gpstk } FileSpec::FileSpecType FileSpec::convertFileSpecType(const string& fst) - throw(FileSpecException) + noexcept(false) { if (fst == string("n")) return station; else if (fst == string("r")) return receiver; @@ -182,7 +182,7 @@ namespace gpstk string FileSpec::createSearchString() const - throw(FileSpecException) + noexcept(false) { string searchString; @@ -216,7 +216,7 @@ namespace gpstk string FileSpec::extractField(const string& filename, const FileSpecType fst) const - throw(FileSpecException) + noexcept(false) { // stupidity check - is it a valid FST? if ((fst <= unknown) || (fst >= end)) @@ -246,7 +246,7 @@ namespace gpstk } bool FileSpec::hasField(const FileSpecType fst) const - throw(FileSpecException) + noexcept(false) { vector::const_iterator itr = fileSpecList.begin(); while (itr != fileSpecList.end()) @@ -267,7 +267,7 @@ namespace gpstk CommonTime FileSpec::extractCommonTime(const string& filename) const - throw(FileSpecException) + noexcept(false) { // this uses CommonTime::setToString to get the time out try @@ -342,7 +342,7 @@ namespace gpstk void FileSpec::sortList(vector& fileList, const FileSpecSortType fsst) const - throw(FileSpecException) + noexcept(false) { FileSpecSort q(*this, fsst); stable_sort(fileList.begin(), fileList.end(), q); @@ -426,7 +426,7 @@ namespace gpstk } void FileSpec::init(const string& fileSpec) - throw(FileSpecException) + noexcept(false) { try { diff --git a/core/lib/FileDirProc/FileSpec.hpp b/core/lib/FileDirProc/FileSpec.hpp index e904f5764..1211eada8 100644 --- a/core/lib/FileDirProc/FileSpec.hpp +++ b/core/lib/FileDirProc/FileSpec.hpp @@ -144,7 +144,7 @@ namespace gpstk /// Constructor with a string to parse FileSpec(const std::string& fileSpec) - throw(FileSpecException) + noexcept(false) {init(fileSpec);} /// Destructor @@ -152,7 +152,7 @@ namespace gpstk /// Reinitializes this FileSpec with the new string virtual FileSpec& newSpec(const std::string& fileSpec) - throw(FileSpecException) + noexcept(false) {init(fileSpec); return *this;} /// Returns the string of the filespec @@ -166,7 +166,7 @@ namespace gpstk * @throw FileSpecException when there's an error in the FileSpec */ virtual std::string createSearchString() const - throw(FileSpecException); + noexcept(false); /** * Given a file name and a field, returns that field from the string. @@ -178,14 +178,14 @@ namespace gpstk */ virtual std::string extractField(const std::string& filename, const FileSpecType) const - throw(FileSpecException); + noexcept(false); /** * Given a field type, returns true if the FileSpec has that field. * @throw FileSpecException when you pass in an invalid FileSpecType */ virtual bool hasField(const FileSpecType) const - throw(FileSpecException); + noexcept(false); /** * If possible, returns a CommonTime object with the time the file @@ -195,7 +195,7 @@ namespace gpstk */ virtual gpstk::CommonTime extractCommonTime(const std::string& filename) const - throw(FileSpecException); + noexcept(false); /** * For the given FileSpec, fills in the fields with the given @@ -225,7 +225,7 @@ namespace gpstk */ virtual void sortList(std::vector& fileList, const FileSpecSortType fsst = ascending) const - throw(FileSpecException); + noexcept(false); /// semi-nicely print the FileSpec to the stream. virtual void dump(std::ostream& o) const; @@ -233,7 +233,7 @@ namespace gpstk protected: /// Parses the string into the FileSpec object virtual void init(const std::string& fileSpec) - throw(FileSpecException); + noexcept(false); public: /** @@ -242,7 +242,7 @@ namespace gpstk * any known types */ static std::string convertFileSpecType(const FileSpecType) - throw(FileSpecException); + noexcept(false); /** * Converts the string into its corresponding FileSpecType @@ -250,7 +250,7 @@ namespace gpstk * any known types */ static FileSpecType convertFileSpecType(const std::string&) - throw(FileSpecException); + noexcept(false); protected: /// This is an internal, private class of FileSpec that holds diff --git a/core/lib/FileDirProc/FileStore.hpp b/core/lib/FileDirProc/FileStore.hpp index 86870f431..c8f1d561d 100644 --- a/core/lib/FileDirProc/FileStore.hpp +++ b/core/lib/FileDirProc/FileStore.hpp @@ -67,7 +67,7 @@ namespace gpstk public: /// Constructor. - FileStore() throw() {}; + FileStore() noexcept {}; /// destructor ~FileStore() {}; @@ -84,7 +84,7 @@ namespace gpstk /// Add a filename, with its header, to the store void addFile(const std::string& fn, HeaderType& header) - throw(InvalidRequest) + noexcept(false) { if(headerMap.find(fn) != headerMap.end()) { dump(std::cout, 1); @@ -96,7 +96,7 @@ namespace gpstk /// Access the header for a given filename const HeaderType& getHeader(const std::string& fn) const - throw(InvalidRequest) + noexcept(false) { typename std::map::const_iterator iter_fn = headerMap.find(fn); if( iter_fn == headerMap.end()) @@ -112,7 +112,7 @@ namespace gpstk /// dump a list of file names void dump(std::ostream& os = std::cout, short detail = 0) - const throw() + const noexcept { int n(0); os << "Dump of FileStore\n"; @@ -130,16 +130,16 @@ namespace gpstk /// Clear the contents of the (filename, header) map void clear() - throw() + noexcept { headerMap.clear(); } /// Return the size of the (filename,header) map - unsigned size() const throw() { return headerMap.size(); } + unsigned size() const noexcept { return headerMap.size(); } - unsigned nfiles() const throw() { return size(); } + unsigned nfiles() const noexcept { return size(); } }; // end class FileStore diff --git a/core/lib/FileDirProc/RTFileFrame.hpp b/core/lib/FileDirProc/RTFileFrame.hpp index 09aaea7fb..4b7f20cd9 100644 --- a/core/lib/FileDirProc/RTFileFrame.hpp +++ b/core/lib/FileDirProc/RTFileFrame.hpp @@ -241,7 +241,7 @@ namespace gpstk const gpstk::CommonTime& ending = gpstk::CommonTime::END_OF_TIME, const FileReadingMode frm = AppendedData, const GetRecordMode grm = Dumb) - throw(gpstk::Exception); + noexcept(false); /// destructor ~RTFileFrame(); @@ -349,7 +349,7 @@ namespace gpstk const gpstk::CommonTime& ending, const RTFileFrameHelper::FileReadingMode frm, const RTFileFrameHelper::GetRecordMode grm) - throw(gpstk::Exception) + noexcept(false) : fileStream(NULL), fs(fnFormat), startTime(beginning), currentTime(beginning), endTime(ending), readMode(frm), getMode(grm) { diff --git a/core/lib/FileHandling/Binex/BinexData.cpp b/core/lib/FileHandling/Binex/BinexData.cpp index 487dce0cd..d1ae169a7 100644 --- a/core/lib/FileHandling/Binex/BinexData.cpp +++ b/core/lib/FileHandling/Binex/BinexData.cpp @@ -80,7 +80,7 @@ namespace gpstk // ------------------------------------------------------------------------- BinexData::UBNXI::UBNXI(unsigned long ul) - throw(FFStreamError) + noexcept(false) { if (ul < 128) { @@ -119,7 +119,7 @@ namespace gpstk const std::string& inBuffer, size_t offset, bool littleEndian) - throw(FFStreamError) + noexcept(false) { if (offset > inBuffer.size() ) { @@ -271,7 +271,7 @@ namespace gpstk size_t offset, bool reverseBytes, bool littleEndian) - throw(FFStreamError) + noexcept(false) { unsigned char mask = 0; char buffer [MAX_BYTES]; @@ -335,7 +335,7 @@ namespace gpstk size_t offset, bool reverseBytes, bool littleEndian) const - throw(FFStreamError) + noexcept(false) { std::string buffer; encode(buffer, 0, littleEndian); @@ -381,7 +381,7 @@ namespace gpstk // ------------------------------------------------------------------------- BinexData::MGFZI::MGFZI(long long ll) - throw(FFStreamError) + noexcept(false) { value = ll; long long absValue = llabs(ll); @@ -437,7 +437,7 @@ namespace gpstk const std::string& inBuffer, size_t offset, bool littleEndian) - throw(FFStreamError) + noexcept(false) { long long absValue = 0; unsigned char flags; @@ -813,7 +813,7 @@ namespace gpstk size_t offset, bool reverseBytes, bool littleEndian) - throw(FFStreamError) + noexcept(false) { unsigned char buffer [MAX_BYTES]; unsigned char flags; @@ -874,7 +874,7 @@ namespace gpstk size_t offset, bool reverseBytes, bool littleEndian) const - throw(FFStreamError) + noexcept(false) { std::string buffer; encode(buffer, 0, littleEndian); @@ -930,7 +930,7 @@ namespace gpstk // ------------------------------------------------------------------------- BinexData::BinexData(RecordID recordID, SyncByte recordFlags) - throw() + noexcept { setRecordFlags(recordFlags); setRecordID(recordID); @@ -959,7 +959,7 @@ namespace gpstk // ------------------------------------------------------------------------- BinexData& BinexData::setRecordID(RecordID id) - throw(FFStreamError) + noexcept(false) { if (id > UBNXI::MAX_VALUE) { @@ -1023,7 +1023,7 @@ namespace gpstk // ------------------------------------------------------------------------- BinexData& BinexData::ensureMessageCapacity(size_t cap) - throw(InvalidParameter) + noexcept(false) { if (cap > UBNXI::MAX_VALUE) { @@ -1056,7 +1056,7 @@ namespace gpstk BinexData::updateMessageData( size_t& offset, const UBNXI& data) - throw(FFStreamError, InvalidParameter) + noexcept(false) { bool littleEndian = ( (syncByte & eBigEndian) == 0) ? true : false; ensureMessageCapacity(offset + data.getSize() ); @@ -1070,7 +1070,7 @@ namespace gpstk BinexData::updateMessageData( size_t& offset, const MGFZI& data) - throw(FFStreamError, InvalidParameter) + noexcept(false) { bool littleEndian = ( (syncByte & eBigEndian) == 0) ? true : false; ensureMessageCapacity(offset + data.getSize() ); @@ -1085,7 +1085,7 @@ namespace gpstk size_t& offset, const std::string& data, size_t size) - throw(FFStreamError, InvalidParameter) + noexcept(false) { ensureMessageCapacity(offset + size); if (size > data.size() ) @@ -1107,7 +1107,7 @@ namespace gpstk size_t& offset, const char *data, size_t size) - throw(FFStreamError, InvalidParameter) + noexcept(false) { ensureMessageCapacity(offset + size); msg.replace(offset, size, data, size); @@ -1120,7 +1120,7 @@ namespace gpstk BinexData::extractMessageData( size_t& offset, UBNXI& data) - throw(FFStreamError, InvalidParameter) + noexcept(false) { if (offset > msg.size() ) { @@ -1139,7 +1139,7 @@ namespace gpstk BinexData::extractMessageData( size_t& offset, MGFZI& data) - throw(FFStreamError, InvalidParameter) + noexcept(false) { if (offset > msg.size() ) { @@ -1159,7 +1159,7 @@ namespace gpstk size_t& offset, std::string& data, size_t size) const - throw(InvalidParameter) + noexcept(false) { if (offset + size > msg.size() ) { @@ -1176,8 +1176,7 @@ namespace gpstk // ------------------------------------------------------------------------- void BinexData::reallyPutRecord(FFStream& ffs) const - throw(std::exception, FFStreamError, - StringUtils::StringException) + noexcept(false) { if (NULL == dynamic_cast(&ffs)) { @@ -1191,8 +1190,7 @@ namespace gpstk // ------------------------------------------------------------------------- void BinexData::putRecord(std::ostream& strm) const - throw(std::exception, FFStreamError, - StringUtils::StringException) + noexcept(false) { try { @@ -1269,7 +1267,7 @@ namespace gpstk // ------------------------------------------------------------------------- void BinexData::reallyGetRecord(FFStream& ffs) - throw(std::exception, FFStreamError, StringUtils::StringException) + noexcept(false) { if (NULL == dynamic_cast(&ffs)) { @@ -1282,7 +1280,7 @@ namespace gpstk // ------------------------------------------------------------------------- size_t BinexData::getRecord(std::istream& strm) - throw(std::exception, FFStreamError, StringUtils::StringException) + noexcept(false) { size_t offset = 0; @@ -1658,7 +1656,7 @@ namespace gpstk BinexData::parseBuffer(const std::string& buffer, size_t offset, size_t size) - throw(FFStreamError) + noexcept(false) { unsigned long long value = 0; if (size > sizeof(value) ) diff --git a/core/lib/FileHandling/Binex/BinexData.hpp b/core/lib/FileHandling/Binex/BinexData.hpp index b69e5e3c3..4a8c28c89 100644 --- a/core/lib/FileHandling/Binex/BinexData.hpp +++ b/core/lib/FileHandling/Binex/BinexData.hpp @@ -116,7 +116,7 @@ namespace gpstk * Constructor with unsigned long initialization value. */ UBNXI(unsigned long ul) - throw(FFStreamError); + noexcept(false); /** * Copies another UBNXI. @@ -215,7 +215,7 @@ namespace gpstk decode(const std::string& inBuffer, size_t offset = 0, bool littleEndian = false) - throw(FFStreamError); + noexcept(false); /** * Converts the UBNXI to a series of bytes placed in outBuffer. @@ -252,7 +252,7 @@ namespace gpstk size_t offset = 0, bool reverseBytes = false, bool littleEndian = false) - throw(FFStreamError); + noexcept(false); /** * Attempts to write the UBNXI to the specified output stream. @@ -273,7 +273,7 @@ namespace gpstk size_t offset = 0, bool reverseBytes = false, bool littleEndian = false) const - throw(FFStreamError); + noexcept(false); protected: @@ -313,7 +313,7 @@ namespace gpstk * Constructor with a long long initialization value. */ MGFZI(long long ll) - throw(FFStreamError); + noexcept(false); /** * Copies another MGFZI. @@ -412,7 +412,7 @@ namespace gpstk decode(const std::string& inBuffer, size_t offset = 0, bool littleEndian = false) - throw(FFStreamError); + noexcept(false); /** * Converts the MGFZI to a series of bytes placed in outBuffer. @@ -446,7 +446,7 @@ namespace gpstk size_t offset = 0, bool reverseBytes = false, bool littleEndian = false) - throw(FFStreamError); + noexcept(false); /** * Attempts to write the MGFZI to the specified output stream. @@ -465,7 +465,7 @@ namespace gpstk size_t offset = 0, bool reverseBytes = false, bool littleEndian = false) const - throw(FFStreamError); + noexcept(false); protected: @@ -488,7 +488,7 @@ namespace gpstk */ BinexData(RecordID recordID, SyncByte recordFlags = DEFAULT_RECORD_FLAGS) - throw(); + noexcept; /** * Copies another BinexData object. @@ -566,7 +566,7 @@ namespace gpstk */ BinexData& setRecordID(RecordID id) - throw(FFStreamError); + noexcept(false); /** * Returns the number of bytes required to represent the entire record @@ -590,7 +590,7 @@ namespace gpstk */ BinexData& ensureMessageCapacity(size_t cap) - throw(InvalidParameter); + noexcept(false); /** * Returns the current length of the record head, i.e. the combined @@ -655,7 +655,7 @@ namespace gpstk updateMessageData( size_t& offset, const UBNXI& data) - throw(FFStreamError, InvalidParameter); + noexcept(false); /** * Updates the message buffer with the specified MGFZI. The location @@ -672,7 +672,7 @@ namespace gpstk updateMessageData( size_t& offset, const MGFZI& data) - throw(FFStreamError, InvalidParameter); + noexcept(false); /** * Updates the message buffer with the specified raw data. The @@ -691,7 +691,7 @@ namespace gpstk size_t& offset, const std::string& data, size_t size) - throw(FFStreamError, InvalidParameter); + noexcept(false); /** * Updates the message buffer with the specified raw data. The @@ -710,7 +710,7 @@ namespace gpstk size_t& offset, const char *data, size_t size) - throw(FFStreamError, InvalidParameter); + noexcept(false); /** * Updates the message buffer with the specified data. The location @@ -732,7 +732,7 @@ namespace gpstk size_t& offset, const T& data, size_t size) - throw(FFStreamError, InvalidParameter) + noexcept(false) { if (size > sizeof(T) ) { @@ -768,7 +768,7 @@ namespace gpstk extractMessageData( size_t& offset, UBNXI& data) - throw(FFStreamError, InvalidParameter); + noexcept(false); /** * Extracts a MGFZI from the message buffer. The location within the @@ -784,7 +784,7 @@ namespace gpstk extractMessageData( size_t& offset, MGFZI& data) - throw(FFStreamError, InvalidParameter); + noexcept(false); /** * Extracts raw data from the message buffer. The location within the @@ -804,7 +804,7 @@ namespace gpstk size_t& offset, std::string& data, size_t size) const - throw(InvalidParameter); + noexcept(false); /** * Extracts data from the message buffer. The location within the @@ -826,7 +826,7 @@ namespace gpstk size_t& offset, T& data, size_t size) const - throw(FFStreamError, InvalidParameter) + noexcept(false) { if (size > sizeof(T) ) { @@ -857,8 +857,7 @@ namespace gpstk */ virtual void putRecord(std::ostream& s) const - throw(std::exception, FFStreamError, - StringUtils::StringException); + noexcept(false); /** * Retrieves a BINEX record from the specified generic input stream. @@ -866,8 +865,7 @@ namespace gpstk */ virtual size_t getRecord(std::istream& s) - throw(std::exception, FFStreamError, - StringUtils::StringException); + noexcept(false); protected: @@ -876,8 +874,7 @@ namespace gpstk */ virtual void reallyPutRecord(FFStream& s) const - throw(std::exception, FFStreamError, - StringUtils::StringException); + noexcept(false); /** * This function retrieves a BINEX record from the given FFStream. @@ -890,8 +887,7 @@ namespace gpstk */ virtual void reallyGetRecord(FFStream& s) - throw(std::exception, FFStreamError, - StringUtils::StringException); + noexcept(false); /** * @param bufs A NULL-terminated list of pointers to byte buffers @@ -937,7 +933,7 @@ namespace gpstk parseBuffer(const std::string& buffer, size_t offset, size_t size) - throw(FFStreamError); + noexcept(false); /** * Reverses the order of the first bufferLength bytes in the diff --git a/core/lib/FileHandling/Binex/BinexStream.hpp b/core/lib/FileHandling/Binex/BinexStream.hpp index 49684e02b..4409fa64a 100644 --- a/core/lib/FileHandling/Binex/BinexStream.hpp +++ b/core/lib/FileHandling/Binex/BinexStream.hpp @@ -80,7 +80,7 @@ namespace gpstk * data. BINEX can be either big-endian or little-endian so * this isn't really useful. As such, DO NOT USE writeData * or getData in the implementation of BinexData. */ - virtual bool isStreamLittleEndian() const throw() + virtual bool isStreamLittleEndian() const noexcept { return true; } }; diff --git a/core/lib/FileHandling/FFBinaryStream.cpp b/core/lib/FileHandling/FFBinaryStream.cpp index b7f6cf8c1..876852160 100644 --- a/core/lib/FileHandling/FFBinaryStream.cpp +++ b/core/lib/FileHandling/FFBinaryStream.cpp @@ -73,7 +73,7 @@ namespace gpstk void FFBinaryStream :: - getData(char* buff, size_t length) throw(EndOfFile, FFStreamError) + getData(char* buff, size_t length) noexcept(false) { try { @@ -103,7 +103,7 @@ namespace gpstk void FFBinaryStream :: writeData(const char* buff, size_t length) - throw(FFStreamError) + noexcept(false) { try { diff --git a/core/lib/FileHandling/FFBinaryStream.hpp b/core/lib/FileHandling/FFBinaryStream.hpp index 980814f95..1eaaa1593 100644 --- a/core/lib/FileHandling/FFBinaryStream.hpp +++ b/core/lib/FileHandling/FFBinaryStream.hpp @@ -81,23 +81,23 @@ namespace gpstk * from this stream doesn't match the size of a T-object. * @return the decoded data */ - inline void getData(uint8_t& v) throw(EndOfFile, FFStreamError); - inline void getData(uint16_t& v) throw(EndOfFile, FFStreamError); - inline void getData(uint32_t& v) throw(EndOfFile, FFStreamError); - inline void getData(uint64_t& v) throw(EndOfFile, FFStreamError); - inline void getData(int8_t& v) throw(EndOfFile, FFStreamError); - inline void getData(int16_t& v) throw(EndOfFile, FFStreamError); - inline void getData(int32_t& v) throw(EndOfFile, FFStreamError); - inline void getData(int64_t& v) throw(EndOfFile, FFStreamError); - inline void getData(float& v) throw(EndOfFile, FFStreamError); - inline void getData(double& v) throw(EndOfFile, FFStreamError); + inline void getData(uint8_t& v) noexcept(false); + inline void getData(uint16_t& v) noexcept(false); + inline void getData(uint32_t& v) noexcept(false); + inline void getData(uint64_t& v) noexcept(false); + inline void getData(int8_t& v) noexcept(false); + inline void getData(int16_t& v) noexcept(false); + inline void getData(int32_t& v) noexcept(false); + inline void getData(int64_t& v) noexcept(false); + inline void getData(float& v) noexcept(false); + inline void getData(double& v) noexcept(false); /** Read raw data into a buffer. * @param[out] buff the buffer to store the stream data * into. Must be pre-allocated to at least length bytes. * @param[in] length the number of bytes to read from the stream. */ void getData(char* buff, size_t length) - throw(EndOfFile, FFStreamError); + noexcept(false); /** * Writes a T-object directly from the stream in binary form. @@ -106,25 +106,25 @@ namespace gpstk * to this stream doesn't match the size of a T-object. * @return a T-object */ - inline void writeData(uint8_t v) throw(FFStreamError); - inline void writeData(uint16_t v) throw(FFStreamError); - inline void writeData(uint32_t v) throw(FFStreamError); - inline void writeData(uint64_t v) throw(FFStreamError); - inline void writeData(int8_t v) throw(FFStreamError); - inline void writeData(int16_t v) throw(FFStreamError); - inline void writeData(int32_t v) throw(FFStreamError); - inline void writeData(int64_t v) throw(FFStreamError); - inline void writeData(float v) throw(FFStreamError); - inline void writeData(double v) throw(FFStreamError); + inline void writeData(uint8_t v) noexcept(false); + inline void writeData(uint16_t v) noexcept(false); + inline void writeData(uint32_t v) noexcept(false); + inline void writeData(uint64_t v) noexcept(false); + inline void writeData(int8_t v) noexcept(false); + inline void writeData(int16_t v) noexcept(false); + inline void writeData(int32_t v) noexcept(false); + inline void writeData(int64_t v) noexcept(false); + inline void writeData(float v) noexcept(false); + inline void writeData(double v) noexcept(false); void writeData(const char* buff, size_t length) - throw(FFStreamError); + noexcept(false); /** Child classes must defined this method to determine how * decodeData and encodeData behave with respect to byte * ordering. This defines the byte ordering of the file * format. */ - virtual bool isStreamLittleEndian() const throw() = 0; + virtual bool isStreamLittleEndian() const noexcept = 0; }; //@} @@ -151,126 +151,126 @@ namespace gpstk inline void FFBinaryStream :: getData(uint8_t& v) - throw(EndOfFile, FFStreamError) + noexcept(false) { char *buf = reinterpret_cast(&v); getData(buf, sizeof(v)); } inline void FFBinaryStream :: getData(uint16_t& v) - throw(EndOfFile, FFStreamError) + noexcept(false) { FFBIN_GET_DATA(buitohs,buntohs); } inline void FFBinaryStream :: getData(uint32_t& v) - throw(EndOfFile, FFStreamError) + noexcept(false) { FFBIN_GET_DATA(buitohl,buntohl); } inline void FFBinaryStream :: getData(uint64_t& v) - throw(EndOfFile, FFStreamError) + noexcept(false) { FFBIN_GET_DATA(buitohll,buntohll); } inline void FFBinaryStream :: getData(int8_t& v) - throw(EndOfFile, FFStreamError) + noexcept(false) { char *buf = reinterpret_cast(&v); getData(buf, sizeof(v)); } inline void FFBinaryStream :: getData(int16_t& v) - throw(EndOfFile, FFStreamError) + noexcept(false) { FFBIN_GET_DATA(buitohss,buntohss); } inline void FFBinaryStream :: getData(int32_t& v) - throw(EndOfFile, FFStreamError) + noexcept(false) { FFBIN_GET_DATA(buitohsl,buntohsl); } inline void FFBinaryStream :: getData(int64_t& v) - throw(EndOfFile, FFStreamError) + noexcept(false) { FFBIN_GET_DATA(buitohsll,buntohsll); } inline void FFBinaryStream :: getData(float& v) - throw(EndOfFile, FFStreamError) + noexcept(false) { FFBIN_GET_DATA(buitohf,buntohf); } inline void FFBinaryStream :: getData(double& v) - throw(EndOfFile, FFStreamError) + noexcept(false) { FFBIN_GET_DATA(buitohd,buntohd); } inline void FFBinaryStream :: writeData(uint8_t v) - throw(FFStreamError) + noexcept(false) { char *buf = reinterpret_cast(&v); writeData(buf, sizeof(v)); } inline void FFBinaryStream :: writeData(uint16_t v) - throw(FFStreamError) + noexcept(false) { FFBIN_WRITE_DATA(buhtois,buhtons); } inline void FFBinaryStream :: writeData(uint32_t v) - throw(FFStreamError) + noexcept(false) { FFBIN_WRITE_DATA(buhtoil,buhtonl); } inline void FFBinaryStream :: writeData(uint64_t v) - throw(FFStreamError) + noexcept(false) { FFBIN_WRITE_DATA(buhtoill,buhtonll); } inline void FFBinaryStream :: writeData(int8_t v) - throw(FFStreamError) + noexcept(false) { char *buf = reinterpret_cast(&v); writeData(buf, sizeof(v)); } inline void FFBinaryStream :: writeData(int16_t v) - throw(FFStreamError) + noexcept(false) { FFBIN_WRITE_DATA(buhtoiss,buhtonss); } inline void FFBinaryStream :: writeData(int32_t v) - throw(FFStreamError) + noexcept(false) { FFBIN_WRITE_DATA(buhtoisl,buhtonsl); } inline void FFBinaryStream :: writeData(int64_t v) - throw(FFStreamError) + noexcept(false) { FFBIN_WRITE_DATA(buhtoisll,buhtonsll); } inline void FFBinaryStream :: writeData(float v) - throw(FFStreamError) + noexcept(false) { FFBIN_WRITE_DATA(buhtoif,buhtonf); } inline void FFBinaryStream :: writeData(double v) - throw(FFStreamError) + noexcept(false) { FFBIN_WRITE_DATA(buhtoid,buhtond); } diff --git a/core/lib/FileHandling/FFData.cpp b/core/lib/FileHandling/FFData.cpp index 8e46224c5..63a9e1e4f 100644 --- a/core/lib/FileHandling/FFData.cpp +++ b/core/lib/FileHandling/FFData.cpp @@ -45,26 +45,26 @@ namespace gpstk { void FFData::putRecord(FFStream& s) const - throw(FFStreamError, gpstk::StringUtils::StringException) + noexcept(false) { s.tryFFStreamPut(*this); } void FFData::getRecord(FFStream& s) - throw(FFStreamError, gpstk::StringUtils::StringException) + noexcept(false) { s.tryFFStreamGet(*this); } std::ostream& operator<<(FFStream& o, const FFData& f) - throw(FFStreamError, gpstk::StringUtils::StringException) + noexcept(false) { f.putRecord(o); return o; } std::istream& operator>>(FFStream& i, FFData& f) - throw(FFStreamError, gpstk::StringUtils::StringException) + noexcept(false) { f.getRecord(i); return i; diff --git a/core/lib/FileHandling/FFData.hpp b/core/lib/FileHandling/FFData.hpp index 618abb270..9f86effaa 100644 --- a/core/lib/FileHandling/FFData.hpp +++ b/core/lib/FileHandling/FFData.hpp @@ -93,7 +93,7 @@ namespace gpstk * @param s a FFStream-based stream */ void putRecord(FFStream& s) const - throw(FFStreamError, gpstk::StringUtils::StringException); + noexcept(false); /** * Retrieve a "record" from the given stream. @@ -109,7 +109,7 @@ namespace gpstk * stream to its pre-read position. */ void getRecord(FFStream& s) - throw(FFStreamError, gpstk::StringUtils::StringException); + noexcept(false); /** * Send debug output to the given stream. @@ -137,7 +137,7 @@ namespace gpstk * @return a reference to \c o */ friend std::ostream& operator<<(FFStream& o, const FFData& f) - throw(FFStreamError, gpstk::StringUtils::StringException); + noexcept(false); /** * Generic formatted input operator. @@ -157,20 +157,18 @@ namespace gpstk * class. */ friend std::istream& operator>>(FFStream& i, FFData& f) - throw(FFStreamError, gpstk::StringUtils::StringException); + noexcept(false); friend class FFStream; protected: /// Does the actual reading from the stream into this FFData object. virtual void reallyGetRecord(FFStream& s) - throw(std::exception, gpstk::StringUtils::StringException, - gpstk::FFStreamError) = 0; + noexcept(false) = 0; /// Does the actual writing from the stream into this FFData object. virtual void reallyPutRecord(FFStream& s) const - throw(std::exception, gpstk::StringUtils::StringException, - gpstk::FFStreamError) = 0; + noexcept(false) = 0; }; // class //@} diff --git a/core/lib/FileHandling/FFStream.cpp b/core/lib/FileHandling/FFStream.cpp index d64cfb57f..4d8f692fd 100644 --- a/core/lib/FileHandling/FFStream.cpp +++ b/core/lib/FileHandling/FFStream.cpp @@ -158,7 +158,7 @@ namespace gpstk void FFStream::tryFFStreamGet(FFData& rec) - throw(FFStreamError, gpstk::StringUtils::StringException) + noexcept(false) { // JMK 2015/12/07 - some implementations of streams will // raise exceptions in tellg if eofbit is set but not @@ -281,7 +281,7 @@ namespace gpstk // etc) to be retained. void FFStream :: tryFFStreamPut(const FFData& rec) - throw(FFStreamError, gpstk::StringUtils::StringException) + noexcept(false) { // Mark where we start in case there is an error. long initialPosition = tellg(); diff --git a/core/lib/FileHandling/FFStream.hpp b/core/lib/FileHandling/FFStream.hpp index c0a0f40e0..9d317a99c 100644 --- a/core/lib/FileHandling/FFStream.hpp +++ b/core/lib/FileHandling/FFStream.hpp @@ -165,7 +165,7 @@ namespace gpstk * @endcode * where \a ffstreamobject is the name of your stream object. */ - inline void conditionalThrow(void) throw(FFStreamError); + inline void conditionalThrow(void) noexcept(false); /// Check if the input stream is the kind of RinexObsStream static bool isFFStream(std::istream& i); @@ -189,13 +189,13 @@ namespace gpstk /// Encapsulates shared try/catch blocks for all file types /// to hide std::exception. virtual void tryFFStreamGet(FFData& rec) - throw(FFStreamError, gpstk::StringUtils::StringException); + noexcept(false); /// Encapsulates shared try/catch blocks for all file types /// to hide std::exception. virtual void tryFFStreamPut(const FFData& rec) - throw(FFStreamError, gpstk::StringUtils::StringException); + noexcept(false); private: /// Initialize internal data structures according to file name & mode @@ -207,7 +207,7 @@ namespace gpstk void FFStream :: - conditionalThrow(void) throw(FFStreamError) + conditionalThrow(void) noexcept(false) { if (exceptions() & std::fstream::failbit) { diff --git a/core/lib/FileHandling/FFTextStream.cpp b/core/lib/FileHandling/FFTextStream.cpp index dce25c5ea..a373333d4 100644 --- a/core/lib/FileHandling/FFTextStream.cpp +++ b/core/lib/FileHandling/FFTextStream.cpp @@ -100,7 +100,7 @@ namespace gpstk void FFTextStream :: tryFFStreamGet(FFData& rec) - throw(FFStreamError, gpstk::StringUtils::StringException) + noexcept(false) { unsigned int initialLineNumber = lineNumber; @@ -121,7 +121,7 @@ namespace gpstk void FFTextStream :: tryFFStreamPut(const FFData& rec) - throw(FFStreamError, gpstk::StringUtils::StringException) + noexcept(false) { unsigned int initialLineNumber = lineNumber; @@ -148,7 +148,7 @@ namespace gpstk void FFTextStream :: formattedGetLine( std::string& line, const bool expectEOF ) - throw(EndOfFile, FFStreamError, gpstk::StringUtils::StringException) + noexcept(false) { try { diff --git a/core/lib/FileHandling/FFTextStream.hpp b/core/lib/FileHandling/FFTextStream.hpp index 767c9f76b..d7321757a 100644 --- a/core/lib/FileHandling/FFTextStream.hpp +++ b/core/lib/FileHandling/FFTextStream.hpp @@ -115,18 +115,18 @@ namespace gpstk */ void formattedGetLine( std::string& line, const bool expectEOF = false ) - throw(EndOfFile, FFStreamError, gpstk::StringUtils::StringException); + noexcept(false); protected: /// calls FFStream::tryFFStreamGet and adds line number information virtual void tryFFStreamGet(FFData& rec) - throw(FFStreamError, gpstk::StringUtils::StringException); + noexcept(false); /// calls FFStream::tryFFStreamPut and adds line number information virtual void tryFFStreamPut(const FFData& rec) - throw(FFStreamError, gpstk::StringUtils::StringException); + noexcept(false); private: /// Initialize internal data structures diff --git a/core/lib/FileHandling/RINEX/RinexClockBase.cpp b/core/lib/FileHandling/RINEX/RinexClockBase.cpp index fe431c4ca..c083545f7 100644 --- a/core/lib/FileHandling/RINEX/RinexClockBase.cpp +++ b/core/lib/FileHandling/RINEX/RinexClockBase.cpp @@ -80,7 +80,7 @@ namespace gpstk CivilTime RinexClockBase::parseTime(const string& line) const - throw(FFStreamError) + noexcept(false) { if ( line.size() != 26 ) { diff --git a/core/lib/FileHandling/RINEX/RinexClockBase.hpp b/core/lib/FileHandling/RINEX/RinexClockBase.hpp index 93e484904..e9c2efe80 100644 --- a/core/lib/FileHandling/RINEX/RinexClockBase.hpp +++ b/core/lib/FileHandling/RINEX/RinexClockBase.hpp @@ -105,7 +105,7 @@ namespace gpstk /// "yyyy mm dd hh mm ss.ssssss" to a CivilTime object. /// If the string is blank a CommonTime::BEGINNING_OF_TIME is returned. CivilTime parseTime(const std::string& line) const - throw(FFStreamError); + noexcept(false); }; // RinexClockBase //@} diff --git a/core/lib/FileHandling/RINEX/RinexClockData.cpp b/core/lib/FileHandling/RINEX/RinexClockData.cpp index ad2a54b34..9e8187f7d 100644 --- a/core/lib/FileHandling/RINEX/RinexClockData.cpp +++ b/core/lib/FileHandling/RINEX/RinexClockData.cpp @@ -76,8 +76,7 @@ namespace gpstk void RinexClockData::reallyPutRecord(FFStream& s) const - throw(std::exception, FFStreamError, - StringUtils::StringException) + noexcept(false) { if ( type != AR && type != AS && @@ -132,8 +131,7 @@ namespace gpstk void RinexClockData::reallyGetRecord(FFStream& ffs) - throw(std::exception, FFStreamError, - StringUtils::StringException) + noexcept(false) { RinexClockStream& strm = dynamic_cast(ffs); diff --git a/core/lib/FileHandling/RINEX/RinexClockData.hpp b/core/lib/FileHandling/RINEX/RinexClockData.hpp index 9e9916c25..1ccf32793 100644 --- a/core/lib/FileHandling/RINEX/RinexClockData.hpp +++ b/core/lib/FileHandling/RINEX/RinexClockData.hpp @@ -103,14 +103,12 @@ namespace gpstk protected: /// Writes a correctly formatted record from this data to stream virtual void reallyPutRecord(FFStream& s) const - throw(std::exception, FFStreamError, - StringUtils::StringException); + noexcept(false); /// This functions obtains a RINEX Clock record from the given stream virtual void reallyGetRecord(FFStream& s) - throw(std::exception, FFStreamError, - StringUtils::StringException); + noexcept(false); }; // class RinexClockData diff --git a/core/lib/FileHandling/RINEX/RinexClockHeader.cpp b/core/lib/FileHandling/RINEX/RinexClockHeader.cpp index cde7f0014..0590f60aa 100644 --- a/core/lib/FileHandling/RINEX/RinexClockHeader.cpp +++ b/core/lib/FileHandling/RINEX/RinexClockHeader.cpp @@ -286,7 +286,7 @@ namespace gpstk void RinexClockHeader::reallyPutRecord(FFStream& ffs) const - throw(std::exception, FFStreamError, StringException) + noexcept(false) { RinexClockStream& strm = dynamic_cast(ffs); @@ -501,8 +501,7 @@ namespace gpstk // This function parses the entire header from the given stream void RinexClockHeader::reallyGetRecord(FFStream& ffs) - throw(std::exception, FFStreamError, - StringUtils::StringException) + noexcept(false) { RinexClockStream& strm = dynamic_cast(ffs); @@ -550,7 +549,7 @@ namespace gpstk // this function parses a single header record void RinexClockHeader::ParseHeaderRecord(const string& line) - throw(FFStreamError) + noexcept(false) { string label(line, 60, 20); diff --git a/core/lib/FileHandling/RINEX/RinexClockHeader.hpp b/core/lib/FileHandling/RINEX/RinexClockHeader.hpp index 3bbd103c8..4cf6abc64 100644 --- a/core/lib/FileHandling/RINEX/RinexClockHeader.hpp +++ b/core/lib/FileHandling/RINEX/RinexClockHeader.hpp @@ -217,7 +217,7 @@ namespace gpstk protected: /// outputs this record to the stream correctly formatted. virtual void reallyPutRecord(FFStream& s) const - throw(std::exception, FFStreamError, StringUtils::StringException); + noexcept(false); /** * This function retrieves the RINEX Clock Header from the @@ -230,7 +230,7 @@ namespace gpstk * stream to its pre-read position. */ virtual void reallyGetRecord(FFStream& s) - throw(std::exception, FFStreamError,StringUtils::StringException); + noexcept(false); /// Clears all header values and lists. void clear(); @@ -242,7 +242,7 @@ namespace gpstk * Used by reallyGetRecord */ void ParseHeaderRecord(const std::string& line) - throw(FFStreamError); + noexcept(false); }; // RinexClockHeader diff --git a/core/lib/FileHandling/RINEX/RinexMetData.cpp b/core/lib/FileHandling/RINEX/RinexMetData.cpp index bde1046ef..31dade1e6 100644 --- a/core/lib/FileHandling/RINEX/RinexMetData.cpp +++ b/core/lib/FileHandling/RINEX/RinexMetData.cpp @@ -54,8 +54,7 @@ namespace gpstk const int RinexMetData::maxObsPerContinuationLine = 10; void RinexMetData::reallyPutRecord(FFStream& ffs) const - throw(std::exception, FFStreamError, - gpstk::StringUtils::StringException) + noexcept(false) { RinexMetStream& strm = dynamic_cast(ffs); string line; @@ -109,8 +108,7 @@ namespace gpstk } void RinexMetData::reallyGetRecord(FFStream& ffs) - throw(std::exception, FFStreamError, - gpstk::StringUtils::StringException) + noexcept(false) { RinexMetStream& strm = dynamic_cast(ffs); @@ -152,7 +150,7 @@ namespace gpstk void RinexMetData::processFirstLine(const string& line, const RinexMetHeader& hdr, double version) - throw(FFStreamError) + noexcept(false) { int yrLen = 18; if(version >= 3.02) @@ -178,7 +176,7 @@ namespace gpstk void RinexMetData::processContinuationLine(const string& line, const RinexMetHeader& hdr) - throw(FFStreamError) + noexcept(false) { try { @@ -200,7 +198,7 @@ namespace gpstk } CommonTime RinexMetData::parseTime(const string& line, double version) const - throw(FFStreamError) + noexcept(false) { int addYrLen = 0; if(version >=3.02) @@ -258,7 +256,7 @@ namespace gpstk } string RinexMetData::writeTime(const CommonTime& dt, double version) const - throw(StringException) + noexcept(false) { int yrLen = 2; if(version >= 3.02) diff --git a/core/lib/FileHandling/RINEX/RinexMetData.hpp b/core/lib/FileHandling/RINEX/RinexMetData.hpp index b5a718f1d..e5dbe02ab 100644 --- a/core/lib/FileHandling/RINEX/RinexMetData.hpp +++ b/core/lib/FileHandling/RINEX/RinexMetData.hpp @@ -110,8 +110,7 @@ namespace gpstk /// Writes the met data to the file stream formatted correctly. void reallyPutRecord(FFStream& s) const - throw(std::exception, FFStreamError, - gpstk::StringUtils::StringException); + noexcept(false); /** * This function retrieves a RINEX 2 or 3 Met record from the @@ -124,8 +123,7 @@ namespace gpstk * stream to its pre-read position. */ virtual void reallyGetRecord(FFStream& s) - throw(std::exception, FFStreamError, - gpstk::StringUtils::StringException); + noexcept(false); private: @@ -134,23 +132,23 @@ namespace gpstk void processFirstLine(const std::string& line, const RinexMetHeader& hdr, double version) - throw(FFStreamError); + noexcept(false); /// Parses string \a line to get data on continuation lines. void processContinuationLine(const std::string& line, const RinexMetHeader& hdr) - throw(FFStreamError); + noexcept(false); /// Parses the time portion of a line into a CommonTime object. /// @param version of Rinex file (3.02, 3.01, 2.11, ...) CommonTime parseTime(const std::string& line, double version) const - throw(FFStreamError); + noexcept(false); /// Writes the CommonTime object into RINEX format. If it's a /// bad time, it will return blanks. /// @param version Rinex version, default to 2.11 for backwards compatability std::string writeTime(const CommonTime& dtd, double version = 2.11) const - throw(gpstk::StringUtils::StringException); + noexcept(false); }; // class RinexMetData diff --git a/core/lib/FileHandling/RINEX/RinexMetHeader.cpp b/core/lib/FileHandling/RINEX/RinexMetHeader.cpp index 28f3cdb3b..6bfba8448 100644 --- a/core/lib/FileHandling/RINEX/RinexMetHeader.cpp +++ b/core/lib/FileHandling/RINEX/RinexMetHeader.cpp @@ -88,8 +88,7 @@ namespace gpstk } void RinexMetHeader::reallyPutRecord(FFStream& ffs) const - throw(std::exception, FFStreamError, - gpstk::StringUtils::StringException) + noexcept(false) { RinexMetStream& strm = dynamic_cast(ffs); @@ -255,8 +254,7 @@ namespace gpstk } void RinexMetHeader::reallyGetRecord(FFStream& ffs) - throw(std::exception, FFStreamError, - gpstk::StringUtils::StringException) + noexcept(false) { RinexMetStream& strm = dynamic_cast(ffs); @@ -464,7 +462,7 @@ namespace gpstk RinexMetHeader::RinexMetType RinexMetHeader::convertObsType(const string& oneObs) - throw(FFStreamError) + noexcept(false) { if (oneObs == "PR") return PR; else if (oneObs == "TD") return TD; @@ -484,7 +482,7 @@ namespace gpstk } string RinexMetHeader::convertObsType(const RinexMetHeader::RinexMetType& oneObs) - throw(FFStreamError) + noexcept(false) { if (oneObs == PR) return "PR"; else if (oneObs == TD) return "TD"; diff --git a/core/lib/FileHandling/RINEX/RinexMetHeader.hpp b/core/lib/FileHandling/RINEX/RinexMetHeader.hpp index 223ba85e8..db047ed7e 100644 --- a/core/lib/FileHandling/RINEX/RinexMetHeader.hpp +++ b/core/lib/FileHandling/RINEX/RinexMetHeader.hpp @@ -105,11 +105,11 @@ namespace gpstk /// sets the obs type array given an obs type line static RinexMetType convertObsType(const std::string& oneObs) - throw(FFStreamError); + noexcept(false); /// Converts a RinexMetType to its string equivalent. static std::string convertObsType(const RinexMetType& oneObs) - throw(FFStreamError); + noexcept(false); /// Tell me, Am I valid? unsigned long valid; @@ -256,8 +256,7 @@ namespace gpstk /// Writes the RINEX Met header to the stream \a s. virtual void reallyPutRecord(FFStream& s) const - throw(std::exception, FFStreamError, - gpstk::StringUtils::StringException); + noexcept(false); /** * This function reads the RINEX MET header from the given FFStream. @@ -269,8 +268,7 @@ namespace gpstk * stream to its pre-read position. */ virtual void reallyGetRecord(FFStream& s) - throw(std::exception, FFStreamError, - gpstk::StringUtils::StringException); + noexcept(false); }; // class RinexMetHeader diff --git a/core/lib/FileHandling/RINEX/RinexNavData.cpp b/core/lib/FileHandling/RINEX/RinexNavData.cpp index 1b5c8e4b7..2af9a7b60 100644 --- a/core/lib/FileHandling/RINEX/RinexNavData.cpp +++ b/core/lib/FileHandling/RINEX/RinexNavData.cpp @@ -104,7 +104,7 @@ namespace gpstk } void RinexNavData::reallyPutRecord(FFStream& ffs) const - throw(std::exception, FFStreamError, StringException) + noexcept(false) { RinexNavStream& strm = dynamic_cast(ffs); @@ -127,7 +127,7 @@ namespace gpstk } void RinexNavData::reallyGetRecord(FFStream& ffs) - throw(std::exception, FFStreamError, StringException) + noexcept(false) { RinexNavStream& strm = dynamic_cast(ffs); @@ -183,7 +183,7 @@ namespace gpstk << endl; } - RinexNavData::operator EngEphemeris() const throw() + RinexNavData::operator EngEphemeris() const noexcept { EngEphemeris ee; @@ -317,7 +317,7 @@ namespace gpstk } string RinexNavData::putPRNEpoch(void) const - throw(StringException) + noexcept(false) { string line; line += rightJustify(asString(PRNID), 2); @@ -332,13 +332,13 @@ namespace gpstk } string RinexNavData::writeTime(const CommonTime& dt) const - throw(StringException) + noexcept(false) { return printTime(dt, " %02y %2m %2d %2H %2M%5.1f"); } string RinexNavData::putBroadcastOrbit1(void) const - throw(StringException) + noexcept(false) { string line; line += string(3, ' '); @@ -354,7 +354,7 @@ namespace gpstk } string RinexNavData::putBroadcastOrbit2(void) const - throw(StringException) + noexcept(false) { string line; line += string(3, ' '); @@ -370,7 +370,7 @@ namespace gpstk } string RinexNavData::putBroadcastOrbit3(void) const - throw(StringException) + noexcept(false) { string line; line += string(3, ' '); @@ -386,7 +386,7 @@ namespace gpstk } string RinexNavData::putBroadcastOrbit4(void) const - throw(StringException) + noexcept(false) { string line; line += string(3, ' '); @@ -402,7 +402,7 @@ namespace gpstk } string RinexNavData::putBroadcastOrbit5(void) const - throw(StringException) + noexcept(false) { string line; line += string(3, ' '); @@ -418,7 +418,7 @@ namespace gpstk } string RinexNavData::putBroadcastOrbit6(void) const - throw(StringException) + noexcept(false) { string line; line += string(3, ' '); @@ -434,7 +434,7 @@ namespace gpstk } string RinexNavData::putBroadcastOrbit7(const double ver) const - throw(StringException) + noexcept(false) { string line; line += string(3, ' '); @@ -450,7 +450,7 @@ namespace gpstk } void RinexNavData::getPRNEpoch(const string& currentLine) - throw(StringException, FFStreamError) + noexcept(false) { try { @@ -498,7 +498,7 @@ namespace gpstk } void RinexNavData::getBroadcastOrbit1(const string& currentLine) - throw(StringException, FFStreamError) + noexcept(false) { try { @@ -516,7 +516,7 @@ namespace gpstk } void RinexNavData::getBroadcastOrbit2(const string& currentLine) - throw(StringException, FFStreamError) + noexcept(false) { try { @@ -534,7 +534,7 @@ namespace gpstk } void RinexNavData::getBroadcastOrbit3(const string& currentLine) - throw(StringException, FFStreamError) + noexcept(false) { try { @@ -552,7 +552,7 @@ namespace gpstk } void RinexNavData::getBroadcastOrbit4(const string& currentLine) - throw(StringException, FFStreamError) + noexcept(false) { try { @@ -570,7 +570,7 @@ namespace gpstk } void RinexNavData::getBroadcastOrbit5(const string& currentLine) - throw(StringException, FFStreamError) + noexcept(false) { try { @@ -594,7 +594,7 @@ namespace gpstk } void RinexNavData::getBroadcastOrbit6(const string& currentLine) - throw(StringException, FFStreamError) + noexcept(false) { try { @@ -617,7 +617,7 @@ namespace gpstk } void RinexNavData::getBroadcastOrbit7(const string& currentLine) - throw(StringException, FFStreamError) + noexcept(false) { try { diff --git a/core/lib/FileHandling/RINEX/RinexNavData.hpp b/core/lib/FileHandling/RINEX/RinexNavData.hpp index 8434a9e85..c2297e894 100644 --- a/core/lib/FileHandling/RINEX/RinexNavData.hpp +++ b/core/lib/FileHandling/RINEX/RinexNavData.hpp @@ -98,7 +98,7 @@ namespace gpstk /** * Converts this RinexNavData to an EngEphemeris object. */ - operator EngEphemeris() const throw(); + operator EngEphemeris() const noexcept; /** Convert this RinexNavData to a GPSEphemeris object. For * backward compatibility only - use Rinex3NavData. */ @@ -114,7 +114,7 @@ namespace gpstk * defined to be the epoch time of the record (RINEX 2.11 * Table A4). */ - CommonTime getTocTime() const throw() + CommonTime getTocTime() const noexcept { return time; } /** @@ -252,64 +252,63 @@ namespace gpstk private: /// Writes the CommonTime object into RINEX format. std::string writeTime(const CommonTime& dt) const - throw(gpstk::StringUtils::StringException); + noexcept(false); /// Parses string \a currentLine to obtain PRN id and epoch. void getPRNEpoch(const std::string& currentLine) - throw(gpstk::StringUtils::StringException, FFStreamError); + noexcept(false); /// Reads line 1 of the Nav Data record void getBroadcastOrbit1(const std::string& currentLine) - throw(gpstk::StringUtils::StringException, FFStreamError); + noexcept(false); /// Reads line 2 of the Nav Data record void getBroadcastOrbit2(const std::string& currentLine) - throw(gpstk::StringUtils::StringException, FFStreamError); + noexcept(false); /// Reads line 3 of the Nav Data record void getBroadcastOrbit3(const std::string& currentLine) - throw(gpstk::StringUtils::StringException, FFStreamError); + noexcept(false); /// Reads line 4 of the Nav Data record void getBroadcastOrbit4(const std::string& currentLine) - throw(gpstk::StringUtils::StringException, FFStreamError); + noexcept(false); /// Reads line 5 of the Nav Data record void getBroadcastOrbit5(const std::string& currentLine) - throw(gpstk::StringUtils::StringException, FFStreamError); + noexcept(false); /// Reads line 6 of the Nav Data record void getBroadcastOrbit6(const std::string& currentLine) - throw(gpstk::StringUtils::StringException, FFStreamError); + noexcept(false); /// Reads line 7 of the Nav Data record void getBroadcastOrbit7(const std::string& currentLine) - throw(gpstk::StringUtils::StringException, FFStreamError); + noexcept(false); /// generates a line to be output to a file for the PRN/epoch line std::string putPRNEpoch() const - throw(gpstk::StringUtils::StringException); + noexcept(false); /// Writes line 7 of the Nav Data record std::string putBroadcastOrbit1() const - throw(gpstk::StringUtils::StringException); + noexcept(false); /// Writes line 7 of the Nav Data record std::string putBroadcastOrbit2() const - throw(gpstk::StringUtils::StringException); + noexcept(false); /// Writes line 7 of the Nav Data record std::string putBroadcastOrbit3() const - throw(gpstk::StringUtils::StringException); + noexcept(false); /// Writes line 7 of the Nav Data record std::string putBroadcastOrbit4() const - throw(gpstk::StringUtils::StringException); + noexcept(false); /// Writes line 7 of the Nav Data record std::string putBroadcastOrbit5() const - throw(gpstk::StringUtils::StringException); + noexcept(false); /// Writes line 7 of the Nav Data record std::string putBroadcastOrbit6() const - throw(gpstk::StringUtils::StringException); + noexcept(false); /// Writes line 7 of the Nav Data record /// @warning Pass in version to decide wheter or not /// to write fit interval std::string putBroadcastOrbit7(const double ver) const - throw(gpstk::StringUtils::StringException); + noexcept(false); protected: /// Outputs the record to the FFStream \a s. virtual void reallyPutRecord(FFStream& s) const - throw(std::exception, FFStreamError, - gpstk::StringUtils::StringException); + noexcept(false); /** * This function retrieves a RINEX NAV record from the given FFStream. @@ -321,8 +320,7 @@ namespace gpstk * stream to its pre-read position. */ virtual void reallyGetRecord(FFStream& s) - throw(std::exception, FFStreamError, - gpstk::StringUtils::StringException); + noexcept(false); }; // class RinexNavData //@} diff --git a/core/lib/FileHandling/RINEX/RinexNavHeader.cpp b/core/lib/FileHandling/RINEX/RinexNavHeader.cpp index d6017941f..ad535b344 100644 --- a/core/lib/FileHandling/RINEX/RinexNavHeader.cpp +++ b/core/lib/FileHandling/RINEX/RinexNavHeader.cpp @@ -63,7 +63,7 @@ namespace gpstk const string RinexNavHeader::versionString = "RINEX VERSION / TYPE"; void RinexNavHeader::reallyPutRecord(FFStream& ffs) const - throw(std::exception, FFStreamError, StringException) + noexcept(false) { RinexNavStream& strm = dynamic_cast(ffs); @@ -178,7 +178,7 @@ namespace gpstk } void RinexNavHeader::reallyGetRecord(FFStream& ffs) - throw(std::exception, FFStreamError, StringException) + noexcept(false) { RinexNavStream& strm = dynamic_cast(ffs); diff --git a/core/lib/FileHandling/RINEX/RinexNavHeader.hpp b/core/lib/FileHandling/RINEX/RinexNavHeader.hpp index fa29183ef..6f5d3ad77 100644 --- a/core/lib/FileHandling/RINEX/RinexNavHeader.hpp +++ b/core/lib/FileHandling/RINEX/RinexNavHeader.hpp @@ -124,8 +124,7 @@ namespace gpstk protected: /// Writes a correctly formatted record from this data to stream \a s. virtual void reallyPutRecord(FFStream& s) const - throw(std::exception, FFStreamError, - gpstk::StringUtils::StringException); + noexcept(false); /** * This function reads the RINEX NAV header from the given FFStream. @@ -137,8 +136,7 @@ namespace gpstk * stream to its pre-read position. */ virtual void reallyGetRecord(FFStream& s) - throw(std::exception, FFStreamError, - gpstk::StringUtils::StringException); + noexcept(false); }; // class RinexNavHeader //@} diff --git a/core/lib/FileHandling/RINEX/RinexObsData.cpp b/core/lib/FileHandling/RINEX/RinexObsData.cpp index 104c89cbc..092f70f34 100644 --- a/core/lib/FileHandling/RINEX/RinexObsData.cpp +++ b/core/lib/FileHandling/RINEX/RinexObsData.cpp @@ -54,7 +54,7 @@ namespace gpstk CommonTime gpstk::RinexObsData::previousTime; void RinexObsData::reallyPutRecord(FFStream& ffs) const - throw(std::exception, FFStreamError, StringException) + noexcept(false) { // is there anything to write? if( (epochFlag==0 || epochFlag==1 || epochFlag==6) @@ -179,7 +179,7 @@ namespace gpstk void RinexObsData::reallyGetRecord(FFStream& ffs) - throw(std::exception, FFStreamError, gpstk::StringUtils::StringException) + noexcept(false) { RinexObsStream& strm = dynamic_cast(ffs); @@ -357,7 +357,7 @@ namespace gpstk CommonTime RinexObsData::parseTime(const string& line, const RinexObsHeader& hdr) const - throw(FFStreamError) + noexcept(false) { try { @@ -417,7 +417,7 @@ namespace gpstk } string RinexObsData::writeTime(const CommonTime& dt) const - throw(StringException) + noexcept(false) { if (dt == CommonTime::BEGINNING_OF_TIME) { diff --git a/core/lib/FileHandling/RINEX/RinexObsData.hpp b/core/lib/FileHandling/RINEX/RinexObsData.hpp index 46a8b6b76..321761939 100644 --- a/core/lib/FileHandling/RINEX/RinexObsData.hpp +++ b/core/lib/FileHandling/RINEX/RinexObsData.hpp @@ -120,8 +120,7 @@ namespace gpstk * number for the type of header data you want to write. */ virtual void reallyPutRecord(FFStream& s) const - throw(std::exception, FFStreamError, - gpstk::StringUtils::StringException); + noexcept(false); /** * This functions obtains a RINEX Observation record from the given @@ -137,8 +136,7 @@ namespace gpstk * stream to its pre-read position. */ virtual void reallyGetRecord(FFStream& s) - throw(std::exception, FFStreamError, - gpstk::StringUtils::StringException); + noexcept(false); private: ///