Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ContentBundle.h
Go to the documentation of this file.
1 /* Project nGenEx
2  Destroyer Studios LLC
3  Copyright © 1997-2006. All Rights Reserved.
4 
5  SUBSYSTEM: nGenEx.lib
6  FILE: ContentBundle.h
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  Chained collection of localized strings
13 */
14 
15 #ifndef ContentBundle_h
16 #define ContentBundle_h
17 
18 #include "Types.h"
19 #include "Dictionary.h"
20 #include "Text.h"
21 #include "Locale_ss.h"
22 
23 // +--------------------------------------------------------------------+
24 
26 {
27 public:
28  static const char* TYPENAME() { return "ContentBundle"; }
29 
30  ContentBundle(const char* bundle, Locale* locale);
31  virtual ~ContentBundle();
32 
33  int operator == (const ContentBundle& that) const { return this == &that; }
34 
35  const Text& GetName() const { return name; }
36  Text GetText(const char* key) const;
37  bool IsLoaded() const { return !values.isEmpty(); }
38 
39 protected:
40  void LoadBundle(const char* filename);
41  Text FindFile(const char* bundle, Locale* locale);
42 
45 };
46 
47 #endif ContentBundle_h
48