diff options
author | FWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544> | 2012-05-26 16:43:59 +0000 |
---|---|---|
committer | FWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544> | 2012-05-26 16:43:59 +0000 |
commit | f04d3710278e0dd5451e99a4969caf9d1a6a5092 (patch) | |
tree | b99046e2b0ab0c7b166f8078cc3c71c68f39029a /Magic2/ContentBundle.h | |
parent | 9a9de7689176de013872e5a6a5367f79202d0844 (diff) | |
download | starshatter-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.h | 48 |
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
+
|