Provides simple functions to easily access the Ogre::ResourceGroupManager.
More...
#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/Resource.h>
|
static bool | exists (const std::string &name) |
| Find out if the named file exists. More...
|
|
static StringVectorPtr | findResourceNames (const std::string &pattern) |
| Retrieves a list with all resources matching a certain pattern. More...
|
|
static const std::string & | getDefaultResourceGroup () |
| Name of the default resource group (usually "General") More...
|
|
static std::shared_ptr< ResourceInfo > | getInfo (const std::string &name) |
| Get struct with information about path and size. More...
|
|
static DataStreamPtr | open (const std::string &name) |
| Open a single resource by name and return a DataStream pointing at the source of the data. More...
|
|
static DataStreamPtr | open (std::shared_ptr< ResourceInfo > fileInfo) |
| Similar to open(string, string, bool), but with a fileInfo struct. More...
|
|
static DataStreamListPtr | openMulti (const std::string &pattern) |
| Open all resources matching a given pattern (which can contain the character '*' as a wildcard), and return a collection of DataStream objects on them. More...
|
|
Provides simple functions to easily access the Ogre::ResourceGroupManager.
The wrapper functions also avoid having to deal with resource groups.
orxonox::Resource::Resource |
( |
| ) |
|
|
privatedelete |
orxonox::Resource::Resource |
( |
const Resource & |
| ) |
|
|
privatedelete |
orxonox::Resource::~Resource |
( |
| ) |
|
|
privatedelete |
bool orxonox::Resource::exists |
( |
const std::string & |
name | ) |
|
|
static |
Find out if the named file exists.
- Parameters
-
name | Fully qualified name of the file to test for |
StringVectorPtr orxonox::Resource::findResourceNames |
( |
const std::string & |
pattern | ) |
|
|
static |
Retrieves a list with all resources matching a certain pattern.
- Parameters
-
pattern | The pattern to look for. If resource locations have been added recursively, subdirectories will be searched too so this does not need to be fully qualified. |
const std::string & orxonox::Resource::getDefaultResourceGroup |
( |
| ) |
|
|
static |
Name of the default resource group (usually "General")
std::shared_ptr< ResourceInfo > orxonox::Resource::getInfo |
( |
const std::string & |
name | ) |
|
|
static |
Get struct with information about path and size.
- Parameters
-
name | Fully qualified name of the file to test for |
DataStreamPtr orxonox::Resource::open |
( |
const std::string & |
name | ) |
|
|
static |
Open a single resource by name and return a DataStream pointing at the source of the data.
- Parameters
-
name | The name of the resource to locate. Even if resource locations are added recursively, you must provide a fully qualified name to this method. |
- Returns
- Shared pointer to data stream containing the data. Will be destroyed automatically when no longer referenced.
static DataStreamPtr orxonox::Resource::open |
( |
std::shared_ptr< ResourceInfo > |
fileInfo | ) |
|
|
inlinestatic |
Similar to open(string, string, bool), but with a fileInfo struct.
DataStreamListPtr orxonox::Resource::openMulti |
( |
const std::string & |
pattern | ) |
|
|
static |
Open all resources matching a given pattern (which can contain the character '*' as a wildcard), and return a collection of DataStream objects on them.
- Parameters
-
pattern | The pattern to look for. If resource locations have been added recursively, subdirectories will be searched too so this does not need to be fully qualified. |
- Returns
- Shared pointer to a data stream list , will be destroyed automatically when no longer referenced
The documentation for this class was generated from the following files: