summaryrefslogtreecommitdiffhomepage
path: root/nGenEx/ContentBundle.h
diff options
context:
space:
mode:
authorFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-08 14:53:40 +0000
committerFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-08 14:53:40 +0000
commite33e19d0587146859d48a134ec9fd94e7b7ba5cd (patch)
tree69d048c8801858d2756ab3a487090a7a1b74bf14 /nGenEx/ContentBundle.h
downloadstarshatter-e33e19d0587146859d48a134ec9fd94e7b7ba5cd.zip
starshatter-e33e19d0587146859d48a134ec9fd94e7b7ba5cd.tar.gz
starshatter-e33e19d0587146859d48a134ec9fd94e7b7ba5cd.tar.bz2
Initial upload
Diffstat (limited to 'nGenEx/ContentBundle.h')
-rw-r--r--nGenEx/ContentBundle.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/nGenEx/ContentBundle.h b/nGenEx/ContentBundle.h
new file mode 100644
index 0000000..d322466
--- /dev/null
+++ b/nGenEx/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.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
+