#ifndef _COMMON_DDEACK_HPP_
#define _COMMON_DDEACK_HPP_
#ifndef _COMMON_DDE_HPP_
#include <common/dde.hpp>
#endif

class DDEAck : private DDEACK
{
public:
	DDEAck(void);
	DDEAck(WORD appReturnCode,WORD busy,WORD ack);
	DDEAck(const DDEAck &someDDEAck);
	~DDEAck();
	DDEAck &operator=(const DDEAck &someDDEAck);
  WORD operator==(const DDEAck &someDDEAck);
	WORD returnCode(void)const;
	void returnCode(WORD returnCode);
	WORD busy(void)const;
	void busy(WORD busy);
	WORD ack(void)const;
  void ack(WORD ack);
  operator WORD(void)const;
private:
};

inline
DDEAck::DDEAck(void)
{
	returnCode(FALSE);
	busy(FALSE);
  ack(TRUE);
}

inline
DDEAck::DDEAck(WORD appReturnCode,WORD busyFlag,WORD ackFlag)
{
	returnCode(appReturnCode);
	busy(busyFlag);
  ack(ackFlag);
}

inline
DDEAck::DDEAck(const DDEAck &someDDEAck)
{
  *this=someDDEAck;
}

inline
DDEAck::~DDEAck()
{
}

inline
DDEAck &DDEAck::operator=(const DDEAck &someDDEAck)
{
	returnCode(someDDEAck.returnCode());
	busy(someDDEAck.busy());
	ack(someDDEAck.ack());
	return *this;
}

inline
WORD DDEAck::operator==(const DDEAck &someDDEAck)
{
	return(returnCode()==someDDEAck.returnCode()&&
				 busy()==someDDEAck.busy()&&
         ack()==someDDEAck.ack());
}

inline
WORD DDEAck::returnCode(void)const
{
  return DDEACK::bAppReturnCode;
}

inline
void DDEAck::returnCode(WORD returnCode)
{
  DDEACK::bAppReturnCode=returnCode;
}

inline
WORD DDEAck::busy(void)const
{
  return DDEACK::fBusy;
}

inline
void DDEAck::busy(WORD busy)
{
  DDEACK::fBusy=busy;
}

inline
WORD DDEAck::ack(void)const
{
	return DDEACK::fAck;
}

inline
void DDEAck::ack(WORD ack)
{
  DDEACK::fAck=ack;
}

inline
DDEAck::operator WORD(void)const
{
	return *((WORD*)((DDEACK*)this));
}
#endif