#pragma once

#include "Config.h"

class CKeySwapString
{
public:
	CKeySwapString(void);
	virtual ~CKeySwapString(void);

	void SetString(CString str);
	void Swap(CConfigAccess swap);
	void Swap(CString key,CString data);
	int KeyAvailable();
	CString GetString(CString noData="");

protected:
	void _Swap(CString &key,CString &data);
	class CSwapItem
	{
	public:
		CSwapItem() {};
		CSwapItem(CString before,CString key,int swap=0)
		{
			m_beforeString = before;
			m_keyString = key;
			m_swapped = swap;
		};

		CString m_beforeString;
		CString	m_keyString;
		int		m_swapped;
	};

	CList<CSwapItem,CSwapItem&>	m_swapList;
	CString						m_lastString;
};
