
#pragma once
#ifndef AI_TYPES_HPP
#define AI_TYPES_HPP

#include <Stuff\Scalar.hpp>
#include <Stuff\Auto_Ptr.hpp>
#pragma warning(push)
#include <stlport\string>
#include <stlport\vector>
#pragma warning(pop)
#include <Adept\Resource.hpp>
#include <Stuff\NotationFile.hpp>



namespace MW4AI
{
	class Type
	{
	  public:
		Type(Stuff::Page& page);

	  protected:
		std::string m_Name;
		std::string m_DefaultText;
		std::string m_Display;
		std::string m_Values;
	};

	class Types
	{
	  public:
		Types();
		~Types();

		static void IncrementRefCount();
		static void DecrementRefCount();

		static Types* Instance();

	  private:
		void ReadPage(Stuff::Page& page);

	  private:
		Adept::Resource m_Resource;
		Stuff::Auto_Ptr<Stuff::NotationFile> m_NotationFile;
		int m_RefCount;
		static Types* m_Instance;

		std::vector<Type*> m_Types;
	};

	class Type_Integer
		: public Type
	{
	  public:
		Type_Integer(Stuff::Page& page);

	  private:
		int m_Min;
		int m_Max;
		int m_Default;
	};

	class Type_Real
		: public Type
	{
	  public:
		Type_Real(Stuff::Page& page);

	  private:
		Stuff::Scalar m_Min;
		Stuff::Scalar m_Max;
		Stuff::Scalar m_Default;
	};

	class Type_String
		: public Type
	{
	  public:
		Type_String(Stuff::Page& page);
	};
};



#endif // AI_TYPES_HPP
