#ifndef __GNET_DBFACTIONALLIANCEAPPLYARG_RPCDATA
#define __GNET_DBFACTIONALLIANCEAPPLYARG_RPCDATA

#include "rpcdefs.h"


namespace GNET
{
	class DBFactionAllianceApplyArg : public GNET::Rpc::Data
	{
	public:
		int fid;
		int dst_fid;
		int end_time;
		int op_time;

	public:
		DBFactionAllianceApplyArg (int l_fid = 0,int l_dst_fid = 0,int l_end_time = 0
			,int l_op_time = 0)
			: fid(l_fid),dst_fid(l_dst_fid),end_time(l_end_time)
			,op_time(l_op_time)
		{
		}

		DBFactionAllianceApplyArg(const DBFactionAllianceApplyArg &rhs)
			: fid(rhs.fid),dst_fid(rhs.dst_fid),end_time(rhs.end_time),
			op_time(rhs.op_time) { }

		Rpc::Data *Clone() const { return new DBFactionAllianceApplyArg(*this); }

		Rpc::Data& operator = (const Rpc::Data &rhs)
		{
			const DBFactionAllianceApplyArg *r = dynamic_cast<const DBFactionAllianceApplyArg *>(&rhs);
			if (r && r != this)
			{
				fid = r->fid;
				dst_fid = r->dst_fid;
				end_time = r->end_time;
				op_time = r->op_time;
			}
			return *this;
		}

		DBFactionAllianceApplyArg& operator = (const DBFactionAllianceApplyArg &rhs)
		{
			const DBFactionAllianceApplyArg *r = &rhs;
			if (r && r != this)
			{
				fid = r->fid;
				dst_fid = r->dst_fid;
				end_time = r->end_time;
				op_time = r->op_time;
			}
			return *this;
		}

		OctetsStream& marshal(OctetsStream & os) const
		{
			os << fid;
			os << dst_fid;
			os << end_time;
			os << op_time;
			return os;
		}

		const OctetsStream& unmarshal(const OctetsStream &os)
		{
			os >> fid;
			os >> dst_fid;
			os >> end_time;
			os >> op_time;
			return os;
		}

	};
};
#endif
