	public:
		int roleid;
		char goal_type;
		char op;
		int goal_id;
		enum { PROTOCOL_TYPE = PROTOCOL_AUTOTEAMSETGOAL };
	public:
		AutoTeamSetGoal() { type = PROTOCOL_AUTOTEAMSETGOAL; }
		AutoTeamSetGoal(void*) : Protocol(PROTOCOL_AUTOTEAMSETGOAL) { }
		AutoTeamSetGoal (int l_roleid,char l_goal_type,char l_op,
			int l_goal_id)
			 : roleid(l_roleid),goal_type(l_goal_type),op(l_op)
			,goal_id(l_goal_id)
		{
			type = PROTOCOL_AUTOTEAMSETGOAL;
		}

		AutoTeamSetGoal(const AutoTeamSetGoal &rhs)
			: Protocol(rhs),roleid(rhs.roleid),goal_type(rhs.goal_type),op(rhs.op)
			,goal_id(rhs.goal_id) { }

		GNET::Protocol *Clone() const { return new AutoTeamSetGoal(*this); }

		OctetsStream& marshal(OctetsStream & os) const
		{
			os << roleid;
			os << goal_type;
			os << op;
			os << goal_id;
			return os;
		}

		const OctetsStream& unmarshal(const OctetsStream &os)
		{
			os >> roleid;
			os >> goal_type;
			os >> op;
			os >> goal_id;
			return os;
		}

		int PriorPolicy( ) const { return 1; }

		bool SizePolicy(size_t size) const { return size <= 32; }
