From e33e19d0587146859d48a134ec9fd94e7b7ba5cd Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Thu, 8 Dec 2011 14:53:40 +0000 Subject: Initial upload --- nGenEx/ContentBundle.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 nGenEx/ContentBundle.h (limited to 'nGenEx/ContentBundle.h') 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 values; +}; + +#endif ContentBundle_h + -- cgit v1.1