#ifndef _FishIDE_VarProcessor_h_
#define _FishIDE_VarProcessor_h_

#include <Core/Core.h>

using namespace Upp;

class VarProcessor
{
	private:
	
	protected:
	
	public:
	
		// merge a group of variables with another, replacing
		// same names ones with the new ones
		static void MergeVars(VectorMap<String, String> &v, VectorMap<String, String> const &news);
		static void MergeVars(VectorMap<String, String> &v, String const &key, String const &value);
		
		// extract variables from a string
		static Vector<String> ExtractVars(String const &s);
		
		// substitute variables
		static String SubstVars(String const &s, VectorMap<String, String> const &values);
		static String SubstVars(String const &s, String const &subst); 
		
};

#endif
