HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_AgentFileCache< T > Class Template Reference

#include <GU_AgentFileCache.h>

Public Member Functions

template<typename F >
UT_IntrusivePtr< TfindCachedFileOrLoad (const UT_StringRef &filename, const UT_StringRef &key, F load_new_item)
 
void removeCachedFile (const UT_StringRef &key)
 Removes a cached file with the given key. More...
 

Detailed Description

template<typename T>
class GU_AgentFileCache< T >

Definition at line 22 of file GU_AgentFileCache.h.

Member Function Documentation

template<typename T >
template<typename F >
UT_IntrusivePtr< T > GU_AgentFileCache< T >::findCachedFileOrLoad ( const UT_StringRef filename,
const UT_StringRef key,
load_new_item 
)
inline

Searches for a cached file with the same key, and returns it if the timestamp matches the file on disk. Otherwise, the callback is invoked to load the file, which is then inserted into the cache and returned. The key should include the filename and any dependencies on other agent files (e.g. when loading the same clip for slightly different rigs).

Definition at line 85 of file GU_AgentFileCache.h.

template<typename T >
void GU_AgentFileCache< T >::removeCachedFile ( const UT_StringRef key)
inline

Removes a cached file with the given key.

Definition at line 133 of file GU_AgentFileCache.h.


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