// DWBS ------------------------------------------------------------------ DWBS
//
// PLATFORM		: ALL
// PRODUCT		: BIT_DEMON
// VISIBILITY	: PUBLIC
//
// DWBS ------------------------------------------------------------------ DWBS

// PURPOSE:  Container class for storing title specific search results.
//	A game should create a subclass for each title specific query.
//  Search parameters are stored in bdQueryParams.


#ifndef BD_QUERY_REPLY_H
#define BD_QUERY_REPLY_H

#include <bdCore/bdMemory/bdMemory.h>
#include <bdCore/bdReference/bdReference.h>


BD_REFERENCE(bdBitBuffer);

/// Container class for storing title specific search results.
///	A game should create a subclass for each title specific query.
/// Search parameters are stored in bdQueryParams.
class bdQueryResult 
{
	public:

		BD_DECLARE_NEW_AND_DELETE_OPERATORS

		/// Default constructor
		bdQueryResult();

		/// Virtual destructor.
		virtual ~bdQueryResult();

		/// Handles a result set for a title specific query.
		/// \param numResults[in] : The number of rows in the result set.
		/// \param values[in] : The actual values of each data field.
		virtual bdBool handleResult(const bdUInt /*numResults*/, 
									bdBitBufferRef /*buffer*/) = 0;

		bdUInt getNumResults() const;

		/// Reset the class to it's initial state.
		/// \todo Consider whether this should be called by DemonWare 
		///       code prior to invoking handleResult.
		virtual void reset();

	protected:

		bdUInt m_numResults;
};

#endif // BD_QUERY_REPLY_H
