RequestLoader.h 740 Bytes
#ifndef REQUESTLOADER_H
#define REQUESTLOADER_H

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

#define TREPS_REQUEST_XSD "request.xsd"

using namespace TREPS::XMLManager;

namespace TREPS
{
	namespace RequestManager
	{
		class RequestLoaderClass : public XMLManagerClass
		{
			public :
				RequestLoaderClass(void);
				
				//load request XML file and valid it with the request.xsd schema file
				bool loadAndValid(const char *request_path);
				
				//get request type
				string getType(void);

				//get request argument by argument name
				string getArgStrByName(const char *arg_name);
				
			private :
				Node *requestNode;
				
				string typeStr;
				
				NodeList argNodeList;
		};
	}
}

#endif