	public:
		int cash;
		int money;
		std::vector<StockPrice> prices;
		char locked;
		unsigned int localsid;
		enum { PROTOCOL_TYPE = PROTOCOL_STOCKACCOUNT_RE };
	public:
		StockAccount_Re() { type = PROTOCOL_STOCKACCOUNT_RE; }
		StockAccount_Re(void*) : Protocol(PROTOCOL_STOCKACCOUNT_RE) { }
		StockAccount_Re (int l_cash,int l_money,const std::vector<StockPrice>& l_prices,
			char l_locked = 0,unsigned int l_localsid = 0)
			 : cash(l_cash),money(l_money),prices(l_prices)
			,locked(l_locked),localsid(l_localsid)
		{
			type = PROTOCOL_STOCKACCOUNT_RE;
		}

		StockAccount_Re(const StockAccount_Re &rhs)
			: Protocol(rhs),cash(rhs.cash),money(rhs.money),prices(rhs.prices)
			,locked(rhs.locked),localsid(rhs.localsid) { }

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

		OctetsStream& marshal(OctetsStream & os) const
		{
			os << cash;
			os << money;
			os << prices;
			os << locked;
			os << localsid;
			return os;
		}

		const OctetsStream& unmarshal(const OctetsStream &os)
		{
			os >> cash;
			os >> money;
			os >> prices;
			os >> locked;
			os >> localsid;
			return os;
		}

		int PriorPolicy( ) const { return 1; }

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