#pragma once

#include "Proxies.hpp"
#include "Process.hpp"

namespace Proxies {

	class GetInfoProcess:
		public Process
	{
	public:
		GetInfoProcess(Stuff::MemoryStream *s)
			{ stream = s; Reset(); }
		GetInfoProcess(
			Stuff::NotationFile *data_file,
			Stuff::MemoryStream *s
		):
			Process(data_file)
				{ stream = s; Reset(); }

		virtual void
			InfoCallback(int);

		void
			Reset();

		void
			TellWhatYouKnow();

		void
			TellMyName(Stuff::MString *name, int);

		void
			TalkAboutATexLibrary(const char *, const char *);

		void
			TalkAboutAMesh(int, int, int, int);

		void
			SetHierarchyLevel(int nr=0)
				{ hierarchyInfoLevel = nr; }

		void
			IncHierarchyLevel()
				{ hierarchyInfoLevel++; }

		void
			DecHierarchyLevel()
				{ hierarchyInfoLevel--; }

		void
			SetHierarchySibling(int nr=0)
				{ hierarchyInfoSibling = nr; }

		enum {
			InfoSceneBit = 0,
			InfoGroupBit,
			InfoChildBit,
			InfoPolyMeshBit,
			InfoPolygonBit,
			InfoStateBit,
			InfoTextureBit,
			InfoTextureLibraryBit,
			InfoBitCount
		};

		enum InfoMode {
			InfoSceneMode = 1<<InfoSceneBit,
			InfoGroupMode = 1<<InfoGroupBit,
			InfoChildMode = 1<<InfoChildBit,
			InfoPolyMeshMode = 1<<InfoPolyMeshBit,
			InfoPolygonMode = 1<<InfoPolygonBit,
			InfoStateMode = 1<<InfoStateBit,
			InfoTextureMode = 1<<InfoTextureBit,
			InfoTextureLibraryMode = 1<<InfoTextureLibraryBit
		};

	protected:
	//
	//	through the process accumulated data
	//
		int nrOfProcessedItems[InfoBitCount];
		static char	*names[InfoBitCount];

		int hierarchyInfoLevel, hierarchyInfoSibling;

		Stuff::MemoryStream *stream;
	};

}
