Changeset 107:614b9ff033c1 in xplra for src/client/c/hu/varadiistvan/xplra/xplra.cc
- Timestamp:
- 12/15/22 19:26:40 (17 months ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/client/c/hu/varadiistvan/xplra/xplra.cc
r92 r107 90 90 * @return the ID of the new value 91 91 */ 92 static int addValue(Value value) throw();92 static int addValue(Value value) noexcept; 93 93 94 94 /** 95 95 * Get the value with the given ID. 96 96 */ 97 static Value getValue(int valueID) throw();97 static Value getValue(int valueID) noexcept; 98 98 99 99 /** 100 100 * Clear the value with the given ID. 101 101 */ 102 static void clearValue(int valueID) throw();102 static void clearValue(int valueID) noexcept; 103 103 104 104 private: … … 119 119 * Construct a slot with the given value 120 120 */ 121 Slot(Value value) throw();121 Slot(Value value) noexcept; 122 122 123 123 /** … … 125 125 * should be called for a slot with no value. 126 126 */ 127 int setValue(Value value) throw();127 int setValue(Value value) noexcept; 128 128 129 129 /** … … 131 131 * returned (converted to value). 132 132 */ 133 Value getValue() const throw();133 Value getValue() const noexcept; 134 134 135 135 /** 136 136 * Clear the value and set the given next free index. 137 137 */ 138 void clear(int nextFreeIndex) throw();138 void clear(int nextFreeIndex) noexcept; 139 139 }; 140 140 … … 150 150 151 151 template <class Value> 152 inline Slot<Value>::Slot(Value value) throw():152 inline Slot<Value>::Slot(Value value) noexcept : 153 153 valid(true) 154 154 { … … 159 159 160 160 template <class Value> 161 inline int Slot<Value>::setValue(Value value) throw()161 inline int Slot<Value>::setValue(Value value) noexcept 162 162 { 163 163 assert(!valid); … … 171 171 172 172 template <class Value> 173 inline Value Slot<Value>::getValue() const throw()173 inline Value Slot<Value>::getValue() const noexcept 174 174 { 175 175 return valid ? value : static_cast<Value>(0); … … 179 179 180 180 template <class Value> 181 inline void Slot<Value>::clear(int nextFreeIndex) throw()181 inline void Slot<Value>::clear(int nextFreeIndex) noexcept 182 182 { 183 183 assert(valid); … … 189 189 190 190 template <class Value> 191 int Slot<Value>::addValue(Value value) throw()191 int Slot<Value>::addValue(Value value) noexcept 192 192 { 193 193 int id = firstFree; … … 206 206 207 207 template <class Value> 208 Value Slot<Value>::getValue(int valueID) throw()208 Value Slot<Value>::getValue(int valueID) noexcept 209 209 { 210 210 size_t index = static_cast<size_t>(valueID); … … 216 216 217 217 template <class Value> 218 void Slot<Value>::clearValue(int valueID) throw()218 void Slot<Value>::clearValue(int valueID) noexcept 219 219 { 220 220 size_t index = static_cast<size_t>(valueID); … … 248 248 * Get the connection for the given multi-dataref buffer. 249 249 */ 250 static Connection& get(const MultiBuffer& buffer) throw();250 static Connection& get(const MultiBuffer& buffer) noexcept; 251 251 252 252 private: … … 275 275 * Construct the connection 276 276 */ 277 Connection() throw();277 Connection() noexcept; 278 278 279 279 /** 280 280 * Destroy the connection. 281 281 */ 282 ~Connection() throw();282 ~Connection() noexcept; 283 283 284 284 /** 285 285 * Handle the currently pending exception. 286 286 */ 287 void handleException() throw();287 void handleException() noexcept; 288 288 289 289 /** 290 290 * Get the last error code. 291 291 */ 292 int getLastError(unsigned long* lastErrorSubCode) const throw();292 int getLastError(unsigned long* lastErrorSubCode) const noexcept; 293 293 294 294 /** 295 295 * Get the string representation of the last error code. 296 296 */ 297 const char* getLastErrorString() const throw();297 const char* getLastErrorString() const noexcept; 298 298 299 299 /** 300 300 * Clear the last error code. 301 301 */ 302 void clearLastError() throw();302 void clearLastError() noexcept; 303 303 304 304 /** … … 307 307 * @return the ID of the new getter. 308 308 */ 309 int createMultiGetter() throw();309 int createMultiGetter() noexcept; 310 310 311 311 /** … … 314 314 * @return the ID of the new setter. 315 315 */ 316 int createMultiSetter() throw();316 int createMultiSetter() noexcept; 317 317 318 318 /** … … 324 324 * @return whether the buffer was found and could be destroyed. 325 325 */ 326 bool destroyMultiBuffer(int bufferID) throw(Exception);326 bool destroyMultiBuffer(int bufferID); 327 327 }; 328 328 329 329 //------------------------------------------------------------------------------ 330 330 331 inline Connection& Connection::get(const MultiBuffer& buffer) throw()331 inline Connection& Connection::get(const MultiBuffer& buffer) noexcept 332 332 { 333 333 return static_cast<Connection&>(buffer.getXPlane()); … … 336 336 //------------------------------------------------------------------------------ 337 337 338 inline Connection::Connection() throw():338 inline Connection::Connection() noexcept : 339 339 lastErrorCode(0), 340 340 lastErrorSubCode(0) … … 344 344 //------------------------------------------------------------------------------ 345 345 346 Connection::~Connection() throw()346 Connection::~Connection() noexcept 347 347 { 348 348 for(multiBufferIDs_t::iterator i = multiBufferIDs.begin(); … … 355 355 //------------------------------------------------------------------------------ 356 356 357 void Connection::handleException() throw()357 void Connection::handleException() noexcept 358 358 { 359 359 try { … … 393 393 394 394 inline int Connection::getLastError(unsigned long* lastErrorSubCode) 395 const throw()395 const noexcept 396 396 { 397 397 if (lastErrorSubCode!=0) *lastErrorSubCode = this->lastErrorSubCode; … … 401 401 //------------------------------------------------------------------------------ 402 402 403 inline const char* Connection::getLastErrorString() const throw()403 inline const char* Connection::getLastErrorString() const noexcept 404 404 { 405 405 return (lastErrorCode==ERROR_NONE) ? 0 : lastErrorString.c_str(); … … 408 408 //------------------------------------------------------------------------------ 409 409 410 inline void Connection::clearLastError() throw()410 inline void Connection::clearLastError() noexcept 411 411 { 412 412 lastErrorCode = ERROR_NONE; … … 417 417 //------------------------------------------------------------------------------ 418 418 419 inline int Connection::createMultiGetter() throw()419 inline int Connection::createMultiGetter() noexcept 420 420 { 421 421 MultiGetter& getter = XPlane::createMultiGetter(); … … 425 425 //------------------------------------------------------------------------------ 426 426 427 inline int Connection::createMultiSetter() throw()427 inline int Connection::createMultiSetter() noexcept 428 428 { 429 429 MultiSetter& setter = XPlane::createMultiSetter(); … … 433 433 //------------------------------------------------------------------------------ 434 434 435 bool Connection::destroyMultiBuffer(int bufferID) throw(Exception)435 bool Connection::destroyMultiBuffer(int bufferID) 436 436 { 437 437 MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
Note:
See TracChangeset
for help on using the changeset viewer.