Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

lrt::Resource Class Reference

The resource manager for libRT. More...

#include <rtresource.h>

List of all members.

Static Public Methods

InputStream * getResource (const String &name)
 Finds a resource, by a given name. More...

void addResource (const lrt_resource_type &res)


Detailed Description

The resource manager for libRT.

In LibRT, resources are files which have been translated to resource header (*.rh) files and which have been compiled into the application executable. The tool resmake is included with libRT to automate the file translation. Resources can be accessed much like files, using input streams.

See also:
getResource() , ResourceInputStream


Member Function Documentation

InputStream * lrt::Resource::getResource (  const String &    name )  [static]
 

Finds a resource, by a given name.

This method first tries to interprete name as a file name, resolving it from the current folder. If that file exists, a FileInputStream to this file is returned. If the file doesn't exist, the internal resource table is searched for the resource. If it is found, a ResourceInputStream to this resource is returned. If no such resource exists, NULL is returned.

Note that resource names are case sensitive and should always be specified using forward slashes. (e.g. "images/mybutton.gif")


The documentation for this class was generated from the following files:
This is the RoboTour API documentation version 0.1 • Copyright (C) by Florian Fischer