summaryrefslogtreecommitdiffhomepage
path: root/Magic2/ContentBundle.h
diff options
context:
space:
mode:
authorFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2012-05-26 16:43:59 +0000
committerFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2012-05-26 16:43:59 +0000
commitf04d3710278e0dd5451e99a4969caf9d1a6a5092 (patch)
treeb99046e2b0ab0c7b166f8078cc3c71c68f39029a /Magic2/ContentBundle.h
parent9a9de7689176de013872e5a6a5367f79202d0844 (diff)
downloadstarshatter-f04d3710278e0dd5451e99a4969caf9d1a6a5092.zip
starshatter-f04d3710278e0dd5451e99a4969caf9d1a6a5092.tar.gz
starshatter-f04d3710278e0dd5451e99a4969caf9d1a6a5092.tar.bz2
And the rest that was missing to make this thing compile.
Diffstat (limited to 'Magic2/ContentBundle.h')
-rw-r--r--Magic2/ContentBundle.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/Magic2/ContentBundle.h b/Magic2/ContentBundle.h
new file mode 100644
index 0000000..4848716
--- /dev/null
+++ b/Magic2/ContentBundle.h
@@ -0,0 +1,48 @@
+/* Project nGenEx
+ Destroyer Studios LLC
+ Copyright © 1997-2006. All Rights Reserved.
+
+ SUBSYSTEM: nGenEx.lib
+ FILE: ContentBundle.h
+ AUTHOR: John DiCamillo
+
+
+ OVERVIEW
+ ========
+ Chained collection of localized strings
+*/
+
+#ifndef ContentBundle_h
+#define ContentBundle_h
+
+#include "Types.h"
+#include "Dictionary.h"
+#include "Text.h"
+#include "Locale_ss.h"
+
+// +--------------------------------------------------------------------+
+
+class ContentBundle
+{
+public:
+ static const char* TYPENAME() { return "ContentBundle"; }
+
+ ContentBundle(const char* bundle, Locale* locale);
+ virtual ~ContentBundle();
+
+ int operator == (const ContentBundle& that) const { return this == &that; }
+
+ const Text& GetName() const { return name; }
+ Text GetText(const char* key) const;
+ bool IsLoaded() const { return !values.isEmpty(); }
+
+protected:
+ void LoadBundle(const char* filename);
+ Text FindFile(const char* bundle, Locale* locale);
+
+ Text name;
+ Dictionary<Text> values;
+};
+
+#endif ContentBundle_h
+