#include "stdio.h"
#include "stdlib.h"
#include "ctype.h"
#include "string.h"
#include "DynVector.h"
#include "ConfiguratorNode.h"
#include "Configurator.h"

int main()
{

	ConfiguratorNode Global;
	Configurator c;

	c.Load("C:\\test.txt");
	if(!c.Parse(&Global))
	{
		if(c.checkError())
		{
			printf("%s\n", c.checkError());
		}
	}
	else
	{
		printf("%s\n", Global.Next_Level("test")->Next_Level("hello")->Keys("foo"));
		printf("%s\n", Global.Next_Level("test")->Next_Level("hello")->Keys("bar"));
		printf("%s\n", Global.Next_Level("test")->Next_Level("world")->Keys("foo"));
		printf("%s\n", Global.Next_Level("test")->Next_Level("world")->Keys("bar"));
		printf("%s\n", Global.Next_Level("test")->Keys("foo"));
		printf("%s\n", Global.Next_Level("test")->Keys("bar"));
	}


	getchar();
	return 0;
}
