///////////////////////////////////////////////////////////////////////////////
/// @file dePacketList.hpp
///
/// @brief 
///
/// @author trajar
///
/// This file is the intellectual property of Novus Delta, LLC.. Usage of the
/// contents of this file is subject to the Destiny3D Member License which
/// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
///
/// This file is distributed "AS IS" without warranty of any kind.  Novus
/// Delta, LLC. does not guarantee the fitness of the contents of this file
/// for any particular purpose.
///
/// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
///
/// <hr>
///                                 Change History
/// <hr>
///
/// @date Jun 2002
/// @author trajar
/// @remarks Creation
///
///////////////////////////////////////////////////////////////////////////////

#ifndef		_DEPACKETLIST_HPP
#define		_DEPACKETLIST_HPP

#ifndef		_DENET_HPP
 #include	"deNet.hpp"
#endif

#ifndef		_DEPACKET_HPP
 #include	"dePacket.hpp"
#endif

#include	<SET>
typedef		std::set< dePacket >	aPackets;

class DENET_API dePacketList
{
public:
	dePacketList(void);
	virtual ~dePacketList(void);

	void		AddPacket( dePacket * pPacket );
	int			GetNumPakets(void);
	bool		IsCompleteList(void);
	dePacket *	ConsolidatePackets(void);
	int			GetID(void)							const { return m_ID; }
	
private:

	WORD		m_ID;
	aPackets	m_aPackets;

public:

	friend bool operator !=		( const dePacketList& l, const dePacketList& r ) {	return ( l.m_ID != r.m_ID );  }
	friend bool operator ==		( const dePacketList& l, const dePacketList& r ) {	return ( l.m_ID == r.m_ID );  }
	friend bool operator >		( const dePacketList& l, const dePacketList& r ) {	return l.m_ID > r.m_ID;  }
	friend bool operator <		( const dePacketList& l, const dePacketList& r ) {	return l.m_ID < r.m_ID;  }
};

#endif