Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

string_resource Class Reference

parser and map of string resources More...

List of all members.

Public Methods

bool init (char *buffer, int length) throw (exception)
 parse the given buffer

const string & get (int id) const throw (exception)
 extract a string


Private Attributes

map< int, string > _strings
 The map of string resources (the key is the resource identifier).


Detailed Description

parser and map of string resources

This class implements a parser for the string resource format of SMUSH animations. It then allows the player to get the string corresponding to a particular identifier.

Bug:
some of The Dig strings are not completely parsed (in titles)

Definition at line 49 of file player.cpp.


Member Function Documentation

const string& string_resource::get int    id const throw (exception) [inline]
 

extract a string

Parameters:
id  the resource identifier
Returns:
the corresponding string.

Definition at line 95 of file player.cpp.

References _strings.

bool string_resource::init char *    buffer,
int    length
throw (exception) [inline]
 

parse the given buffer

Parameters:
buffer  the buffer that contain the resource (in lucasart format)
length  the length of the buffer
Returns:
true if the parsing went fine, false otherwise

Definition at line 60 of file player.cpp.

References _strings.

Referenced by get_strings().


Member Data Documentation

map<int, string> string_resource::_strings [private]
 

The map of string resources (the key is the resource identifier).

Definition at line 51 of file player.cpp.

Referenced by get(), and init().


The documentation for this class was generated from the following file:
Generated on Fri Aug 9 22:54:33 2002 for san_player by doxygen1.2.16