/**
    05Robot - shared routines

    @author P.Kaczmarek,J.Tomczynski,T.Mankowski
    @version 1.0 2017
*/
#ifndef COMMON_H
#define COMMON_H
#if defined(MYSHAREDLIB_LIBRARY)
#  define MYSHAREDLIB_EXPORT Q_DECL_EXPORT
#else
#  define MYSHAREDLIB_EXPORT Q_DECL_IMPORT
#endif
#define ADD_PROPERTY(member, _type) \
    public: \
    /**
    * Set member of type _type.
    * @see m_##member for a more detailed description
    */ \
    void Set##member(_type  _arg_##member) \
{ \
    m_##member = _arg_##member;\
    } \
    /**
    * Get member of type _type.
    * @see m_##member for a more detailed description
    */ \
    _type member() const\
{ \
    return m_##member;\
    } \
    private: \
    _type m_##member; \
    Q_PROPERTY(_type member READ member WRITE Set##member DESIGNABLE true USER true) \
    public:

#define ADD_STREAM(member, _type) \
    public: \
    /**
    * Set member of type _type.
    * @see m_##member for a more detailed description
    */ \
    int member##_IsEmpty() \
{ \
    return m_##member.isEmpty();\
    } \
    /**
    * Get member of type _type.
    * @see m_##member for a more detailed description
    */ \
    void member##_Enqueue(_type t)\
{ \
    m_##member##.enqueue(t);\
    } \
    _type member##_Dequeue() const\
{ \
    return m_##member.dequeue();\
    } \
    private: \
    QQueue<_type> m_##member;
#endif // COMMON_H
