Ocean
Ocean::Platform::Apple::Resource Class Reference

This class implements functions allowing to operate with resource data. More...

Public Types

typedef std::vector< uint8_t > Buffer
 Definition of a vector holding 8 bit values. More...
 

Static Public Member Functions

static bool extractResource (const std::wstring &bundle, const std::wstring &name, const std::wstring &type, Buffer &buffer)
 Extracts specific resource information specified by the name and type of the resource. More...
 
static std::wstring resourcePath (const std::wstring &name, const std::wstring &type, const std::wstring &bundle=std::wstring())
 Determines the path of a specified resource file. More...
 
static std::vector< std::wstring > resourcePaths (const std::wstring &type, const std::wstring &directory=std::wstring(), const std::wstring &bundle=std::wstring())
 Determines the paths of all resource files with specified type. More...
 

Detailed Description

This class implements functions allowing to operate with resource data.

Member Typedef Documentation

◆ Buffer

typedef std::vector<uint8_t> Ocean::Platform::Apple::Resource::Buffer

Definition of a vector holding 8 bit values.

Member Function Documentation

◆ extractResource()

static bool Ocean::Platform::Apple::Resource::extractResource ( const std::wstring &  bundle,
const std::wstring &  name,
const std::wstring &  type,
Buffer buffer 
)
static

Extracts specific resource information specified by the name and type of the resource.

Parameters
bundleThe name of the bundle from which the resource will be extracted, an empty string to use the main bundle
nameThe name of the resource
typeThe type of the resource
bufferThe resulting resource information
Returns
True, if succeeded

◆ resourcePath()

static std::wstring Ocean::Platform::Apple::Resource::resourcePath ( const std::wstring &  name,
const std::wstring &  type,
const std::wstring &  bundle = std::wstring() 
)
static

Determines the path of a specified resource file.

Parameters
nameThe name of the resource
typeThe type of the resource
bundleThe name of the bundle from which the resource will be extracted, an empty string to use the main bundle
Returns
The path of the resource file within the bundle

◆ resourcePaths()

static std::vector<std::wstring> Ocean::Platform::Apple::Resource::resourcePaths ( const std::wstring &  type,
const std::wstring &  directory = std::wstring(),
const std::wstring &  bundle = std::wstring() 
)
static

Determines the paths of all resource files with specified type.

Parameters
typeThe type of the resource
directoryOptional directory in which the resource files are located
bundleThe name of the bundle from which the resource will be extracted, an empty string to use the main bundle
Returns
The path of the resource file within the bundle

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