Changeset 107:614b9ff033c1 in xplra for src/client/c/hu/varadiistvan
- Timestamp:
- 12/15/22 19:26:40 (23 months ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/client/c/hu/varadiistvan/xplra
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
src/client/c/hu/varadiistvan/xplra/MultiBuffer.cc
r66 r107 54 54 inline MultiBuffer::DataRef::DataRef(const string& name, uint8_t type, 55 55 const DataRef* previous, 56 size_t length, size_t offset) throw():56 size_t length, size_t offset) noexcept : 57 57 name(name), 58 58 type(type), … … 71 71 //------------------------------------------------------------------------------ 72 72 73 inline size_t MultiBuffer::DataRef::getSize() const throw()73 inline size_t MultiBuffer::DataRef::getSize() const noexcept 74 74 { 75 75 switch (type) { … … 93 93 //------------------------------------------------------------------------------ 94 94 95 inline size_t MultiBuffer::DataRef::getAlignment() const throw()95 inline size_t MultiBuffer::DataRef::getAlignment() const noexcept 96 96 { 97 97 switch (type) { … … 112 112 //------------------------------------------------------------------------------ 113 113 114 bool MultiBuffer::DataRef::isArray() const throw()114 bool MultiBuffer::DataRef::isArray() const noexcept 115 115 { 116 116 return … … 124 124 inline size_t 125 125 MultiBuffer::DataRef::getCopyLength(size_t userLength, size_t userOffset) 126 const throw()126 const noexcept 127 127 { 128 128 size_t maxLength = … … 134 134 //------------------------------------------------------------------------------ 135 135 136 inline void MultiBuffer::unfinalize() throw()136 inline void MultiBuffer::unfinalize() noexcept 137 137 { 138 138 delete data; data = 0; … … 141 141 //------------------------------------------------------------------------------ 142 142 143 void MultiBuffer::forgetRegistration() throw()143 void MultiBuffer::forgetRegistration() noexcept 144 144 { 145 145 registeredID = -1; … … 148 148 //------------------------------------------------------------------------------ 149 149 150 inline const MultiBuffer::DataRef* MultiBuffer::getLastDataRef() const throw()150 inline const MultiBuffer::DataRef* MultiBuffer::getLastDataRef() const noexcept 151 151 { 152 152 return dataRefs.empty() ? 0 : &(dataRefs.back()); … … 156 156 157 157 inline const MultiBuffer::DataRef& MultiBuffer::getDataRef(size_t id, uint8_t type) const 158 throw(InvalidIDException, TypeMismatchException)159 158 { 160 159 if (id>=dataRefs.size()) throw InvalidIDException(); … … 167 166 168 167 inline void* MultiBuffer::getData(size_t id, uint8_t type) 169 throw(InvalidIDException, TypeMismatchException)170 168 { 171 169 const DataRef& dataRef = getDataRef(id, type); … … 177 175 178 176 inline const void* MultiBuffer::getData(size_t id, uint8_t type) const 179 throw(InvalidIDException, TypeMismatchException)180 177 { 181 178 const DataRef& dataRef = getDataRef(id, type); … … 189 186 inline MultiBuffer::setArray(size_t id, const T* value, 190 187 size_t length, size_t offset) 191 throw(InvalidIDException, TypeMismatchException)192 188 { 193 189 const DataRef& dataRef = getDataRef(id, type); … … 209 205 inline size_t MultiBuffer::getArray(size_t id, T* value, 210 206 size_t length, size_t offset) const 211 throw(InvalidIDException, TypeMismatchException)212 207 { 213 208 const DataRef& dataRef = getDataRef(id, type); … … 228 223 template <typename T, uint8_t type> 229 224 inline const T* MultiBuffer::getArray(size_t id, size_t offset) const 230 throw(InvalidIDException, TypeMismatchException)231 225 { 232 226 const DataRef& dataRef = getDataRef(id, type); … … 240 234 241 235 MultiBuffer::MultiBuffer(XPlane& xplane, uint8_t registerCommand, 242 uint8_t unregisterCommand) throw():236 uint8_t unregisterCommand) noexcept : 243 237 data(0), 244 238 xplane(xplane), … … 251 245 //------------------------------------------------------------------------------ 252 246 253 MultiBuffer::~MultiBuffer() throw()247 MultiBuffer::~MultiBuffer() noexcept 254 248 { 255 249 unregisterSafelyFromXPlane(); … … 259 253 //------------------------------------------------------------------------------ 260 254 261 size_t MultiBuffer::addInt(const std::string& name) throw()255 size_t MultiBuffer::addInt(const std::string& name) noexcept 262 256 { 263 257 unfinalize(); … … 268 262 //------------------------------------------------------------------------------ 269 263 270 size_t MultiBuffer::addFloat(const std::string& name) throw()264 size_t MultiBuffer::addFloat(const std::string& name) noexcept 271 265 { 272 266 unfinalize(); … … 277 271 //------------------------------------------------------------------------------ 278 272 279 size_t MultiBuffer::addDouble(const std::string& name) throw()273 size_t MultiBuffer::addDouble(const std::string& name) noexcept 280 274 { 281 275 unfinalize(); … … 287 281 288 282 size_t MultiBuffer::addFloatArray(const std::string& name, size_t length, 289 size_t offset) throw()283 size_t offset) noexcept 290 284 { 291 285 unfinalize(); … … 298 292 299 293 size_t MultiBuffer::addIntArray(const std::string& name, size_t length, 300 size_t offset) throw()294 size_t offset) noexcept 301 295 { 302 296 unfinalize(); … … 309 303 310 304 size_t MultiBuffer::addByteArray(const std::string& name, size_t length, 311 size_t offset) throw()305 size_t offset) noexcept 312 306 { 313 307 unfinalize(); … … 334 328 //------------------------------------------------------------------------------ 335 329 336 void MultiBuffer::registerInXPlane() throw(Exception)330 void MultiBuffer::registerInXPlane() 337 331 { 338 332 if (finalize() && registeredID<0) { … … 350 344 //------------------------------------------------------------------------------ 351 345 352 void MultiBuffer::unregisterFromXPlane() throw(Exception)346 void MultiBuffer::unregisterFromXPlane() 353 347 { 354 348 if (registeredID>=0) { … … 363 357 //------------------------------------------------------------------------------ 364 358 365 bool MultiBuffer::unregisterSafelyFromXPlane() throw()359 bool MultiBuffer::unregisterSafelyFromXPlane() noexcept 366 360 { 367 361 try { … … 376 370 //------------------------------------------------------------------------------ 377 371 378 void MultiBuffer::execute() throw(Exception)372 void MultiBuffer::execute() 379 373 { 380 374 if (data==0 && registeredID>=0) { … … 395 389 396 390 void MultiBuffer::setInt(size_t id, int value) 397 throw(InvalidIDException, TypeMismatchException)398 391 { 399 392 *reinterpret_cast<int32_t*>(getData(id, Protocol::TYPE_INT)) = value; … … 403 396 404 397 int MultiBuffer::getInt(size_t id) const 405 throw(InvalidIDException, TypeMismatchException)406 398 { 407 399 return *reinterpret_cast<const int32_t*>(getData(id, Protocol::TYPE_INT)); … … 411 403 412 404 const int32_t& MultiBuffer::getIntRef(size_t id) const 413 throw(InvalidIDException, TypeMismatchException)414 405 { 415 406 return *reinterpret_cast<const int32_t*>(getData(id, Protocol::TYPE_INT)); … … 419 410 420 411 int32_t& MultiBuffer::getIntRef(size_t id) 421 throw(InvalidIDException, TypeMismatchException)422 412 { 423 413 return *reinterpret_cast<int32_t*>(getData(id, Protocol::TYPE_INT)); … … 427 417 428 418 void MultiBuffer::setFloat(size_t id, float value) 429 throw(InvalidIDException, TypeMismatchException)430 419 { 431 420 *reinterpret_cast<float*>(getData(id, Protocol::TYPE_FLOAT)) = value; … … 435 424 436 425 float MultiBuffer::getFloat(size_t id) const 437 throw(InvalidIDException, TypeMismatchException)438 426 { 439 427 return *reinterpret_cast<const float*>(getData(id, Protocol::TYPE_FLOAT)); … … 443 431 444 432 const float& MultiBuffer::getFloatRef(size_t id) const 445 throw(InvalidIDException, TypeMismatchException)446 433 { 447 434 return *reinterpret_cast<const float*>(getData(id, Protocol::TYPE_FLOAT)); … … 451 438 452 439 float& MultiBuffer::getFloatRef(size_t id) 453 throw(InvalidIDException, TypeMismatchException)454 440 { 455 441 return *reinterpret_cast<float*>(getData(id, Protocol::TYPE_FLOAT)); … … 459 445 460 446 void MultiBuffer::setDouble(size_t id, double value) 461 throw(InvalidIDException, TypeMismatchException)462 447 { 463 448 *reinterpret_cast<double*>(getData(id, Protocol::TYPE_DOUBLE)) = value; … … 467 452 468 453 double MultiBuffer::getDouble(size_t id) const 469 throw(InvalidIDException, TypeMismatchException)470 454 { 471 455 return *reinterpret_cast<const double*>(getData(id, Protocol::TYPE_DOUBLE)); … … 475 459 476 460 const double& MultiBuffer::getDoubleRef(size_t id) const 477 throw(InvalidIDException, TypeMismatchException)478 461 { 479 462 return *reinterpret_cast<const double*>(getData(id, Protocol::TYPE_DOUBLE)); … … 483 466 484 467 double& MultiBuffer::getDoubleRef(size_t id) 485 throw(InvalidIDException, TypeMismatchException)486 468 { 487 469 return *reinterpret_cast<double*>(getData(id, Protocol::TYPE_DOUBLE)); … … 492 474 size_t MultiBuffer::setFloatArray(size_t id, const float* value, 493 475 size_t length, size_t offset) 494 throw(InvalidIDException, TypeMismatchException)495 476 { 496 477 return setArray<float, Protocol::TYPE_FLOAT_ARRAY>(id, value, length, offset); … … 501 482 size_t MultiBuffer::getFloatArray(size_t id, float* value, 502 483 size_t length, size_t offset) const 503 throw(InvalidIDException, TypeMismatchException)504 484 { 505 485 return getArray<float, Protocol::TYPE_FLOAT_ARRAY>(id, value, length, offset); … … 509 489 510 490 const float* MultiBuffer::getFloatArray(size_t id, size_t offset) const 511 throw(InvalidIDException, TypeMismatchException)512 491 { 513 492 return getArray<float, Protocol::TYPE_FLOAT_ARRAY>(id, offset); … … 518 497 size_t MultiBuffer::setIntArray(size_t id, const int32_t* value, 519 498 size_t length, size_t offset) 520 throw(InvalidIDException, TypeMismatchException) 499 521 500 { 522 501 return setArray<int32_t, Protocol::TYPE_INT_ARRAY>(id, value, length, offset); … … 527 506 size_t MultiBuffer::getIntArray(size_t id, int32_t* value, 528 507 size_t length, size_t offset) const 529 throw(InvalidIDException, TypeMismatchException)530 508 { 531 509 return getArray<int32_t, Protocol::TYPE_INT_ARRAY>(id, value, length, offset); … … 535 513 536 514 const int32_t* MultiBuffer::getIntArray(size_t id, size_t offset) const 537 throw(InvalidIDException, TypeMismatchException)538 515 { 539 516 return getArray<int32_t, Protocol::TYPE_INT_ARRAY>(id, offset); … … 544 521 size_t MultiBuffer::setByteArray(size_t id, const uint8_t* value, 545 522 size_t length, size_t offset) 546 throw(InvalidIDException, TypeMismatchException)547 523 { 548 524 return setArray<uint8_t, Protocol::TYPE_BYTE_ARRAY>(id, value, length, offset); … … 553 529 size_t MultiBuffer::getByteArray(size_t id, uint8_t* value, 554 530 size_t length, size_t offset) const 555 throw(InvalidIDException, TypeMismatchException)556 531 { 557 532 return getArray<uint8_t, Protocol::TYPE_BYTE_ARRAY>(id, value, length, offset); … … 561 536 562 537 const uint8_t* MultiBuffer::getByteArray(size_t id, size_t offset) const 563 throw(InvalidIDException, TypeMismatchException)564 538 { 565 539 return getArray<uint8_t, Protocol::TYPE_BYTE_ARRAY>(id, offset); … … 570 544 size_t MultiBuffer::setString(size_t id, const string& value, 571 545 size_t offset) 572 throw(InvalidIDException, TypeMismatchException)573 546 { 574 547 return setByteArray(id, reinterpret_cast<const uint8_t*>(value.c_str()), … … 579 552 580 553 string MultiBuffer::getString(size_t id, size_t offset) const 581 throw(InvalidIDException, TypeMismatchException)582 554 { 583 555 const DataRef& dataRef = getDataRef(id, Protocol::TYPE_BYTE_ARRAY); … … 598 570 599 571 const char* MultiBuffer::getStringPtr(size_t id, size_t offset) const 600 throw(InvalidIDException, TypeMismatchException)601 572 { 602 573 return reinterpret_cast<const char*>(getByteArray(id, offset)); … … 605 576 //------------------------------------------------------------------------------ 606 577 607 void MultiBuffer::writeSpec(uint8_t command) const throw(Exception)578 void MultiBuffer::writeSpec(uint8_t command) const 608 579 { 609 580 xplane.stream->writeU8(command); … … 628 599 //------------------------------------------------------------------------------ 629 600 630 void MultiBuffer::reregisterInXPlane() throw(Exception)601 void MultiBuffer::reregisterInXPlane() 631 602 { 632 603 if (registeredID>=0) { -
src/client/c/hu/varadiistvan/xplra/MultiBuffer.h
r66 r107 92 92 DataRef(const std::string& name, uint8_t type, 93 93 const DataRef* previous = 0, 94 size_t length = 0, size_t offset = 0) throw();94 size_t length = 0, size_t offset = 0) noexcept; 95 95 96 96 /** 97 97 * Get the size of the data represented by this object. 98 98 */ 99 size_t getSize() const throw();99 size_t getSize() const noexcept; 100 100 101 101 /** … … 103 103 * this dataref. 104 104 */ 105 size_t getAlignment() const throw();105 size_t getAlignment() const noexcept; 106 106 107 107 /** 108 108 * Determine if the dataref is an array. 109 109 */ 110 bool isArray() const throw();110 bool isArray() const noexcept; 111 111 112 112 /** … … 114 114 * user parameters. 115 115 */ 116 size_t getCopyLength(size_t userLength, size_t userOffset) const throw();116 size_t getCopyLength(size_t userLength, size_t userOffset) const noexcept; 117 117 }; 118 118 … … 153 153 */ 154 154 MultiBuffer(XPlane& xplane, uint8_t registerCommand, 155 uint8_t unregisterCommand) throw();155 uint8_t unregisterCommand) noexcept; 156 156 157 157 /** … … 159 159 * made to unregister it. 160 160 */ 161 virtual ~MultiBuffer() throw();161 virtual ~MultiBuffer() noexcept; 162 162 163 163 public: … … 165 165 * Get the X-Plane object this buffer belongs to. 166 166 */ 167 XPlane& getXPlane() const throw();167 XPlane& getXPlane() const noexcept; 168 168 169 169 /** … … 173 173 * get the value. 174 174 */ 175 size_t addInt(const std::string& name) throw();175 size_t addInt(const std::string& name) noexcept; 176 176 177 177 /** … … 181 181 * get the value. 182 182 */ 183 size_t addFloat(const std::string& name) throw();183 size_t addFloat(const std::string& name) noexcept; 184 184 185 185 /** … … 189 189 * get the value. 190 190 */ 191 size_t addDouble(const std::string& name) throw();191 size_t addDouble(const std::string& name) noexcept; 192 192 193 193 /** … … 198 198 */ 199 199 size_t addFloatArray(const std::string& name, size_t length, 200 size_t offset = 0) throw();200 size_t offset = 0) noexcept; 201 201 202 202 /** … … 207 207 */ 208 208 size_t addIntArray(const std::string& name, size_t length, 209 size_t offset = 0) throw();209 size_t offset = 0) noexcept; 210 210 211 211 /** … … 216 216 */ 217 217 size_t addByteArray(const std::string& name, size_t length, 218 size_t offset = 0) throw();218 size_t offset = 0) noexcept; 219 219 220 220 /** … … 230 230 * too. 231 231 */ 232 void registerInXPlane() throw(Exception);232 void registerInXPlane(); 233 233 234 234 /** 235 235 * Unregister this buffer from X-Plane. 236 236 */ 237 void unregisterFromXPlane() throw(Exception);237 void unregisterFromXPlane(); 238 238 239 239 /** … … 244 244 * @return whether unregistration succeeded. 245 245 */ 246 bool unregisterSafelyFromXPlane() throw();246 bool unregisterSafelyFromXPlane() noexcept; 247 247 248 248 /** … … 252 252 * and it will be re-registered after finalizing. 253 253 */ 254 void execute() throw(Exception);254 void execute(); 255 255 256 256 /** 257 257 * Set the value of an integer dataref with the given ID. 258 258 */ 259 void setInt(size_t id, int value) 260 throw(InvalidIDException, TypeMismatchException); 259 void setInt(size_t id, int value); 261 260 262 261 /** 263 262 * Get the value of an integer dataref with the given ID. 264 263 */ 265 int getInt(size_t id) const 266 throw(InvalidIDException, TypeMismatchException); 264 int getInt(size_t id) const; 267 265 268 266 /** 269 267 * Get a reference to the integer dataref with the given ID 270 268 */ 271 const int32_t& getIntRef(size_t id) const 272 throw(InvalidIDException, TypeMismatchException); 269 const int32_t& getIntRef(size_t id) const; 273 270 274 271 /** 275 272 * Get a reference to the integer dataref with the given ID 276 273 */ 277 int32_t& getIntRef(size_t id) 278 throw(InvalidIDException, TypeMismatchException); 274 int32_t& getIntRef(size_t id); 279 275 280 276 /** 281 277 * Set the value of a float dataref with the given ID. 282 278 */ 283 void setFloat(size_t id, float value) 284 throw(InvalidIDException, TypeMismatchException); 279 void setFloat(size_t id, float value); 285 280 286 281 /** 287 282 * Get the value of a float dataref with the given ID. 288 283 */ 289 float getFloat(size_t id) const 290 throw(InvalidIDException, TypeMismatchException); 284 float getFloat(size_t id) const; 291 285 292 286 /** 293 287 * Get a reference to the float dataref with the given ID 294 288 */ 295 const float& getFloatRef(size_t id) const 296 throw(InvalidIDException, TypeMismatchException); 289 const float& getFloatRef(size_t id) const; 297 290 298 291 /** 299 292 * Get a reference to the integer dataref with the given ID 300 293 */ 301 float& getFloatRef(size_t id) 302 throw(InvalidIDException, TypeMismatchException); 294 float& getFloatRef(size_t id); 303 295 304 296 /** 305 297 * Set the value of a double dataref with the given ID. 306 298 */ 307 void setDouble(size_t id, double value) 308 throw(InvalidIDException, TypeMismatchException); 299 void setDouble(size_t id, double value); 309 300 310 301 /** 311 302 * Get the value of a double dataref with the given ID. 312 303 */ 313 double getDouble(size_t id) const 314 throw(InvalidIDException, TypeMismatchException); 304 double getDouble(size_t id) const; 315 305 316 306 /** 317 307 * Get a reference to the double dataref with the given ID 318 308 */ 319 const double& getDoubleRef(size_t id) const 320 throw(InvalidIDException, TypeMismatchException); 309 const double& getDoubleRef(size_t id) const; 321 310 322 311 /** 323 312 * Get a reference to the double dataref with the given ID 324 313 */ 325 double& getDoubleRef(size_t id) 326 throw(InvalidIDException, TypeMismatchException); 314 double& getDoubleRef(size_t id); 327 315 328 316 /** … … 340 328 */ 341 329 size_t setFloatArray(size_t id, const float* value, 342 size_t length = 0, size_t offset = 0) 343 throw(InvalidIDException, TypeMismatchException); 330 size_t length = 0, size_t offset = 0); 344 331 345 332 /** … … 357 344 */ 358 345 size_t getFloatArray(size_t id, float* value, 359 size_t length = 0, size_t offset = 0) const 360 throw(InvalidIDException, TypeMismatchException); 346 size_t length = 0, size_t offset = 0) const; 361 347 362 348 /** … … 368 354 * than the length of the buffer, 0 is returned. 369 355 */ 370 const float* getFloatArray(size_t id, size_t offset = 0) const 371 throw(InvalidIDException, TypeMismatchException); 356 const float* getFloatArray(size_t id, size_t offset = 0) const; 372 357 373 358 /** … … 385 370 */ 386 371 size_t setIntArray(size_t id, const int32_t* value, 387 size_t length = 0, size_t offset = 0) 388 throw(InvalidIDException, TypeMismatchException); 372 size_t length = 0, size_t offset = 0); 389 373 390 374 /** … … 402 386 */ 403 387 size_t getIntArray(size_t id, int32_t* value, 404 size_t length = 0, size_t offset = 0) const 405 throw(InvalidIDException, TypeMismatchException); 388 size_t length = 0, size_t offset = 0) const; 406 389 407 390 /** … … 412 395 * than the length of the buffer, 0 is returned. 413 396 */ 414 const int32_t* getIntArray(size_t id, size_t offset = 0) const 415 throw(InvalidIDException, TypeMismatchException); 416 397 const int32_t* getIntArray(size_t id, size_t offset = 0) const; 417 398 418 399 /** … … 430 411 */ 431 412 size_t setByteArray(size_t id, const uint8_t* value, 432 size_t length = 0, size_t offset = 0) 433 throw(InvalidIDException, TypeMismatchException); 413 size_t length = 0, size_t offset = 0); 434 414 435 415 /** … … 447 427 */ 448 428 size_t getByteArray(size_t id, uint8_t* value, 449 size_t length = 0, size_t offset = 0) const 450 throw(InvalidIDException, TypeMismatchException); 429 size_t length = 0, size_t offset = 0) const; 451 430 452 431 /** … … 457 436 * than the length of the buffer, 0 is returned. 458 437 */ 459 const uint8_t* getByteArray(size_t id, size_t offset = 0) const 460 throw(InvalidIDException, TypeMismatchException); 438 const uint8_t* getByteArray(size_t id, size_t offset = 0) const; 461 439 462 440 … … 469 447 */ 470 448 size_t setString(size_t id, const std::string& value, 471 size_t offset = 0) 472 throw(InvalidIDException, TypeMismatchException); 449 size_t offset = 0); 473 450 474 451 /** … … 476 453 * a string. 477 454 */ 478 std::string getString(size_t id, size_t offset = 0) const 479 throw(InvalidIDException, TypeMismatchException); 480 455 std::string getString(size_t id, size_t offset = 0) const; 456 481 457 /** 482 458 * Get a string pointer to the value of the byte array dataref 483 459 * with the given ID. 484 460 */ 485 const char* getStringPtr(size_t id, size_t offset = 0) const 486 throw(InvalidIDException, TypeMismatchException); 461 const char* getStringPtr(size_t id, size_t offset = 0) const; 487 462 488 463 protected: … … 491 466 * registered. 492 467 */ 493 virtual void doExecute() throw(Exception)= 0;468 virtual void doExecute() = 0; 494 469 495 470 /** … … 497 472 * not registered. 498 473 */ 499 virtual void doExecuteUnregistered() throw(Exception)= 0;474 virtual void doExecuteUnregistered() = 0; 500 475 501 476 /** … … 503 478 * checks the result 504 479 */ 505 void writeSpec(uint8_t command) const throw(Exception);480 void writeSpec(uint8_t command) const; 506 481 507 482 /** … … 516 491 * again 517 492 */ 518 void reregisterInXPlane() throw(Exception);493 void reregisterInXPlane(); 519 494 520 495 private: … … 522 497 * Unfinalize the buffer, if it is finalized. 523 498 */ 524 void unfinalize() throw();499 void unfinalize() noexcept; 525 500 526 501 /** … … 530 505 * multi-buffers. 531 506 */ 532 void forgetRegistration() throw();507 void forgetRegistration() noexcept; 533 508 534 509 /** 535 510 * Get the last dataref, or 0 if there are not datarefs yet. 536 511 */ 537 const DataRef* getLastDataRef() const throw();512 const DataRef* getLastDataRef() const noexcept; 538 513 539 514 /** … … 541 516 * type. Otherwise throw an exception. 542 517 */ 543 const DataRef& getDataRef(size_t id, uint8_t type) const 544 throw(InvalidIDException, TypeMismatchException); 518 const DataRef& getDataRef(size_t id, uint8_t type) const; 545 519 546 520 /** … … 548 522 * given type. If the buffer is not finalized yet, it will be. 549 523 */ 550 void* getData(size_t id, uint8_t type) 551 throw(InvalidIDException, TypeMismatchException); 524 void* getData(size_t id, uint8_t type); 552 525 553 526 /** … … 555 528 * given type. If the buffer is not finalized yet, it will be. 556 529 */ 557 const void* getData(size_t id, uint8_t type) const 558 throw(InvalidIDException, TypeMismatchException); 530 const void* getData(size_t id, uint8_t type) const; 559 531 560 532 /** … … 562 534 */ 563 535 template <typename T, uint8_t type> size_t 564 setArray(size_t id, const T* value, size_t length, size_t offset) 565 throw(InvalidIDException, TypeMismatchException); 536 setArray(size_t id, const T* value, size_t length, size_t offset); 566 537 567 538 /** … … 570 541 */ 571 542 template <typename T, uint8_t type> size_t 572 getArray(size_t id, T* value, size_t length, size_t offset) const 573 throw(InvalidIDException, TypeMismatchException); 543 getArray(size_t id, T* value, size_t length, size_t offset) const; 574 544 575 545 /** … … 578 548 */ 579 549 template <typename T, uint8_t type> const T* 580 getArray(size_t id, size_t offset) const 581 throw(InvalidIDException, TypeMismatchException); 550 getArray(size_t id, size_t offset) const; 582 551 583 552 friend class XPlane; … … 588 557 //------------------------------------------------------------------------------ 589 558 590 inline XPlane& MultiBuffer::getXPlane() const throw()559 inline XPlane& MultiBuffer::getXPlane() const noexcept 591 560 { 592 561 return xplane; -
src/client/c/hu/varadiistvan/xplra/MultiGetter.cc
r40 r107 50 50 //------------------------------------------------------------------------------ 51 51 52 MultiGetter::MultiGetter(XPlane& xplane) throw():52 MultiGetter::MultiGetter(XPlane& xplane) noexcept : 53 53 MultiBuffer(xplane, Protocol::COMMAND_REGISTER_GET_MULTI, 54 54 Protocol::COMMAND_UNREGISTER_GET_MULTI) … … 58 58 //------------------------------------------------------------------------------ 59 59 60 inline void MultiGetter::read(const DataRef& dataRef) throw(Exception)60 inline void MultiGetter::read(const DataRef& dataRef) 61 61 { 62 62 switch (dataRef.type) { … … 91 91 //------------------------------------------------------------------------------ 92 92 93 void MultiGetter::doExecute() throw(Exception)93 void MultiGetter::doExecute() 94 94 { 95 95 xplane.checkStream(); … … 105 105 //------------------------------------------------------------------------------ 106 106 107 void MultiGetter::doExecuteUnregistered() throw(Exception)107 void MultiGetter::doExecuteUnregistered() 108 108 { 109 109 writeSpec(Protocol::COMMAND_GET_MULTI); … … 114 114 //------------------------------------------------------------------------------ 115 115 116 void MultiGetter::readValues() throw(Exception)116 void MultiGetter::readValues() 117 117 { 118 118 for(vector<DataRef>::const_iterator i = dataRefs.begin(); -
src/client/c/hu/varadiistvan/xplra/MultiGetter.h
r33 r107 48 48 * Construct the object for the given XPlane instance. 49 49 */ 50 MultiGetter(XPlane& xplane) throw();50 MultiGetter(XPlane& xplane) noexcept; 51 51 52 52 protected: … … 54 54 * @see MultiBuffer::doExecute 55 55 */ 56 virtual void doExecute() throw(Exception);56 virtual void doExecute(); 57 57 58 58 /** 59 59 * @see MultiBuffer::doExecuteUnregistered 60 60 */ 61 virtual void doExecuteUnregistered() throw(Exception);61 virtual void doExecuteUnregistered(); 62 62 63 63 private: … … 66 66 * buffer. 67 67 */ 68 void read(const DataRef& dataRef) throw(Exception);68 void read(const DataRef& dataRef); 69 69 70 70 /** 71 71 * Read all the values. 72 72 */ 73 void readValues() throw(Exception);73 void readValues(); 74 74 75 75 friend class XPlane; -
src/client/c/hu/varadiistvan/xplra/MultiSetter.cc
r40 r107 48 48 //------------------------------------------------------------------------------ 49 49 50 MultiSetter::MultiSetter(XPlane& xplane) throw():50 MultiSetter::MultiSetter(XPlane& xplane) noexcept : 51 51 MultiBuffer(xplane, Protocol::COMMAND_REGISTER_SET_MULTI, 52 52 Protocol::COMMAND_UNREGISTER_SET_MULTI) … … 56 56 //------------------------------------------------------------------------------ 57 57 58 inline void MultiSetter::write(const DataRef& dataRef) const throw(Exception)58 inline void MultiSetter::write(const DataRef& dataRef) const 59 59 { 60 60 switch (dataRef.type) { … … 87 87 //------------------------------------------------------------------------------ 88 88 89 void MultiSetter::doExecute() throw(Exception)89 void MultiSetter::doExecute() 90 90 { 91 91 xplane.checkStream(); … … 104 104 //------------------------------------------------------------------------------ 105 105 106 void MultiSetter::doExecuteUnregistered() throw(Exception)106 void MultiSetter::doExecuteUnregistered() 107 107 { 108 108 xplane.stream->writeU8(Protocol::COMMAND_SET_MULTI); -
src/client/c/hu/varadiistvan/xplra/MultiSetter.h
r26 r107 48 48 * Construct the object for the given XPlane instance. 49 49 */ 50 MultiSetter(XPlane& xplane) throw();50 MultiSetter(XPlane& xplane) noexcept; 51 51 52 52 protected: … … 54 54 * @see MultiBuffer::doExecute 55 55 */ 56 virtual void doExecute() throw(Exception);56 virtual void doExecute(); 57 57 58 58 /** 59 59 * @see MultiBuffer::doExecuteUnregistered 60 60 */ 61 virtual void doExecuteUnregistered() throw(Exception);61 virtual void doExecuteUnregistered(); 62 62 63 63 private: … … 66 66 * stream. 67 67 */ 68 void write(const DataRef& dataRef) const throw(Exception);68 void write(const DataRef& dataRef) const; 69 69 70 70 friend class XPlane; -
src/client/c/hu/varadiistvan/xplra/XPlane.cc
r92 r107 63 63 //------------------------------------------------------------------------------ 64 64 65 void XPlane::checkStream() throw(NotConnectedException, IOException)65 void XPlane::checkStream() 66 66 { 67 67 if (stream==0) { … … 74 74 //------------------------------------------------------------------------------ 75 75 76 void XPlane::checkResult(uint8_t result, bool hasParameter, long parameter) 77 throw(ProtocolException) 76 void XPlane::checkResult(uint8_t result, bool hasParameter, long parameter) 78 77 { 79 78 switch(result) { … … 113 112 //------------------------------------------------------------------------------ 114 113 115 void XPlane::checkResult(bool multi) throw(ProtocolException, IOException)114 void XPlane::checkResult(bool multi) 116 115 { 117 116 uint8_t result = stream->readU8(); … … 131 130 //------------------------------------------------------------------------------ 132 131 133 XPlane::~XPlane() throw()132 XPlane::~XPlane() noexcept 134 133 { 135 134 disconnect(); … … 145 144 //------------------------------------------------------------------------------ 146 145 147 void XPlane::connect() throw(IOException)146 void XPlane::connect() 148 147 { 149 148 if (socket!=0) return; … … 180 179 //------------------------------------------------------------------------------ 181 180 182 void XPlane::disconnect() throw()181 void XPlane::disconnect() noexcept 183 182 { 184 183 if (socket==0) return; … … 190 189 //------------------------------------------------------------------------------ 191 190 192 MultiGetter& XPlane::createMultiGetter() throw()191 MultiGetter& XPlane::createMultiGetter() noexcept 193 192 { 194 193 MultiGetter* getter = new MultiGetter(*this); … … 199 198 //------------------------------------------------------------------------------ 200 199 201 MultiSetter& XPlane::createMultiSetter() throw()200 MultiSetter& XPlane::createMultiSetter() noexcept 202 201 { 203 202 MultiSetter* setter = new MultiSetter(*this); … … 208 207 //------------------------------------------------------------------------------ 209 208 210 bool XPlane::destroyMultiBuffer(MultiBuffer& buffer) throw(Exception)209 bool XPlane::destroyMultiBuffer(MultiBuffer& buffer) 211 210 { 212 211 multiBuffers_t::iterator i = multiBuffers.find(&buffer); … … 221 220 //------------------------------------------------------------------------------ 222 221 223 void XPlane::getVersions(int& xplaneVersion, int& xplmVersion, int& xplraVersion) 224 throw(Exception) 222 void XPlane::getVersions(int& xplaneVersion, int& xplmVersion, int& xplraVersion) 225 223 { 226 224 stream->writeU8(Protocol::COMMAND_GET_VERSIONS); … … 237 235 //------------------------------------------------------------------------------ 238 236 239 void XPlane::reloadPlugins() throw(Exception)237 void XPlane::reloadPlugins() 240 238 { 241 239 stream->writeU8(Protocol::COMMAND_RELOAD_PLUGINS); … … 246 244 //------------------------------------------------------------------------------ 247 245 248 void XPlane::saveSituation(const char* path) throw(Exception)246 void XPlane::saveSituation(const char* path) 249 247 { 250 248 stream->writeU8(Protocol::COMMAND_SAVE_SITUATION); … … 256 254 //------------------------------------------------------------------------------ 257 255 258 void XPlane::getScalar(const char* name, uint8_t type) throw(Exception)256 void XPlane::getScalar(const char* name, uint8_t type) 259 257 { 260 258 checkStream(); … … 270 268 //------------------------------------------------------------------------------ 271 269 272 int XPlane::getInt(const char* name) throw(Exception)270 int XPlane::getInt(const char* name) 273 271 { 274 272 getScalar(name, Protocol::TYPE_INT); … … 281 279 //------------------------------------------------------------------------------ 282 280 283 float XPlane::getFloat(const char* name) throw(Exception)281 float XPlane::getFloat(const char* name) 284 282 { 285 283 getScalar(name, Protocol::TYPE_FLOAT); … … 292 290 //------------------------------------------------------------------------------ 293 291 294 double XPlane::getDouble(const char* name) throw(Exception)292 double XPlane::getDouble(const char* name) 295 293 { 296 294 getScalar(name, Protocol::TYPE_DOUBLE); … … 304 302 305 303 size_t XPlane::getArray(const char* name, uint8_t type, 306 ssize_t length, size_t offset) throw(Exception)304 ssize_t length, size_t offset) 307 305 { 308 306 checkStream(); … … 326 324 327 325 size_t XPlane::getFloatArray(const char* name, float* dest, 328 size_t length, size_t offset) throw(Exception)326 size_t length, size_t offset) 329 327 { 330 328 length = getArray(name, Protocol::TYPE_FLOAT_ARRAY, length, offset); … … 338 336 339 337 float* XPlane::getFloatArray(const char* name, size_t& length, 340 size_t offset) throw(Exception)338 size_t offset) 341 339 { 342 340 length = getArray(name, Protocol::TYPE_FLOAT_ARRAY, -1, offset); … … 350 348 351 349 size_t XPlane::getIntArray(const char* name, int32_t* dest, 352 size_t length, size_t offset) throw(Exception)350 size_t length, size_t offset) 353 351 { 354 352 length = getArray(name, Protocol::TYPE_INT_ARRAY, length, offset); … … 362 360 363 361 int32_t* XPlane::getIntArray(const char* name, size_t& length, 364 size_t offset) throw(Exception)362 size_t offset) 365 363 { 366 364 length = getArray(name, Protocol::TYPE_INT_ARRAY, -1, offset); … … 374 372 375 373 size_t XPlane::getByteArray(const char* name, uint8_t* dest, 376 size_t length, size_t offset) throw(Exception)374 size_t length, size_t offset) 377 375 { 378 376 length = getArray(name, Protocol::TYPE_BYTE_ARRAY, length, offset); … … 386 384 387 385 uint8_t* XPlane::getByteArray(const char* name, size_t& length, 388 size_t offset) throw(Exception)386 size_t offset) 389 387 { 390 388 length = getArray(name, Protocol::TYPE_BYTE_ARRAY, -1, offset); … … 397 395 //------------------------------------------------------------------------------ 398 396 399 string XPlane::getString(const char* name, size_t offset) throw(Exception)397 string XPlane::getString(const char* name, size_t offset) 400 398 { 401 399 size_t length = 0; … … 406 404 //------------------------------------------------------------------------------ 407 405 408 void XPlane::setScalar(const char* name, uint8_t type) throw(Exception)406 void XPlane::setScalar(const char* name, uint8_t type) 409 407 { 410 408 stream->writeU8(Protocol::COMMAND_SET_SINGLE); … … 415 413 //------------------------------------------------------------------------------ 416 414 417 void XPlane::setInt(const char* name, int value) throw(Exception)415 void XPlane::setInt(const char* name, int value) 418 416 { 419 417 setScalar(name, Protocol::TYPE_INT); … … 425 423 //------------------------------------------------------------------------------ 426 424 427 void XPlane::setFloat(const char* name, float value) throw(Exception)425 void XPlane::setFloat(const char* name, float value) 428 426 { 429 427 setScalar(name, Protocol::TYPE_FLOAT); … … 435 433 //------------------------------------------------------------------------------ 436 434 437 void XPlane::setDouble(const char* name, double value) throw(Exception)435 void XPlane::setDouble(const char* name, double value) 438 436 { 439 437 setScalar(name, Protocol::TYPE_DOUBLE); … … 446 444 447 445 void XPlane::setArray(const char* name, uint8_t type, size_t length, 448 size_t offset) throw(Exception)446 size_t offset) 449 447 { 450 448 stream->writeU8(Protocol::COMMAND_SET_SINGLE); … … 458 456 459 457 void XPlane::setFloatArray(const char* name, const float* values, size_t length, 460 size_t offset) throw(Exception)458 size_t offset) 461 459 { 462 460 setArray(name, Protocol::TYPE_FLOAT_ARRAY, length, offset); … … 469 467 470 468 void XPlane::setIntArray(const char* name, const int32_t* values, size_t length, 471 size_t offset) throw(Exception)469 size_t offset) 472 470 { 473 471 setArray(name, Protocol::TYPE_INT_ARRAY, length, offset); … … 480 478 481 479 void XPlane::setByteArray(const char* name, const uint8_t* values, size_t length, 482 size_t offset) throw(Exception)480 size_t offset) 483 481 { 484 482 setArray(name, Protocol::TYPE_BYTE_ARRAY, length, offset); … … 491 489 492 490 void XPlane::setString(const char* name, const char* value, size_t length, 493 size_t offset) throw(Exception)491 size_t offset) 494 492 { 495 493 size_t valueLength = strlen(value); … … 507 505 //------------------------------------------------------------------------------ 508 506 509 void XPlane::showMessage(const char* message, float duration) throw(Exception)507 void XPlane::showMessage(const char* message, float duration) 510 508 { 511 509 stream->writeU8(Protocol::COMMAND_SHOW_MESSAGE); … … 519 517 520 518 void XPlane::registerHotkeys(const uint16_t* codes, size_t length) 521 throw(Exception)519 522 520 { 523 521 stream->writeU8(Protocol::COMMAND_REGISTER_HOTKEYS); … … 530 528 //------------------------------------------------------------------------------ 531 529 532 void XPlane::queryHotkeys(uint8_t* states, size_t length) throw(Exception)530 void XPlane::queryHotkeys(uint8_t* states, size_t length) 533 531 { 534 532 stream->writeU8(Protocol::COMMAND_QUERY_HOTKEYS); -
src/client/c/hu/varadiistvan/xplra/XPlane.h
r87 r107 98 98 * yet. 99 99 */ 100 XPlane() throw();100 XPlane() noexcept; 101 101 102 102 /** … … 105 105 * become invalid. 106 106 */ 107 ~XPlane() throw();107 ~XPlane() noexcept; 108 108 109 109 /** 110 110 * Connect to the simulator. 111 111 */ 112 void connect() throw(IOException);112 void connect(); 113 113 114 114 /** 115 115 * Check if we are connected to the simulator. 116 116 */ 117 bool isConnected() const throw();117 bool isConnected() const noexcept; 118 118 119 119 /** 120 120 * Disconnect from the simulator. 121 121 */ 122 void disconnect() throw();122 void disconnect() noexcept; 123 123 124 124 /** … … 126 126 * to it. 127 127 */ 128 MultiGetter& createMultiGetter() throw();128 MultiGetter& createMultiGetter() noexcept; 129 129 130 130 /** … … 132 132 * to it. 133 133 */ 134 MultiSetter& createMultiSetter() throw();134 MultiSetter& createMultiSetter() noexcept; 135 135 136 136 /** … … 142 142 * @return if the buffer was found and could be destroyed 143 143 */ 144 bool destroyMultiBuffer(MultiBuffer& buffer) throw(Exception);144 bool destroyMultiBuffer(MultiBuffer& buffer); 145 145 146 146 /** 147 147 * Get the versions of X-Plane, XPLM and the XPLRA plugin. 148 148 */ 149 void getVersions(int& xplaneVersion, int& xplmVersion, int& xplraVersion) throw(Exception);149 void getVersions(int& xplaneVersion, int& xplmVersion, int& xplraVersion); 150 150 151 151 /** … … 153 153 * fails. 154 154 */ 155 void reloadPlugins() throw(Exception);155 void reloadPlugins(); 156 156 157 157 /** … … 159 159 * which is relative to the directory of X-Plane. 160 160 */ 161 void saveSituation(const char* path) throw(Exception);161 void saveSituation(const char* path); 162 162 163 163 /** 164 164 * Get the integer value of the dataref with the given name. 165 165 */ 166 int getInt(const char* name) throw(Exception);166 int getInt(const char* name); 167 167 168 168 /** 169 169 * Get a float value. 170 170 */ 171 float getFloat(const char* name) throw(Exception);171 float getFloat(const char* name); 172 172 173 173 /** 174 174 * Get a double value. 175 175 */ 176 double getDouble(const char* name) throw(Exception);176 double getDouble(const char* name); 177 177 178 178 /** … … 187 187 */ 188 188 size_t getFloatArray(const char* name, float* dest, 189 size_t length, size_t offset = 0) throw(Exception);189 size_t length, size_t offset = 0); 190 190 191 191 /** … … 198 198 */ 199 199 float* getFloatArray(const char* name, size_t& length, 200 size_t offset = 0) throw(Exception);200 size_t offset = 0); 201 201 202 202 /** … … 211 211 */ 212 212 size_t getIntArray(const char* name, int32_t* dest, 213 size_t length, size_t offset = 0) throw(Exception);213 size_t length, size_t offset = 0); 214 214 215 215 /** … … 222 222 */ 223 223 int32_t* getIntArray(const char* name, size_t& length, 224 size_t offset = 0) throw(Exception);224 size_t offset = 0); 225 225 226 226 /** … … 235 235 */ 236 236 size_t getByteArray(const char* name, uint8_t* dest, 237 size_t length, size_t offset = 0) throw(Exception);237 size_t length, size_t offset = 0); 238 238 239 239 /** … … 246 246 */ 247 247 uint8_t* getByteArray(const char* name, size_t& length, 248 size_t offset = 0) throw(Exception);248 size_t offset = 0); 249 249 250 250 /** 251 251 * Get a string. A string is a byte array. 252 252 */ 253 std::string getString(const char* name, size_t offset = 0) throw(Exception);253 std::string getString(const char* name, size_t offset = 0); 254 254 255 255 /** 256 256 * Set the given dataref to the given integer value. 257 257 */ 258 void setInt(const char* name, int value) throw(Exception);258 void setInt(const char* name, int value); 259 259 260 260 /** 261 261 * Set the given dataref to the given float value. 262 262 */ 263 void setFloat(const char* name, float value) throw(Exception);263 void setFloat(const char* name, float value); 264 264 265 265 /** 266 266 * Set the given dataref to the given double value. 267 267 */ 268 void setDouble(const char* name, double value) throw(Exception);268 void setDouble(const char* name, double value); 269 269 270 270 /** … … 272 272 */ 273 273 void setFloatArray(const char* name, const float* values, size_t length, 274 size_t offset = 0) throw(Exception);274 size_t offset = 0); 275 275 276 276 /** … … 278 278 */ 279 279 void setIntArray(const char* name, const int32_t* values, size_t length, 280 size_t offset = 0) throw(Exception);280 size_t offset = 0); 281 281 282 282 /** … … 284 284 */ 285 285 void setByteArray(const char* name, const uint8_t* values, size_t length, 286 size_t offset = 0) throw(Exception);286 size_t offset = 0); 287 287 288 288 /** … … 293 293 */ 294 294 void setString(const char* name, const char* value, size_t length, 295 size_t offset = 0) throw(Exception);295 size_t offset = 0); 296 296 297 297 /** 298 298 * Show a textual message for a certain duration. 299 299 */ 300 void showMessage(const char* message, float duration) throw(Exception);300 void showMessage(const char* message, float duration); 301 301 302 302 /** … … 304 304 * existing set of hotkeys registered, those will be overwritten. 305 305 */ 306 void registerHotkeys(const uint16_t* codes, size_t length) throw(Exception);306 void registerHotkeys(const uint16_t* codes, size_t length); 307 307 308 308 /** 309 309 * Query the registered hotkeys whether they were pressed. 310 310 */ 311 void queryHotkeys(uint8_t* states, size_t length) throw(Exception);311 void queryHotkeys(uint8_t* states, size_t length); 312 312 313 313 /** … … 320 320 * Check if we have a stream and if it has not failed. 321 321 */ 322 void checkStream() throw(NotConnectedException, IOException);322 void checkStream(); 323 323 324 324 /** … … 327 327 */ 328 328 void checkResult(uint8_t result, bool hasParameter = false, 329 long parameter = 0) throw(ProtocolException);329 long parameter = 0); 330 330 331 331 /** … … 334 334 * is some problem with the stream, an IOException is thrown. 335 335 */ 336 void checkResult(bool multi = false) throw(ProtocolException, IOException);336 void checkResult(bool multi = false); 337 337 338 338 /** … … 340 340 * also checked, but the value should be read by the caller. 341 341 */ 342 void getScalar(const char* name, uint8_t type) throw(Exception);342 void getScalar(const char* name, uint8_t type); 343 343 344 344 /** … … 350 350 */ 351 351 size_t getArray(const char* name, uint8_t type, 352 ssize_t length, size_t offset) throw(Exception);352 ssize_t length, size_t offset); 353 353 354 354 … … 356 356 * Issue the command to set a scalar value of the given type. 357 357 */ 358 void setScalar(const char* name, uint8_t type) throw(Exception);358 void setScalar(const char* name, uint8_t type); 359 359 360 360 /** … … 362 362 */ 363 363 void setArray(const char* name, uint8_t type, size_t length, 364 size_t offset) throw(Exception);364 size_t offset); 365 365 366 366 friend class MultiBuffer; … … 373 373 //------------------------------------------------------------------------------ 374 374 375 inline XPlane::XPlane() throw():375 inline XPlane::XPlane() noexcept : 376 376 socket(0), 377 377 stream(0) … … 381 381 //------------------------------------------------------------------------------ 382 382 383 inline bool XPlane::isConnected() const throw()383 inline bool XPlane::isConnected() const noexcept 384 384 { 385 385 return socket!=0; -
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.