DeeFileResourceManager

DeeFileResourceManager — A resource manager backed by memory mapped files

Functions

Properties

gchar * primary-path Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── DeeFileResourceManager

Implemented Interfaces

DeeFileResourceManager implements DeeResourceManager.

Description

This is an implementation of the DeeResourceManager interface. It uses atomic operations to write resources to files and memory maps the resource files when you load them.

Unless you have very specific circumstances you should normally not create resource managers yourself, but get the default one for your platform by calling dee_resource_manager_get_default().

Functions

dee_file_resource_manager_add_search_path ()

void
dee_file_resource_manager_add_search_path
                               (DeeResourceManager *self,
                                const gchar *path);

Add a path to the set of paths searched for resources. The manager will first search the primary path as specified in the constructor and then search paths in the order they where added.

Parameters

self

The resource manager to add a search path to.

[type DeeFileResourceManager]

path

The path to add to the set of searched paths

 

dee_file_resource_manager_get_primary_path ()

const gchar *
dee_file_resource_manager_get_primary_path
                               (DeeResourceManager *self);

Helper method to access the :primary-path property.

Parameters

self

The resource manager to inspect.

[type DeeFileResourceManager]

Returns

The value of the :primary-path property


dee_file_resource_manager_new ()

DeeResourceManager *
dee_file_resource_manager_new (const gchar *primary_path);

Create a new DeeFileResourceManager with its primary store- and load path set to primary_path .

You can manually add fallback search paths by calling dee_file_resource_manager_add_search_path().

You normally don't need to create you own resource managers. Instead you should call dee_resource_manager_get_default().

Parameters

primary_path

The primary path used to store and load resources. If you pass NULL the manager will use a default path.

 

Returns

A newly allocated DeeFileResourceManager. Free with g_object_unref().

[transfer full][type DeeFileResourceManager]

Types and Values

struct DeeFileResourceManager

struct DeeFileResourceManager;

struct DeeFileResourceManagerClass

struct DeeFileResourceManagerClass {
  GObjectClass  parent_class;
};

Property Details

The “primary-path” property

  “primary-path”             gchar *

Property holding the primary path used to store and load resources

Flags: Read / Write / Construct Only

Default value: NULL