This is the high-level story object. More...
#include <story.h>
Public Member Functions | |
virtual | ~Story (void) throw () |
virtual const char * | getUuid (void) const =0 throw () |
every story must have a universally unique ID | |
virtual const char * | getTitle (void) const =0 throw () |
short title (preferably 16 characters or less!) | |
virtual const char * | getStartingMapId (void) const =0 throw () |
return the ID of the starting map (game starts here) | |
virtual std::string | getObjectPath (IN const char *objectType, IN const char *objectId) const =0 |
Given an object ID, and type of object, return the path. | |
virtual smart_ptr< i18n::Manager > | getI18nManager (IN const char *path)=0 |
given the locale-relative path, return an i18n::Manager object Example: getI18nManager("converse/system.txt") | |
Static Public Member Functions | |
static smart_ptr< Story > | create (IN const char *locale, IN const char *story_dir) |
This is the high-level story object.
Story objects exist to help get IDs and absolute paths to local persisted objects relevant to the story being told. The goal is that a story object is pointed at a local directory (containing the full story files), and the Story object handles all the details where objects are persisted within that directory structure. The Story object also understands (and exposes) some Story-level concepts.
For instance, a Story object can tell you the ID of the starting map for the story. Given a map ID, the Story object can tell you the full path that map on local disk.
The Story object can NOT:
The story library should never depend on any aesop libraries. This should be a simple leaf library.
All methods must be threadsafe! This should be no big deal since all methods are typically const anyway.
Definition at line 91 of file story.h.