#ifndef _ModelMethod_
#define _ModelMethod_


#include "qpid/framing/AMQMethodBody.h"
#include "qpid/framing/Header.h"

namespace qpid {
namespace framing {


class ModelMethod : public AMQMethodBody 
{
    mutable Header header;
public:    
    virtual ~ModelMethod() {}
    virtual void encodeHeader(Buffer& buffer) const { header.encode(buffer); }
    virtual void decodeHeader(Buffer& buffer, uint32_t size=0) { header.decode(buffer, size); }
    virtual uint32_t headerSize() const { return header.encodedSize(); } 
    virtual bool isSync() const { return header.getSync(); }
    virtual void setSync(bool on) const { header.setSync(on); }
    Header& getHeader() { return header; } 
    const Header& getHeader()  const { return header; } 
};


}} // namespace qpid::framing


#endif
