/**
 * @class kIndexDefManager
 * @brief Def Manager for loading and getting defs with both a name and id value \n\n
 * Usage:
 * 
 * @code{.cpp}
 * kIndexDefManager iDefManager;
 * iDefManager.LoadFile("defs/MyDef.txt");
 * //or
 * iDefManager.LoadFilesInDirectory("defs/MyDefs/", "txt");
 * 
 * if (iDefManager !is null)
 * {
 * 	kDictMem@ dictMem = iDefManager.GetEntry(64);
 * }
 * @endcode
 */
class kIndexDefManager
{
public:
	
	/**
	 * @brief Return the def index with the highest value or 0 if there are no entries
	 */
	int FindHighestIndex();
	
	/**
	 * @brief Returns the number of entries in the defManager
	 */
	const uint EntryCount();

	/**
	 * @brief Returns the def data using an index value or null if key not found
	 */
	const kDictMem @GetEntry(const int index);
	
	/**
	 * @brief Loads a def file using the Turok 2 folder as the working directory
	 * @code{.cpp}
	 * LoadFile("defs/MyDef.txt");
	 * @endcode
	 */
	void LoadFile(const kStr &in localFilePath, bool unknown = false);
	
	/**
	 * @brief Loads all files in the directory and it's sub directories with the specified file extension
	 * @code{.cpp}
	 * LoadFilesInDirectory("defs/MyDefs/", "txt");
	 * @endcode
	 */
	void LoadFilesInDirectory(const kStr &in localDirectoryPath, const kStr &in fileExtension, bool unknown = false);
};
