Ignore:
Timestamp:
02/07/13 18:58:46 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The multi-dataref buffers are managed by the XPlane object

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/client/c/hu/varadiistvan/xplra/XPlane.h

    r19 r26  
    3535#include <hu/varadiistvan/scpl/io/Waiter.h>
    3636
     37#include <set>
     38
    3739#include <inttypes.h>
    3840
     
    4951
    5052namespace hu { namespace varadiistvan { namespace xplra {
     53
     54//------------------------------------------------------------------------------
     55
     56class MultiBuffer;
     57class MultiGetter;
     58class MultiSetter;
    5159
    5260//------------------------------------------------------------------------------
     
    6169private:
    6270    /**
     71     * Type for the set of multi-dataref buffers.
     72     */
     73    typedef std::set<MultiBuffer*> multiBuffers_t;
     74
     75    /**
    6376     * The waiter to use.
    6477     */
     
    7487     */
    7588    scpl::io::DataStream* stream;
     89
     90    /**
     91     * The buffers created by this object.
     92     */
     93    multiBuffers_t multiBuffers;
    7694
    7795public:
     
    84102    /**
    85103     * Destroy the object. If connected, the connection will be
    86      * closed.
     104     * closed. It destroys all existing buffers, so their references
     105     * become invalid.
    87106     */
    88107    ~XPlane() throw();
     
    102121     */
    103122    void disconnect() throw();
     123
     124    /**
     125     * Create a new getter of multiple datarefs and return a reference
     126     * to it.
     127     */
     128    MultiGetter& createMultiGetter() throw();
     129
     130    /**
     131     * Create a new setter of multiple datarefs and return a reference
     132     * to it.
     133     */
     134    MultiSetter& createMultiSetter() throw();
     135
     136    /**
     137     * Destroy the given getter or setter of multiple datarefs. As the
     138     * buffer is unregistered, if it has been registered previously,
     139     * and  unregistration may fail, this function might throw an
     140     * exception.
     141     *
     142     * @return if the buffer was found and could be destroyed
     143     */
     144    bool destroyMultiBuffer(MultiBuffer& buffer) throw(Exception);
    104145
    105146    /**
Note: See TracChangeset for help on using the changeset viewer.