#pragma once
#include "IDList.h"
#include "TrigString.h"

class CTrigStringTable  
{
	class CListedTrigString
	{
	public:
		CListedTrigString(CString str, int ID);
		CListedTrigString* next;
		CTrigString trigstring;
		CListedTrigString();
		virtual ~CListedTrigString();
	};

	typedef CListedTrigString (*PCListedTrigString);

public:
	CTrigString GetNextTrigString();
	void GoFirstTrigString();
	CString GetTrigStringName(int ID);
	int AddTrigString(CString str);
	CString GetTrigStringValue(int ID);
	BOOL SetTrigString(CString str, int ID);
	BOOL DelTrigString(int ID);
	BOOL AddTrigString(CString str, int ID);
	void ClearList();
	CTrigStringTable();
	virtual ~CTrigStringTable();

protected:
	int m_iHighestID;
	CIDList m_FreeIDList; // list of free IDs
	PCListedTrigString m_pNext;
	PCListedTrigString m_pHead;
};