summaryrefslogtreecommitdiff
path: root/server/src/macrolist.h
diff options
context:
space:
mode:
authordeva <deva>2010-06-01 12:58:32 +0000
committerdeva <deva>2010-06-01 12:58:32 +0000
commit74a28aa7125be6a603128ad600c98c4882f3b5c2 (patch)
tree1a9e4ab74f29d5ff10f2701e4e112f4525c0dcec /server/src/macrolist.h
parent9b9c1e2dd3e5807ff7714b378b03b9ba31f42df7 (diff)
From new_protocol branch.
Diffstat (limited to 'server/src/macrolist.h')
-rw-r--r--server/src/macrolist.h41
1 files changed, 5 insertions, 36 deletions
diff --git a/server/src/macrolist.h b/server/src/macrolist.h
index 9b9b0d2..51a30ec 100644
--- a/server/src/macrolist.h
+++ b/server/src/macrolist.h
@@ -28,45 +28,14 @@
#ifndef __PRACRO_MACROLIST_H__
#define __PRACRO_MACROLIST_H__
-#include <map>
-#include <string>
-#include "versionstr.h"
+#include "entitylist.h"
-#include "exception.h"
-
-/**
- * The Items contained in the MacroList.
- */
-typedef std::map<VersionStr, std::string> MacroListItem;
-
-/**
- * The MacroList class is intended for macro file caching, so that all macros
- * do not need to be parsed on each macro query.
- * It builds a list of macros and versions based on the informations read from
- * the MacroHeaderParser.
- * This means that just because a macro gets into the list doesn't means that it
- * will validate as a correct macro (not even nessecarily correct XML).
- */
-class MacroList : public std::map<std::string, MacroListItem > {
+class MacroList : public EntityList {
public:
- /**
- * Constructor.
- * @param macropath A std::string containing the path in which we should look
- * for xml files.
- */
- MacroList(std::string macropath);
-
- /**
- * Convenience method, to gain the filename of the latest version of a given macro.
- * This method throws an Exception if the macro does not exist in the tree.
- * @param macro A std::string containing the name of the wanted macro.
- * @return A std::string containing the file containing the macro with full path
- * included.
- */
- std::string getLatestVersion(std::string macro) throw(Exception);
+ MacroList(std::string path);
-private:
- std::string macropath;
+protected:
+ void addFile(std::string file);
};
#endif/*__PRACRO_MACROLIST_H__*/