Index: trunk/nv/handle.hh
===================================================================
--- trunk/nv/handle.hh	(revision 272)
+++ trunk/nv/handle.hh	(revision 273)
@@ -36,10 +36,11 @@
 		handle() : m_index(0), m_counter(0) {}
 
-		inline bool operator==(const handle& rhs){return m_index == rhs.m_index && m_counter == rhs.m_counter; }
-		inline bool operator!=(const handle& rhs){return !(*this == rhs);}
+		inline bool operator==(const handle& rhs) const {return m_index == rhs.m_index && m_counter == rhs.m_counter; }
+		inline bool operator!=(const handle& rhs) const {return !(*this == rhs);}
 
 		bool is_nil() const { return m_index == 0 && m_counter == 0; }
 		bool is_valid() const { return !is_nil(); }
-
+		T index() const { return m_index; }
+		size_t hash() const { return std::hash<T>()( m_counter << IBITS | m_index ); }
 	protected:
 		T m_index   : IBITS;
@@ -50,4 +51,6 @@
 		friend class index_store;
 	};
+
+
 
 	template < typename HANDLE, typename TINDEX = sint32 >
@@ -120,4 +123,6 @@
 	};
 
+
+
 	template < typename T, typename HANDLE = handle<>, typename TINDEX = sint32 >
 	class entity_store
@@ -134,4 +139,11 @@
 
 		entity_store() {}
+
+		explicit entity_store( uint32 reserve )
+		{
+			m_handles.reserve( reserve );
+			m_data.reserve( reserve );
+		}
+
 		handle create()
 		{
@@ -140,4 +152,5 @@
 			return m_handles.back();
 		}
+
 		value_type* get( handle h )
 		{
@@ -146,4 +159,10 @@
 			return eindex >= 0 ? &(m_data[ eindex ]) : nullptr;
 		}
+
+		handle get_handle( index_type i ) const { return m_handles[i]; }
+		const T& operator[] ( index_type i ) const { return m_data[i]; }
+		T& operator[] ( index_type i ) { return m_data[i]; }
+		size_t size() const { return m_data.size(); }
+		
 		void destroy( handle e )
 		{
@@ -175,7 +194,22 @@
 	};
 
-
-
 }
 
+namespace std
+{
+	template < 
+		typename T, 
+		unsigned IBITS,
+		unsigned CBITS,
+		typename TAG
+	>
+	struct hash<nv::handle<T,IBITS,CBITS,TAG>>
+	{
+		size_t operator()(const nv::handle<T,IBITS,CBITS,TAG>& h) const
+		{
+			return h.hash();
+		}
+	};
+}
+
 #endif // NV_HANDLE_HH
