APEX Framework: nvidia::apex::ResourceCallback Class Reference

NVIDIA APEX

nvidia::apex::ResourceCallback Class Reference

User defined callback for resource management. More...

#include <ResourceCallback.h>

List of all members.

Public Member Functions

virtual void * requestResource (const char *nameSpace, const char *name)=0
 Request a resource from the user.
virtual void releaseResource (const char *nameSpace, const char *name, void *resource)=0
 Request the user to release a resource.

Detailed Description

User defined callback for resource management.

The user may implement a subclass of this abstract class and provide an instance to the ApexSDK descriptor. These callbacks can only be triggered directly by ApexSDK API calls, so they do not need to be re-entrant or thread safe.


Member Function Documentation

virtual void nvidia::apex::ResourceCallback::releaseResource ( const char *  nameSpace,
const char *  name,
void *  resource 
) [pure virtual]

Request the user to release a resource.

Will be called by the ApexSDK when all internal references to a named resource have been released. If this named resource is required again in the future, a new call to requestResource() will be made.

virtual void* nvidia::apex::ResourceCallback::requestResource ( const char *  nameSpace,
const char *  name 
) [pure virtual]

Request a resource from the user.

Will be called by the ApexSDK if a named resource is required but has not yet been provided. The resource pointer is returned directly, ResourceProvider::setResource() should not be called. This function will be called at most once per named resource, unless an intermediate call to releaseResource() has been made.

Note:
If this call results in the application calling ApexSDK::createAsset, the name given to the asset must match the input name parameter in this method.

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

Generated on Fri Dec 15 2017 13:58:40

Copyright © 2012-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.