#ifndef HASHEDSTRING_INC 
#define HASHEDSTRING_INC

extern "C"
{
	#include "GeneralHashFunctions.h"
}

#define MAX_STRING_LENGTH 128

namespace Core
{
	class HashedString
	{
	public:
		HashedString(unsigned int hashValue);
		HashedString(char* hashString, int length);

		inline uint32 operator()() const { return m_hashedValue; }

#ifdef _DEBUG
		const char* str() const { return m_hashString; }
#endif
	private:
		unsigned int m_hashedValue;

#ifdef _DEBUG
		char m_hashString[MAX_STRING_LENGTH];
#endif
	};

}

#endif //HASHEDSTRING_INC

namespace Core
{
	inline HashedString::HashedString(unsigned int hashValue) :
	m_hashedValue(hashValue)
	{

	}

	inline HashedString::HashedString(char* hashString, int length) :
		m_hashedValue(0)
	{
		m_hashedValue = DJBHash(hashString, length);

#ifdef _DEBUG
		memcpy(&m_hashString, hashString, length);
#endif
	}
}

