Logo Search packages:      
Sourcecode: einstein version File versions  Download package

ResourcesCollection Class Reference

#include <resources.h>

List of all members.

Detailed Description

Internationalized resource files collection. When ResourceCollection created all resources checked against current locale. Resources not belonged to current locale are ignored, resources that can be used in current locale sorted by locale relevance score. All resources names interpeted as name[_language][_COUNTRY].extension where name is name of resource, language is optional two letters ISO language code, country is two letters ISO country code and extension is file extension. After processing resource name will be truncated to name.extension. By default resource with highest locale relevance score will be loaded. Howether, it is possible to enumerate all variants by using Resource class interface. Resource files loaded in order specified by their priority. Resources from file loaded later can replace resources loaded before it.

Definition at line 312 of file resources.h.

Public Member Functions

ResourceStreamcreateStream (const std::wstring &name)
void delRef (void *data)
 Delete reference to resource.
void forEachInGroup (const std::wstring &groupName, Visitor< Resource * > &visitor)
 Visit all group members.
void * getRef (const std::wstring &name)
void * getRef (const std::wstring &name, int &size)
ResourcegetResource (const std::wstring &name)
void loadData (const std::wstring &name, Buffer &buffer)
 ResourcesCollection (StringList &directories)
 Temporary buffer for resource files.

Private Types

typedef std::vector
< ResourceFile * > 
 List of resource files.
typedef std::list< Resource * > ResourcesList
 List of resources.
typedef std::map< std::wstring,
 Map group names to resources list.
typedef std::map< std::wstring,
Resource * > 
 Map resource names to resources.

Private Member Functions

void loadResourceFiles (StringList &directories)
 Open resource files.
void processFiles ()
 Make grouping and locale processing.

Private Attributes

Buffer buffer
 List of resource files.
ResourceFiles files
 Map of all available groups.
ResourcesListMap groups
 Map of all available resources.
ResourcesMap resources

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index