FrameManager.h 1019 Bytes
#ifndef FRAMEMANAGER_H
#define FRAMEMANAGER_H

#include "../Application/Application.h"
#include "../XMLManager/XMLManager.h"

#define TREPS_FRAMES_XSD "frames.xsd"

using namespace TREPS::Application;
using namespace TREPS::XMLManager;

namespace TREPS
{
	namespace FrameManager
	{
		class FrameManagerClass
		{
			public:
				FrameManagerClass(void);

				~FrameManagerClass(void);

				//load frames list file, + xsd validation
				bool init(const char *file_path);

				//test if a frame exist
				bool isFrameExist(const char *frame_id);

				//detect frames from string list
				void addDetectedFramesFromStringInList(const char *str, t_StringList &framesList);

				//detect frames from attributes list
				void addDetectedFramesFromAttributesInList(const map<string,string> *attributes, t_StringList &framesList);

				//update the frame list file
				bool updateFrameList(t_StringList frameList, const char *newFramePath);

			private:
				ApplicationClass *app;

				XMLManagerClass *loader;
		};
	}
}

#endif