Changeset 107:614b9ff033c1 in xplra for src/client


Ignore:
Timestamp:
12/15/22 19:26:40 (2 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Modernized the exception specifications in the C++ client

Location:
src/client/c/hu/varadiistvan/xplra
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • src/client/c/hu/varadiistvan/xplra/MultiBuffer.cc

    r66 r107  
    5454inline MultiBuffer::DataRef::DataRef(const string& name, uint8_t type,
    5555                                     const DataRef* previous,
    56                                      size_t length, size_t offset) throw() :
     56                                     size_t length, size_t offset) noexcept :
    5757    name(name),
    5858    type(type),
     
    7171//------------------------------------------------------------------------------
    7272
    73 inline size_t MultiBuffer::DataRef::getSize() const throw()
     73inline size_t MultiBuffer::DataRef::getSize() const noexcept
    7474{
    7575    switch (type) {
     
    9393//------------------------------------------------------------------------------
    9494
    95 inline size_t MultiBuffer::DataRef::getAlignment() const throw()
     95inline size_t MultiBuffer::DataRef::getAlignment() const noexcept
    9696{
    9797    switch (type) {
     
    112112//------------------------------------------------------------------------------
    113113
    114 bool MultiBuffer::DataRef::isArray() const throw()
     114bool MultiBuffer::DataRef::isArray() const noexcept
    115115{
    116116    return
     
    124124inline size_t
    125125MultiBuffer::DataRef::getCopyLength(size_t userLength, size_t userOffset)
    126     const throw()
     126    const noexcept
    127127{
    128128    size_t maxLength =
     
    134134//------------------------------------------------------------------------------
    135135
    136 inline void MultiBuffer::unfinalize() throw()
     136inline void MultiBuffer::unfinalize() noexcept
    137137{
    138138    delete data; data = 0;
     
    141141//------------------------------------------------------------------------------
    142142
    143 void MultiBuffer::forgetRegistration() throw()
     143void MultiBuffer::forgetRegistration() noexcept
    144144{
    145145    registeredID = -1;
     
    148148//------------------------------------------------------------------------------
    149149
    150 inline const MultiBuffer::DataRef* MultiBuffer::getLastDataRef() const throw()
     150inline const MultiBuffer::DataRef* MultiBuffer::getLastDataRef() const noexcept
    151151{
    152152    return dataRefs.empty() ? 0 : &(dataRefs.back());
     
    156156
    157157inline const MultiBuffer::DataRef& MultiBuffer::getDataRef(size_t id, uint8_t type) const
    158     throw(InvalidIDException, TypeMismatchException)
    159158{
    160159    if (id>=dataRefs.size()) throw InvalidIDException();
     
    167166
    168167inline void* MultiBuffer::getData(size_t id, uint8_t type)
    169     throw(InvalidIDException, TypeMismatchException)
    170168{
    171169    const DataRef& dataRef = getDataRef(id, type);
     
    177175
    178176inline const void* MultiBuffer::getData(size_t id, uint8_t type) const
    179     throw(InvalidIDException, TypeMismatchException)
    180177{
    181178    const DataRef& dataRef = getDataRef(id, type);
     
    189186inline MultiBuffer::setArray(size_t id, const T* value,
    190187                             size_t length, size_t offset)
    191     throw(InvalidIDException, TypeMismatchException)
    192188{
    193189    const DataRef& dataRef = getDataRef(id, type);
     
    209205inline size_t MultiBuffer::getArray(size_t id, T* value,
    210206                                    size_t length, size_t offset) const
    211     throw(InvalidIDException, TypeMismatchException)
    212207{
    213208    const DataRef& dataRef = getDataRef(id, type);
     
    228223template <typename T, uint8_t type>
    229224inline const T* MultiBuffer::getArray(size_t id, size_t offset) const
    230     throw(InvalidIDException, TypeMismatchException)
    231225{
    232226    const DataRef& dataRef = getDataRef(id, type);
     
    240234
    241235MultiBuffer::MultiBuffer(XPlane& xplane, uint8_t registerCommand,
    242                          uint8_t unregisterCommand) throw() :
     236                         uint8_t unregisterCommand) noexcept :
    243237    data(0),
    244238    xplane(xplane),
     
    251245//------------------------------------------------------------------------------
    252246
    253 MultiBuffer::~MultiBuffer() throw()
     247MultiBuffer::~MultiBuffer() noexcept
    254248{
    255249    unregisterSafelyFromXPlane();
     
    259253//------------------------------------------------------------------------------
    260254
    261 size_t MultiBuffer::addInt(const std::string& name) throw()
     255size_t MultiBuffer::addInt(const std::string& name) noexcept
    262256{
    263257    unfinalize();
     
    268262//------------------------------------------------------------------------------
    269263
    270 size_t MultiBuffer::addFloat(const std::string& name) throw()
     264size_t MultiBuffer::addFloat(const std::string& name) noexcept
    271265{
    272266    unfinalize();
     
    277271//------------------------------------------------------------------------------
    278272
    279 size_t MultiBuffer::addDouble(const std::string& name) throw()
     273size_t MultiBuffer::addDouble(const std::string& name) noexcept
    280274{
    281275    unfinalize();
     
    287281
    288282size_t MultiBuffer::addFloatArray(const std::string& name, size_t length,
    289                                   size_t offset) throw()
     283                                  size_t offset) noexcept
    290284{
    291285    unfinalize();
     
    298292
    299293size_t MultiBuffer::addIntArray(const std::string& name, size_t length,
    300                                 size_t offset) throw()
     294                                size_t offset) noexcept
    301295{
    302296    unfinalize();
     
    309303
    310304size_t MultiBuffer::addByteArray(const std::string& name, size_t length,
    311                                  size_t offset) throw()
     305                                 size_t offset) noexcept
    312306{
    313307    unfinalize();
     
    334328//------------------------------------------------------------------------------
    335329
    336 void MultiBuffer::registerInXPlane() throw(Exception)
     330void MultiBuffer::registerInXPlane()
    337331{
    338332    if (finalize() && registeredID<0) {
     
    350344//------------------------------------------------------------------------------
    351345
    352 void MultiBuffer::unregisterFromXPlane() throw(Exception)
     346void MultiBuffer::unregisterFromXPlane()
    353347{
    354348    if (registeredID>=0) {
     
    363357//------------------------------------------------------------------------------
    364358
    365 bool MultiBuffer::unregisterSafelyFromXPlane() throw()
     359bool MultiBuffer::unregisterSafelyFromXPlane() noexcept
    366360{
    367361    try {
     
    376370//------------------------------------------------------------------------------
    377371
    378 void MultiBuffer::execute() throw(Exception)
     372void MultiBuffer::execute()
    379373{
    380374    if (data==0 && registeredID>=0) {
     
    395389
    396390void MultiBuffer::setInt(size_t id, int value)
    397     throw(InvalidIDException, TypeMismatchException)
    398391{
    399392    *reinterpret_cast<int32_t*>(getData(id, Protocol::TYPE_INT)) = value;
     
    403396
    404397int MultiBuffer::getInt(size_t id) const
    405     throw(InvalidIDException, TypeMismatchException)
    406398{
    407399    return *reinterpret_cast<const int32_t*>(getData(id, Protocol::TYPE_INT));
     
    411403
    412404const int32_t& MultiBuffer::getIntRef(size_t id) const
    413     throw(InvalidIDException, TypeMismatchException)
    414405{
    415406    return *reinterpret_cast<const int32_t*>(getData(id, Protocol::TYPE_INT));
     
    419410
    420411int32_t& MultiBuffer::getIntRef(size_t id)
    421     throw(InvalidIDException, TypeMismatchException)
    422412{
    423413    return *reinterpret_cast<int32_t*>(getData(id, Protocol::TYPE_INT));
     
    427417
    428418void MultiBuffer::setFloat(size_t id, float value)
    429     throw(InvalidIDException, TypeMismatchException)
    430419{
    431420    *reinterpret_cast<float*>(getData(id, Protocol::TYPE_FLOAT)) = value;
     
    435424
    436425float MultiBuffer::getFloat(size_t id) const
    437     throw(InvalidIDException, TypeMismatchException)
    438426{
    439427    return *reinterpret_cast<const float*>(getData(id, Protocol::TYPE_FLOAT));
     
    443431
    444432const float& MultiBuffer::getFloatRef(size_t id) const
    445     throw(InvalidIDException, TypeMismatchException)
    446433{
    447434    return *reinterpret_cast<const float*>(getData(id, Protocol::TYPE_FLOAT));
     
    451438
    452439float& MultiBuffer::getFloatRef(size_t id)
    453     throw(InvalidIDException, TypeMismatchException)
    454440{
    455441    return *reinterpret_cast<float*>(getData(id, Protocol::TYPE_FLOAT));
     
    459445
    460446void MultiBuffer::setDouble(size_t id, double value)
    461     throw(InvalidIDException, TypeMismatchException)
    462447{
    463448    *reinterpret_cast<double*>(getData(id, Protocol::TYPE_DOUBLE)) = value;
     
    467452
    468453double MultiBuffer::getDouble(size_t id) const
    469     throw(InvalidIDException, TypeMismatchException)
    470454{
    471455    return *reinterpret_cast<const double*>(getData(id, Protocol::TYPE_DOUBLE));
     
    475459
    476460const double& MultiBuffer::getDoubleRef(size_t id) const
    477     throw(InvalidIDException, TypeMismatchException)
    478461{
    479462    return *reinterpret_cast<const double*>(getData(id, Protocol::TYPE_DOUBLE));
     
    483466
    484467double& MultiBuffer::getDoubleRef(size_t id)
    485     throw(InvalidIDException, TypeMismatchException)
    486468{
    487469    return *reinterpret_cast<double*>(getData(id, Protocol::TYPE_DOUBLE));
     
    492474size_t MultiBuffer::setFloatArray(size_t id, const float* value,
    493475                                  size_t length, size_t offset)
    494     throw(InvalidIDException, TypeMismatchException)
    495476{
    496477    return setArray<float, Protocol::TYPE_FLOAT_ARRAY>(id, value, length, offset);
     
    501482size_t MultiBuffer::getFloatArray(size_t id, float* value,
    502483                                  size_t length, size_t offset) const
    503     throw(InvalidIDException, TypeMismatchException)
    504484{
    505485    return getArray<float, Protocol::TYPE_FLOAT_ARRAY>(id, value, length, offset);
     
    509489
    510490const float* MultiBuffer::getFloatArray(size_t id, size_t offset) const
    511     throw(InvalidIDException, TypeMismatchException)
    512491{
    513492    return getArray<float, Protocol::TYPE_FLOAT_ARRAY>(id, offset);
     
    518497size_t MultiBuffer::setIntArray(size_t id, const int32_t* value,
    519498                                size_t length, size_t offset)
    520     throw(InvalidIDException, TypeMismatchException)
     499
    521500{
    522501    return setArray<int32_t, Protocol::TYPE_INT_ARRAY>(id, value, length, offset);
     
    527506size_t MultiBuffer::getIntArray(size_t id, int32_t* value,
    528507                                size_t length, size_t offset) const
    529     throw(InvalidIDException, TypeMismatchException)
    530508{
    531509    return getArray<int32_t, Protocol::TYPE_INT_ARRAY>(id, value, length, offset);
     
    535513
    536514const int32_t* MultiBuffer::getIntArray(size_t id, size_t offset) const
    537     throw(InvalidIDException, TypeMismatchException)
    538515{
    539516    return getArray<int32_t, Protocol::TYPE_INT_ARRAY>(id, offset);
     
    544521size_t MultiBuffer::setByteArray(size_t id, const uint8_t* value,
    545522                                size_t length, size_t offset)
    546     throw(InvalidIDException, TypeMismatchException)
    547523{
    548524    return setArray<uint8_t, Protocol::TYPE_BYTE_ARRAY>(id, value, length, offset);
     
    553529size_t MultiBuffer::getByteArray(size_t id, uint8_t* value,
    554530                                size_t length, size_t offset) const
    555     throw(InvalidIDException, TypeMismatchException)
    556531{
    557532    return getArray<uint8_t, Protocol::TYPE_BYTE_ARRAY>(id, value, length, offset);
     
    561536
    562537const uint8_t* MultiBuffer::getByteArray(size_t id, size_t offset) const
    563     throw(InvalidIDException, TypeMismatchException)
    564538{
    565539    return getArray<uint8_t, Protocol::TYPE_BYTE_ARRAY>(id, offset);
     
    570544size_t MultiBuffer::setString(size_t id, const string& value,
    571545                              size_t offset)
    572     throw(InvalidIDException, TypeMismatchException)
    573546{
    574547    return setByteArray(id, reinterpret_cast<const uint8_t*>(value.c_str()),
     
    579552
    580553string MultiBuffer::getString(size_t id, size_t offset) const
    581     throw(InvalidIDException, TypeMismatchException)
    582554{
    583555    const DataRef& dataRef = getDataRef(id, Protocol::TYPE_BYTE_ARRAY);
     
    598570
    599571const char* MultiBuffer::getStringPtr(size_t id, size_t offset) const
    600         throw(InvalidIDException, TypeMismatchException)
    601572{
    602573    return reinterpret_cast<const char*>(getByteArray(id, offset));
     
    605576//------------------------------------------------------------------------------
    606577
    607 void MultiBuffer::writeSpec(uint8_t command) const throw(Exception)
     578void MultiBuffer::writeSpec(uint8_t command) const
    608579{
    609580    xplane.stream->writeU8(command);
     
    628599//------------------------------------------------------------------------------
    629600
    630 void MultiBuffer::reregisterInXPlane() throw(Exception)
     601void MultiBuffer::reregisterInXPlane()
    631602{
    632603    if (registeredID>=0) {
  • src/client/c/hu/varadiistvan/xplra/MultiBuffer.h

    r66 r107  
    9292        DataRef(const std::string& name, uint8_t type,
    9393                const DataRef* previous = 0,
    94                 size_t length = 0, size_t offset = 0) throw();
     94                size_t length = 0, size_t offset = 0) noexcept;
    9595
    9696        /**
    9797         * Get the size of the data represented by this object.
    9898         */
    99         size_t getSize() const throw();
     99        size_t getSize() const noexcept;
    100100
    101101        /**
     
    103103         * this dataref.
    104104         */
    105         size_t getAlignment() const throw();
     105        size_t getAlignment() const noexcept;
    106106
    107107        /**
    108108         * Determine if the dataref is an array.
    109109         */
    110         bool isArray() const throw();
     110        bool isArray() const noexcept;
    111111
    112112        /**
     
    114114         * user parameters.
    115115         */
    116         size_t getCopyLength(size_t userLength, size_t userOffset) const throw();
     116        size_t getCopyLength(size_t userLength, size_t userOffset) const noexcept;
    117117    };
    118118
     
    153153     */
    154154    MultiBuffer(XPlane& xplane, uint8_t registerCommand,
    155                 uint8_t unregisterCommand) throw();
     155                uint8_t unregisterCommand) noexcept;
    156156
    157157    /**
     
    159159     * made to unregister it.
    160160     */
    161     virtual ~MultiBuffer() throw();
     161    virtual ~MultiBuffer() noexcept;
    162162
    163163public:
     
    165165     * Get the X-Plane object this buffer belongs to.
    166166     */
    167     XPlane& getXPlane() const throw();
     167    XPlane& getXPlane() const noexcept;
    168168
    169169    /**
     
    173173     * get the value.
    174174     */
    175     size_t addInt(const std::string& name) throw();
     175    size_t addInt(const std::string& name) noexcept;
    176176
    177177    /**
     
    181181     * get the value.
    182182     */
    183     size_t addFloat(const std::string& name) throw();
     183    size_t addFloat(const std::string& name) noexcept;
    184184
    185185    /**
     
    189189     * get the value.
    190190     */
    191     size_t addDouble(const std::string& name) throw();
     191    size_t addDouble(const std::string& name) noexcept;
    192192
    193193    /**
     
    198198     */
    199199    size_t addFloatArray(const std::string& name, size_t length,
    200                          size_t offset = 0) throw();
     200                         size_t offset = 0) noexcept;
    201201
    202202    /**
     
    207207     */
    208208    size_t addIntArray(const std::string& name, size_t length,
    209                        size_t offset = 0) throw();
     209                       size_t offset = 0) noexcept;
    210210
    211211    /**
     
    216216     */
    217217    size_t addByteArray(const std::string& name, size_t length,
    218                         size_t offset = 0) throw();
     218                        size_t offset = 0) noexcept;
    219219
    220220    /**
     
    230230     * too.
    231231     */
    232     void registerInXPlane() throw(Exception);
     232    void registerInXPlane();
    233233
    234234    /**
    235235     * Unregister this buffer from X-Plane.
    236236     */
    237     void unregisterFromXPlane() throw(Exception);
     237    void unregisterFromXPlane();
    238238
    239239    /**
     
    244244     * @return whether unregistration succeeded.
    245245     */
    246     bool unregisterSafelyFromXPlane() throw();
     246    bool unregisterSafelyFromXPlane() noexcept;
    247247
    248248    /**
     
    252252     * and it will be re-registered after finalizing.
    253253     */
    254     void execute() throw(Exception);
     254    void execute();
    255255
    256256    /**
    257257     * Set the value of an integer dataref with the given ID.
    258258     */
    259     void setInt(size_t id, int value)
    260         throw(InvalidIDException, TypeMismatchException);
     259    void setInt(size_t id, int value);
    261260
    262261    /**
    263262     * Get the value of an integer dataref with the given ID.
    264263     */
    265     int getInt(size_t id) const
    266         throw(InvalidIDException, TypeMismatchException);
     264    int getInt(size_t id) const;
    267265
    268266    /**
    269267     * Get a reference to the integer dataref with the given ID
    270268     */
    271     const int32_t& getIntRef(size_t id) const
    272         throw(InvalidIDException, TypeMismatchException);
     269    const int32_t& getIntRef(size_t id) const;
    273270
    274271    /**
    275272     * Get a reference to the integer dataref with the given ID
    276273     */
    277     int32_t& getIntRef(size_t id)
    278         throw(InvalidIDException, TypeMismatchException);
     274    int32_t& getIntRef(size_t id);
    279275
    280276    /**
    281277     * Set the value of a float dataref with the given ID.
    282278     */
    283     void setFloat(size_t id, float value)
    284         throw(InvalidIDException, TypeMismatchException);
     279    void setFloat(size_t id, float value);
    285280
    286281    /**
    287282     * Get the value of a float dataref with the given ID.
    288283     */
    289     float getFloat(size_t id) const
    290         throw(InvalidIDException, TypeMismatchException);
     284    float getFloat(size_t id) const;
    291285
    292286    /**
    293287     * Get a reference to the float dataref with the given ID
    294288     */
    295     const float& getFloatRef(size_t id) const
    296         throw(InvalidIDException, TypeMismatchException);
     289    const float& getFloatRef(size_t id) const;
    297290
    298291    /**
    299292     * Get a reference to the integer dataref with the given ID
    300293     */
    301     float& getFloatRef(size_t id)
    302         throw(InvalidIDException, TypeMismatchException);
     294    float& getFloatRef(size_t id);
    303295
    304296    /**
    305297     * Set the value of a double dataref with the given ID.
    306298     */
    307     void setDouble(size_t id, double value)
    308         throw(InvalidIDException, TypeMismatchException);
     299    void setDouble(size_t id, double value);
    309300
    310301    /**
    311302     * Get the value of a double dataref with the given ID.
    312303     */
    313     double getDouble(size_t id) const
    314         throw(InvalidIDException, TypeMismatchException);
     304    double getDouble(size_t id) const;
    315305
    316306    /**
    317307     * Get a reference to the double dataref with the given ID
    318308     */
    319     const double& getDoubleRef(size_t id) const
    320         throw(InvalidIDException, TypeMismatchException);
     309    const double& getDoubleRef(size_t id) const;
    321310
    322311    /**
    323312     * Get a reference to the double dataref with the given ID
    324313     */
    325     double& getDoubleRef(size_t id)
    326         throw(InvalidIDException, TypeMismatchException);
     314    double& getDoubleRef(size_t id);
    327315
    328316    /**
     
    340328     */
    341329    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);
    344331
    345332    /**
     
    357344     */
    358345    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;
    361347
    362348    /**
     
    368354     * than the length of the buffer, 0 is returned.
    369355     */
    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;
    372357
    373358    /**
     
    385370     */
    386371    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);
    389373
    390374    /**
     
    402386     */
    403387    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;
    406389
    407390    /**
     
    412395     * than the length of the buffer, 0 is returned.
    413396     */
    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;
    417398
    418399    /**
     
    430411     */
    431412    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);
    434414
    435415    /**
     
    447427     */
    448428    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;
    451430
    452431    /**
     
    457436     * than the length of the buffer, 0 is returned.
    458437     */
    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;
    461439
    462440
     
    469447     */
    470448    size_t setString(size_t id, const std::string& value,
    471                      size_t offset = 0)
    472         throw(InvalidIDException, TypeMismatchException);
     449                     size_t offset = 0);
    473450
    474451    /**
     
    476453     * a string.
    477454     */
    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   
    481457    /**
    482458     * Get a string pointer to the value of the byte array dataref
    483459     * with the given ID.
    484460     */
    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;
    487462
    488463protected:
     
    491466     * registered.
    492467     */
    493     virtual void doExecute() throw(Exception) = 0;
     468    virtual void doExecute() = 0;
    494469
    495470    /**
     
    497472     * not registered.
    498473     */
    499     virtual void doExecuteUnregistered() throw(Exception) = 0;
     474    virtual void doExecuteUnregistered() = 0;
    500475
    501476    /**
     
    503478     * checks the result
    504479     */
    505     void writeSpec(uint8_t command) const throw(Exception);
     480    void writeSpec(uint8_t command) const;
    506481
    507482    /**
     
    516491     * again
    517492     */
    518     void reregisterInXPlane() throw(Exception);
     493    void reregisterInXPlane();
    519494
    520495private:
     
    522497     * Unfinalize the buffer, if it is finalized.
    523498     */
    524     void unfinalize() throw();
     499    void unfinalize() noexcept;
    525500
    526501    /**
     
    530505     * multi-buffers.
    531506     */
    532     void forgetRegistration() throw();
     507    void forgetRegistration() noexcept;
    533508
    534509    /**
    535510     * Get the last dataref, or 0 if there are not datarefs yet.
    536511     */
    537     const DataRef* getLastDataRef() const throw();
     512    const DataRef* getLastDataRef() const noexcept;
    538513
    539514    /**
     
    541516     * type. Otherwise throw an exception.
    542517     */
    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;
    545519
    546520    /**
     
    548522     * given type. If the buffer is not finalized yet, it will be.
    549523     */
    550     void* getData(size_t id, uint8_t type)
    551         throw(InvalidIDException, TypeMismatchException);
     524    void* getData(size_t id, uint8_t type);
    552525
    553526    /**
     
    555528     * given type. If the buffer is not finalized yet, it will be.
    556529     */
    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;
    559531
    560532    /**
     
    562534     */
    563535    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);
    566537
    567538    /**
     
    570541     */
    571542    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;
    574544
    575545    /**
     
    578548     */
    579549    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;
    582551
    583552    friend class XPlane;
     
    588557//------------------------------------------------------------------------------
    589558
    590 inline XPlane& MultiBuffer::getXPlane() const throw()
     559inline XPlane& MultiBuffer::getXPlane() const noexcept
    591560{
    592561    return xplane;
  • src/client/c/hu/varadiistvan/xplra/MultiGetter.cc

    r40 r107  
    5050//------------------------------------------------------------------------------
    5151
    52 MultiGetter::MultiGetter(XPlane& xplane) throw() :
     52MultiGetter::MultiGetter(XPlane& xplane) noexcept :
    5353    MultiBuffer(xplane, Protocol::COMMAND_REGISTER_GET_MULTI,
    5454                Protocol::COMMAND_UNREGISTER_GET_MULTI)
     
    5858//------------------------------------------------------------------------------
    5959
    60 inline void MultiGetter::read(const DataRef& dataRef) throw(Exception)
     60inline void MultiGetter::read(const DataRef& dataRef)
    6161{
    6262    switch (dataRef.type) {
     
    9191//------------------------------------------------------------------------------
    9292
    93 void MultiGetter::doExecute() throw(Exception)
     93void MultiGetter::doExecute()
    9494{
    9595    xplane.checkStream();
     
    105105//------------------------------------------------------------------------------
    106106
    107 void MultiGetter::doExecuteUnregistered() throw(Exception)
     107void MultiGetter::doExecuteUnregistered()
    108108{
    109109    writeSpec(Protocol::COMMAND_GET_MULTI);
     
    114114//------------------------------------------------------------------------------
    115115
    116 void MultiGetter::readValues() throw(Exception)
     116void MultiGetter::readValues()
    117117{
    118118    for(vector<DataRef>::const_iterator i = dataRefs.begin();
  • src/client/c/hu/varadiistvan/xplra/MultiGetter.h

    r33 r107  
    4848     * Construct the object for the given XPlane instance.
    4949     */
    50     MultiGetter(XPlane& xplane) throw();
     50    MultiGetter(XPlane& xplane) noexcept;
    5151
    5252protected:
     
    5454     * @see MultiBuffer::doExecute
    5555     */
    56     virtual void doExecute() throw(Exception);
     56    virtual void doExecute();
    5757
    5858    /**
    5959     * @see MultiBuffer::doExecuteUnregistered
    6060     */
    61     virtual void doExecuteUnregistered() throw(Exception);
     61    virtual void doExecuteUnregistered();
    6262
    6363private:
     
    6666     * buffer.
    6767     */
    68     void read(const DataRef& dataRef) throw(Exception);
     68    void read(const DataRef& dataRef);
    6969
    7070    /**
    7171     * Read all the values.
    7272     */
    73     void readValues() throw(Exception);
     73    void readValues();
    7474
    7575    friend class XPlane;
  • src/client/c/hu/varadiistvan/xplra/MultiSetter.cc

    r40 r107  
    4848//------------------------------------------------------------------------------
    4949
    50 MultiSetter::MultiSetter(XPlane& xplane) throw() :
     50MultiSetter::MultiSetter(XPlane& xplane) noexcept :
    5151    MultiBuffer(xplane, Protocol::COMMAND_REGISTER_SET_MULTI,
    5252                Protocol::COMMAND_UNREGISTER_SET_MULTI)
     
    5656//------------------------------------------------------------------------------
    5757
    58 inline void MultiSetter::write(const DataRef& dataRef) const throw(Exception)
     58inline void MultiSetter::write(const DataRef& dataRef) const
    5959{
    6060    switch (dataRef.type) {
     
    8787//------------------------------------------------------------------------------
    8888
    89 void MultiSetter::doExecute() throw(Exception)
     89void MultiSetter::doExecute()
    9090{
    9191    xplane.checkStream();
     
    104104//------------------------------------------------------------------------------
    105105
    106 void MultiSetter::doExecuteUnregistered() throw(Exception)
     106void MultiSetter::doExecuteUnregistered()
    107107{
    108108    xplane.stream->writeU8(Protocol::COMMAND_SET_MULTI);
  • src/client/c/hu/varadiistvan/xplra/MultiSetter.h

    r26 r107  
    4848     * Construct the object for the given XPlane instance.
    4949     */
    50     MultiSetter(XPlane& xplane) throw();
     50    MultiSetter(XPlane& xplane) noexcept;
    5151
    5252protected:
     
    5454     * @see MultiBuffer::doExecute
    5555     */
    56     virtual void doExecute() throw(Exception);
     56    virtual void doExecute();
    5757
    5858    /**
    5959     * @see MultiBuffer::doExecuteUnregistered
    6060     */
    61     virtual void doExecuteUnregistered() throw(Exception);
     61    virtual void doExecuteUnregistered();
    6262
    6363private:
     
    6666     * stream.
    6767     */
    68     void write(const DataRef& dataRef) const throw(Exception);
     68    void write(const DataRef& dataRef) const;
    6969
    7070    friend class XPlane;
  • src/client/c/hu/varadiistvan/xplra/XPlane.cc

    r92 r107  
    6363//------------------------------------------------------------------------------
    6464
    65 void XPlane::checkStream() throw(NotConnectedException, IOException)
     65void XPlane::checkStream()
    6666{
    6767    if (stream==0) {
     
    7474//------------------------------------------------------------------------------
    7575
    76 void XPlane::checkResult(uint8_t result, bool hasParameter, long parameter)
    77     throw(ProtocolException)
     76void XPlane::checkResult(uint8_t result, bool hasParameter, long parameter)   
    7877{
    7978    switch(result) {
     
    113112//------------------------------------------------------------------------------
    114113
    115 void XPlane::checkResult(bool multi) throw(ProtocolException, IOException)
     114void XPlane::checkResult(bool multi)
    116115{
    117116    uint8_t result = stream->readU8();
     
    131130//------------------------------------------------------------------------------
    132131
    133 XPlane::~XPlane() throw()
     132XPlane::~XPlane() noexcept
    134133{
    135134    disconnect();
     
    145144//------------------------------------------------------------------------------
    146145
    147 void XPlane::connect() throw(IOException)
     146void XPlane::connect()
    148147{
    149148    if (socket!=0) return;
     
    180179//------------------------------------------------------------------------------
    181180
    182 void XPlane::disconnect() throw()
     181void XPlane::disconnect() noexcept
    183182{
    184183    if (socket==0) return;
     
    190189//------------------------------------------------------------------------------
    191190
    192 MultiGetter& XPlane::createMultiGetter() throw()
     191MultiGetter& XPlane::createMultiGetter() noexcept
    193192{
    194193    MultiGetter* getter = new MultiGetter(*this);
     
    199198//------------------------------------------------------------------------------
    200199
    201 MultiSetter& XPlane::createMultiSetter() throw()
     200MultiSetter& XPlane::createMultiSetter() noexcept
    202201{
    203202    MultiSetter* setter = new MultiSetter(*this);
     
    208207//------------------------------------------------------------------------------
    209208
    210 bool XPlane::destroyMultiBuffer(MultiBuffer& buffer) throw(Exception)
     209bool XPlane::destroyMultiBuffer(MultiBuffer& buffer)
    211210{
    212211    multiBuffers_t::iterator i = multiBuffers.find(&buffer);
     
    221220//------------------------------------------------------------------------------
    222221
    223 void XPlane::getVersions(int& xplaneVersion, int& xplmVersion, int& xplraVersion)
    224     throw(Exception)
     222void XPlane::getVersions(int& xplaneVersion, int& xplmVersion, int& xplraVersion)   
    225223{
    226224    stream->writeU8(Protocol::COMMAND_GET_VERSIONS);
     
    237235//------------------------------------------------------------------------------
    238236
    239 void XPlane::reloadPlugins() throw(Exception)
     237void XPlane::reloadPlugins()
    240238{
    241239    stream->writeU8(Protocol::COMMAND_RELOAD_PLUGINS);
     
    246244//------------------------------------------------------------------------------
    247245
    248 void XPlane::saveSituation(const char* path) throw(Exception)
     246void XPlane::saveSituation(const char* path)
    249247{
    250248    stream->writeU8(Protocol::COMMAND_SAVE_SITUATION);
     
    256254//------------------------------------------------------------------------------
    257255
    258 void XPlane::getScalar(const char* name, uint8_t type) throw(Exception)
     256void XPlane::getScalar(const char* name, uint8_t type)
    259257{
    260258    checkStream();
     
    270268//------------------------------------------------------------------------------
    271269
    272 int XPlane::getInt(const char* name) throw(Exception)
     270int XPlane::getInt(const char* name)
    273271{
    274272    getScalar(name, Protocol::TYPE_INT);
     
    281279//------------------------------------------------------------------------------
    282280
    283 float XPlane::getFloat(const char* name) throw(Exception)
     281float XPlane::getFloat(const char* name)
    284282{
    285283    getScalar(name, Protocol::TYPE_FLOAT);
     
    292290//------------------------------------------------------------------------------
    293291
    294 double XPlane::getDouble(const char* name) throw(Exception)
     292double XPlane::getDouble(const char* name)
    295293{
    296294    getScalar(name, Protocol::TYPE_DOUBLE);
     
    304302
    305303size_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)
    307305{
    308306    checkStream();
     
    326324
    327325size_t XPlane::getFloatArray(const char* name, float* dest,
    328                              size_t length, size_t offset) throw(Exception)
     326                             size_t length, size_t offset)
    329327{
    330328    length = getArray(name, Protocol::TYPE_FLOAT_ARRAY, length, offset);
     
    338336
    339337float* XPlane::getFloatArray(const char* name, size_t& length,
    340                              size_t offset) throw(Exception)
     338                             size_t offset)
    341339{
    342340    length = getArray(name, Protocol::TYPE_FLOAT_ARRAY, -1, offset);
     
    350348
    351349size_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)
    353351{
    354352    length = getArray(name, Protocol::TYPE_INT_ARRAY, length, offset);
     
    362360
    363361int32_t* XPlane::getIntArray(const char* name, size_t& length,
    364                              size_t offset) throw(Exception)
     362                             size_t offset)
    365363{
    366364    length = getArray(name, Protocol::TYPE_INT_ARRAY, -1, offset);
     
    374372
    375373size_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)
    377375{
    378376    length = getArray(name, Protocol::TYPE_BYTE_ARRAY, length, offset);
     
    386384
    387385uint8_t* XPlane::getByteArray(const char* name, size_t& length,
    388                               size_t offset) throw(Exception)
     386                              size_t offset)
    389387{
    390388    length = getArray(name, Protocol::TYPE_BYTE_ARRAY, -1, offset);
     
    397395//------------------------------------------------------------------------------
    398396
    399 string XPlane::getString(const char* name, size_t offset) throw(Exception)
     397string XPlane::getString(const char* name, size_t offset)
    400398{
    401399    size_t length = 0;
     
    406404//------------------------------------------------------------------------------
    407405
    408 void XPlane::setScalar(const char* name, uint8_t type) throw(Exception)
     406void XPlane::setScalar(const char* name, uint8_t type)
    409407{
    410408    stream->writeU8(Protocol::COMMAND_SET_SINGLE);
     
    415413//------------------------------------------------------------------------------
    416414
    417 void XPlane::setInt(const char* name, int value) throw(Exception)
     415void XPlane::setInt(const char* name, int value)
    418416{
    419417    setScalar(name, Protocol::TYPE_INT);
     
    425423//------------------------------------------------------------------------------
    426424
    427 void XPlane::setFloat(const char* name, float value) throw(Exception)
     425void XPlane::setFloat(const char* name, float value)
    428426{
    429427    setScalar(name, Protocol::TYPE_FLOAT);
     
    435433//------------------------------------------------------------------------------
    436434
    437 void XPlane::setDouble(const char* name, double value) throw(Exception)
     435void XPlane::setDouble(const char* name, double value)
    438436{
    439437    setScalar(name, Protocol::TYPE_DOUBLE);
     
    446444
    447445void XPlane::setArray(const char* name, uint8_t type, size_t length,
    448                       size_t offset) throw(Exception)
     446                      size_t offset)
    449447{
    450448    stream->writeU8(Protocol::COMMAND_SET_SINGLE);
     
    458456
    459457void XPlane::setFloatArray(const char* name, const float* values, size_t length,
    460                            size_t offset) throw(Exception)
     458                           size_t offset)
    461459{
    462460    setArray(name, Protocol::TYPE_FLOAT_ARRAY, length, offset);
     
    469467
    470468void XPlane::setIntArray(const char* name, const int32_t* values, size_t length,
    471                          size_t offset) throw(Exception)
     469                         size_t offset)
    472470{
    473471    setArray(name, Protocol::TYPE_INT_ARRAY, length, offset);
     
    480478
    481479void XPlane::setByteArray(const char* name, const uint8_t* values, size_t length,
    482                           size_t offset) throw(Exception)
     480                          size_t offset)
    483481{
    484482    setArray(name, Protocol::TYPE_BYTE_ARRAY, length, offset);
     
    491489
    492490void XPlane::setString(const char* name, const char* value, size_t length,
    493                        size_t offset) throw(Exception)
     491                       size_t offset)
    494492{
    495493    size_t valueLength = strlen(value);
     
    507505//------------------------------------------------------------------------------
    508506
    509 void XPlane::showMessage(const char* message, float duration) throw(Exception)
     507void XPlane::showMessage(const char* message, float duration)
    510508{
    511509    stream->writeU8(Protocol::COMMAND_SHOW_MESSAGE);
     
    519517
    520518void XPlane::registerHotkeys(const uint16_t* codes, size_t length)
    521     throw(Exception)
     519   
    522520{
    523521    stream->writeU8(Protocol::COMMAND_REGISTER_HOTKEYS);
     
    530528//------------------------------------------------------------------------------
    531529
    532 void XPlane::queryHotkeys(uint8_t* states, size_t length) throw(Exception)
     530void XPlane::queryHotkeys(uint8_t* states, size_t length)
    533531{
    534532    stream->writeU8(Protocol::COMMAND_QUERY_HOTKEYS);
  • src/client/c/hu/varadiistvan/xplra/XPlane.h

    r87 r107  
    9898     * yet.
    9999     */
    100     XPlane() throw();
     100    XPlane() noexcept;
    101101
    102102    /**
     
    105105     * become invalid.
    106106     */
    107     ~XPlane() throw();
     107    ~XPlane() noexcept;
    108108
    109109    /**
    110110     * Connect to the simulator.
    111111     */
    112     void connect() throw(IOException);
     112    void connect();
    113113
    114114    /**
    115115     * Check if we are connected to the simulator.
    116116     */
    117     bool isConnected() const throw();
     117    bool isConnected() const noexcept;
    118118
    119119    /**
    120120     * Disconnect from the simulator.
    121121     */
    122     void disconnect() throw();
     122    void disconnect() noexcept;
    123123
    124124    /**
     
    126126     * to it.
    127127     */
    128     MultiGetter& createMultiGetter() throw();
     128    MultiGetter& createMultiGetter() noexcept;
    129129
    130130    /**
     
    132132     * to it.
    133133     */
    134     MultiSetter& createMultiSetter() throw();
     134    MultiSetter& createMultiSetter() noexcept;
    135135
    136136    /**
     
    142142     * @return if the buffer was found and could be destroyed
    143143     */
    144     bool destroyMultiBuffer(MultiBuffer& buffer) throw(Exception);
     144    bool destroyMultiBuffer(MultiBuffer& buffer);
    145145
    146146    /**
    147147     * Get the versions of X-Plane, XPLM and the XPLRA plugin.
    148148     */
    149     void getVersions(int& xplaneVersion, int& xplmVersion, int& xplraVersion) throw(Exception);
     149    void getVersions(int& xplaneVersion, int& xplmVersion, int& xplraVersion);
    150150
    151151    /**
     
    153153     * fails.
    154154     */
    155     void reloadPlugins() throw(Exception);
     155    void reloadPlugins();
    156156
    157157    /**
     
    159159     * which is relative to the directory of X-Plane.
    160160     */
    161     void saveSituation(const char* path) throw(Exception);
     161    void saveSituation(const char* path);
    162162
    163163    /**
    164164     * Get the integer value of the dataref with the given name.
    165165     */
    166     int getInt(const char* name) throw(Exception);
     166    int getInt(const char* name);
    167167
    168168    /**
    169169     * Get a float value.
    170170     */
    171     float getFloat(const char* name) throw(Exception);
     171    float getFloat(const char* name);
    172172
    173173    /**
    174174     * Get a double value.
    175175     */
    176     double getDouble(const char* name) throw(Exception);
     176    double getDouble(const char* name);
    177177
    178178    /**
     
    187187     */
    188188    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);
    190190
    191191    /**
     
    198198     */
    199199    float* getFloatArray(const char* name, size_t& length,
    200                          size_t offset = 0) throw(Exception);
     200                         size_t offset = 0);
    201201
    202202    /**
     
    211211     */
    212212    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);
    214214
    215215    /**
     
    222222     */
    223223    int32_t* getIntArray(const char* name, size_t& length,
    224                          size_t offset = 0) throw(Exception);
     224                         size_t offset = 0);
    225225
    226226    /**
     
    235235     */
    236236    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);
    238238
    239239    /**
     
    246246     */
    247247    uint8_t* getByteArray(const char* name, size_t& length,
    248                           size_t offset = 0) throw(Exception);
     248                          size_t offset = 0);
    249249
    250250    /**
    251251     * Get a string. A string is a byte array.
    252252     */
    253     std::string getString(const char* name, size_t offset = 0) throw(Exception);
     253    std::string getString(const char* name, size_t offset = 0);
    254254
    255255    /**
    256256     * Set the given dataref to the given integer value.
    257257     */
    258     void setInt(const char* name, int value) throw(Exception);
     258    void setInt(const char* name, int value);
    259259
    260260    /**
    261261     * Set the given dataref to the given float value.
    262262     */
    263     void setFloat(const char* name, float value) throw(Exception);
     263    void setFloat(const char* name, float value);
    264264
    265265    /**
    266266     * Set the given dataref to the given double value.
    267267     */
    268     void setDouble(const char* name, double value) throw(Exception);
     268    void setDouble(const char* name, double value);
    269269
    270270    /**
     
    272272     */
    273273    void setFloatArray(const char* name, const float* values, size_t length,
    274                        size_t offset = 0) throw(Exception);
     274                       size_t offset = 0);
    275275
    276276    /**
     
    278278     */
    279279    void setIntArray(const char* name, const int32_t* values, size_t length,
    280                      size_t offset = 0) throw(Exception);
     280                     size_t offset = 0);
    281281
    282282    /**
     
    284284     */
    285285    void setByteArray(const char* name, const uint8_t* values, size_t length,
    286                       size_t offset = 0) throw(Exception);
     286                      size_t offset = 0);
    287287
    288288    /**
     
    293293     */
    294294    void setString(const char* name, const char* value, size_t length,
    295                    size_t offset = 0) throw(Exception);
     295                   size_t offset = 0);
    296296
    297297    /**
    298298     * Show a textual message for a certain duration.
    299299     */
    300     void showMessage(const char* message, float duration) throw(Exception);
     300    void showMessage(const char* message, float duration);
    301301
    302302    /**
     
    304304     * existing set of hotkeys registered, those will be overwritten.
    305305     */
    306     void registerHotkeys(const uint16_t* codes, size_t length) throw(Exception);
     306    void registerHotkeys(const uint16_t* codes, size_t length);
    307307
    308308    /**
    309309     * Query the registered hotkeys whether they were pressed.
    310310     */
    311     void queryHotkeys(uint8_t* states, size_t length) throw(Exception);
     311    void queryHotkeys(uint8_t* states, size_t length);
    312312
    313313    /**
     
    320320     * Check if we have a stream and if it has not failed.
    321321     */
    322     void checkStream() throw(NotConnectedException, IOException);
     322    void checkStream();
    323323
    324324    /**
     
    327327     */
    328328    void checkResult(uint8_t result, bool hasParameter = false,
    329                      long parameter = 0) throw(ProtocolException);
     329                     long parameter = 0);
    330330
    331331    /**
     
    334334     * is some problem with the stream, an IOException is thrown.
    335335     */
    336     void checkResult(bool multi = false) throw(ProtocolException, IOException);
     336    void checkResult(bool multi = false);
    337337
    338338    /**
     
    340340     * also checked, but the value should be read by the caller.
    341341     */
    342     void getScalar(const char* name, uint8_t type) throw(Exception);
     342    void getScalar(const char* name, uint8_t type);
    343343
    344344    /**
     
    350350     */
    351351    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);
    353353
    354354
     
    356356     * Issue the command to set a scalar value of the given type.
    357357     */
    358     void setScalar(const char* name, uint8_t type) throw(Exception);
     358    void setScalar(const char* name, uint8_t type);
    359359
    360360    /**
     
    362362     */
    363363    void setArray(const char* name, uint8_t type, size_t length,
    364                   size_t offset) throw(Exception);
     364                  size_t offset);
    365365
    366366    friend class MultiBuffer;
     
    373373//------------------------------------------------------------------------------
    374374
    375 inline XPlane::XPlane() throw() :
     375inline XPlane::XPlane() noexcept :
    376376    socket(0),
    377377    stream(0)
     
    381381//------------------------------------------------------------------------------
    382382
    383 inline bool XPlane::isConnected() const throw()
     383inline bool XPlane::isConnected() const noexcept
    384384{
    385385    return socket!=0;
  • src/client/c/hu/varadiistvan/xplra/xplra.cc

    r92 r107  
    9090     * @return the ID of the new value
    9191     */
    92     static int addValue(Value value) throw();
     92    static int addValue(Value value) noexcept;
    9393
    9494    /**
    9595     * Get the value with the given ID.
    9696     */
    97     static Value getValue(int valueID) throw();
     97    static Value getValue(int valueID) noexcept;
    9898
    9999    /**
    100100     * Clear the value with the given ID.
    101101     */
    102     static void clearValue(int valueID) throw();
     102    static void clearValue(int valueID) noexcept;
    103103
    104104private:
     
    119119     * Construct a slot with the given value
    120120     */
    121     Slot(Value value) throw();
     121    Slot(Value value) noexcept;
    122122
    123123    /**
     
    125125     * should be called for a slot with no value.
    126126     */
    127     int setValue(Value value) throw();
     127    int setValue(Value value) noexcept;
    128128
    129129    /**
     
    131131     * returned (converted to value).
    132132     */
    133     Value getValue() const throw();
     133    Value getValue() const noexcept;
    134134
    135135    /**
    136136     * Clear the value and set the given next free index.
    137137     */
    138     void clear(int nextFreeIndex) throw();
     138    void clear(int nextFreeIndex) noexcept;
    139139};
    140140
     
    150150
    151151template <class Value>
    152 inline Slot<Value>::Slot(Value value) throw() :
     152inline Slot<Value>::Slot(Value value) noexcept :
    153153    valid(true)
    154154{
     
    159159
    160160template <class Value>
    161 inline int Slot<Value>::setValue(Value value) throw()
     161inline int Slot<Value>::setValue(Value value) noexcept
    162162{
    163163    assert(!valid);
     
    171171
    172172template <class Value>
    173 inline Value Slot<Value>::getValue() const throw()
     173inline Value Slot<Value>::getValue() const noexcept
    174174{
    175175    return valid ? value : static_cast<Value>(0);
     
    179179
    180180template <class Value>
    181 inline void Slot<Value>::clear(int nextFreeIndex) throw()
     181inline void Slot<Value>::clear(int nextFreeIndex) noexcept
    182182{
    183183    assert(valid);
     
    189189
    190190template <class Value>
    191 int Slot<Value>::addValue(Value value) throw()
     191int Slot<Value>::addValue(Value value) noexcept
    192192{
    193193    int id = firstFree;
     
    206206
    207207template <class Value>
    208 Value Slot<Value>::getValue(int valueID) throw()
     208Value Slot<Value>::getValue(int valueID) noexcept
    209209{
    210210    size_t index = static_cast<size_t>(valueID);
     
    216216
    217217template <class Value>
    218 void Slot<Value>::clearValue(int valueID) throw()
     218void Slot<Value>::clearValue(int valueID) noexcept
    219219{
    220220    size_t index = static_cast<size_t>(valueID);
     
    248248     * Get the connection for the given multi-dataref buffer.
    249249     */
    250     static Connection& get(const MultiBuffer& buffer) throw();
     250    static Connection& get(const MultiBuffer& buffer) noexcept;
    251251
    252252private:
     
    275275     * Construct the connection
    276276     */
    277     Connection() throw();
     277    Connection() noexcept;
    278278
    279279    /**
    280280     * Destroy the connection.
    281281     */
    282     ~Connection() throw();
     282    ~Connection() noexcept;
    283283
    284284    /**
    285285     * Handle the currently pending exception.
    286286     */
    287     void handleException() throw();
     287    void handleException() noexcept;
    288288
    289289    /**
    290290     * Get the last error code.
    291291     */
    292     int getLastError(unsigned long* lastErrorSubCode) const throw();
     292    int getLastError(unsigned long* lastErrorSubCode) const noexcept;
    293293
    294294    /**
    295295     * Get the string representation of the last error code.
    296296     */
    297     const char* getLastErrorString() const throw();
     297    const char* getLastErrorString() const noexcept;
    298298
    299299    /**
    300300     * Clear the last error code.
    301301     */
    302     void clearLastError() throw();
     302    void clearLastError() noexcept;
    303303
    304304    /**
     
    307307     * @return the ID of the new getter.
    308308     */
    309     int createMultiGetter() throw();
     309    int createMultiGetter() noexcept;
    310310
    311311    /**
     
    314314     * @return the ID of the new setter.
    315315     */
    316     int createMultiSetter() throw();
     316    int createMultiSetter() noexcept;
    317317
    318318    /**
     
    324324     * @return whether the buffer was found and could be destroyed.
    325325     */
    326     bool destroyMultiBuffer(int bufferID) throw(Exception);
     326    bool destroyMultiBuffer(int bufferID);
    327327};
    328328
    329329//------------------------------------------------------------------------------
    330330
    331 inline Connection& Connection::get(const MultiBuffer& buffer) throw()
     331inline Connection& Connection::get(const MultiBuffer& buffer) noexcept
    332332{
    333333    return static_cast<Connection&>(buffer.getXPlane());
     
    336336//------------------------------------------------------------------------------
    337337
    338 inline Connection::Connection() throw() :
     338inline Connection::Connection() noexcept :
    339339    lastErrorCode(0),
    340340    lastErrorSubCode(0)
     
    344344//------------------------------------------------------------------------------
    345345
    346 Connection::~Connection() throw()
     346Connection::~Connection() noexcept
    347347{
    348348    for(multiBufferIDs_t::iterator i = multiBufferIDs.begin();
     
    355355//------------------------------------------------------------------------------
    356356
    357 void Connection::handleException() throw()
     357void Connection::handleException() noexcept
    358358{
    359359    try {
     
    393393
    394394inline int Connection::getLastError(unsigned long* lastErrorSubCode)
    395     const throw()
     395    const noexcept
    396396{
    397397    if (lastErrorSubCode!=0) *lastErrorSubCode = this->lastErrorSubCode;
     
    401401//------------------------------------------------------------------------------
    402402
    403 inline const char* Connection::getLastErrorString() const throw()
     403inline const char* Connection::getLastErrorString() const noexcept
    404404{
    405405    return (lastErrorCode==ERROR_NONE) ? 0 : lastErrorString.c_str();
     
    408408//------------------------------------------------------------------------------
    409409
    410 inline void Connection::clearLastError() throw()
     410inline void Connection::clearLastError() noexcept
    411411{
    412412    lastErrorCode = ERROR_NONE;
     
    417417//------------------------------------------------------------------------------
    418418
    419 inline int Connection::createMultiGetter() throw()
     419inline int Connection::createMultiGetter() noexcept
    420420{
    421421    MultiGetter& getter = XPlane::createMultiGetter();
     
    425425//------------------------------------------------------------------------------
    426426
    427 inline int Connection::createMultiSetter() throw()
     427inline int Connection::createMultiSetter() noexcept
    428428{
    429429    MultiSetter& setter = XPlane::createMultiSetter();
     
    433433//------------------------------------------------------------------------------
    434434
    435 bool Connection::destroyMultiBuffer(int bufferID) throw(Exception)
     435bool Connection::destroyMultiBuffer(int bufferID)
    436436{
    437437    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
Note: See TracChangeset for help on using the changeset viewer.