#include <IAssetAccessor.h>
A callback interface for declaring and modifying an asset reference.
A callback class used in conjunction with IEnumAuxAssetsCallback to declare an asset used by this application component. Accessor methods provide high-level information about the assets, and one mutator method - SetPath, is used at the time of declaration to retarget an asset. Classes implementing this interface need not worry about maintaining a persistent link to this interface. It should only be instantiated within the scope of a call to the client's EnumAuxFiles function. When the asset is declared, at that point the enumerating code may choose to retarget the asset.
Notice that the accessor does not need to survive beyond the scope which contains the call to
Clients must implement GetPath() and SetPath(), and GetAssetType(). The asset type must be one of the types declared as AssetType.
A client wishing to declare a new category of assets can do so by returning kOtherAsset as a type and implementing the GetAssetDesc() and GetAssetTypeIcon() functions.
Finally, other methods exist that allow a client to return varying amounts of information about an asset. See methods below for details.
Public Member Functions | |
virtual MaxSDK::AssetManagement::AssetUser | GetAsset () const =0 |
enum AssetType has been moved to iAsset.h. More... | |
virtual bool | SetAsset (const MaxSDK::AssetManagement::AssetUser &aNewAssetUser)=0 |
Implementing classes should implement this method so that a call to this method causes the component to point to a newly declared asset. More... | |
virtual CoreExport bool | IsInputAsset () const |
Should return whether this is an input asset. More... | |
virtual MaxSDK::AssetManagement::AssetType | GetAssetType () const =0 |
Returns the asset type for this asset declaration. More... | |
virtual CoreExport const MCHAR * | GetAssetDesc () const |
Returns an asset description string, or NULL if this is a standard asset. More... | |
virtual CoreExport const MCHAR * | GetAssetTypeIcon () const |
Returns the full path of an icon file associated with a custom asset description. More... | |
virtual CoreExport const MCHAR * | GetAssetClientDesc () const |
A brief description string of the asset client. More... | |
virtual CoreExport bool | IsAssetPathWritable () const |
Whether it is possible to retarget this client's asset. More... | |
virtual CoreExport const MCHAR * | GetRetargetErrorMsg () const |
Allows a client to return an error message related to a failed SetPath attempt. More... | |
Public Member Functions inherited from InterfaceServer | |
virtual UtilExport | ~InterfaceServer () |
Destructor. More... | |
virtual UtilExport BaseInterface * | GetInterface (Interface_ID id) |
Additional Inherited Members | |
Static Public Member Functions inherited from MaxHeapOperators | |
static UtilExport void * | operator new (size_t size) |
Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More... | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e) |
Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More... | |
static UtilExport void * | operator new (size_t size, const char *filename, int line) |
New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More... | |
static UtilExport void * | operator new (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More... | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e, const char *filename, int line) |
New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More... | |
static UtilExport void * | operator new (size_t size, unsigned long flags) |
New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More... | |
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e, unsigned long flags) |
New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More... | |
static UtilExport void * | operator new[] (size_t size) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More... | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More... | |
static UtilExport void * | operator new[] (size_t size, const char *filename, int line) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More... | |
static UtilExport void * | operator new[] (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate arrays of objects. More... | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More... | |
static UtilExport void * | operator new[] (size_t size, unsigned long flags) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More... | |
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e, unsigned long flags) |
New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More... | |
static UtilExport void | operator delete (void *ptr) |
Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More... | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e) |
Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More... | |
static UtilExport void | operator delete (void *ptr, const char *filename, int line) |
Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More... | |
static UtilExport void | operator delete (void *ptr, int block_type, const char *filename, int line) |
Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More... | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line) |
Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More... | |
static UtilExport void | operator delete (void *ptr, unsigned long flags) |
Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More... | |
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags) |
Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More... | |
static UtilExport void | operator delete[] (void *ptr) |
Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More... | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e) |
Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More... | |
static UtilExport void | operator delete[] (void *ptr, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More... | |
static UtilExport void | operator delete[] (void *ptr, int block_type, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More... | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line) |
Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More... | |
static UtilExport void | operator delete[] (void *ptr, unsigned long flags) |
Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More... | |
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags) |
Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More... | |
static UtilExport void * | operator new (size_t size, void *placement_ptr) |
Placement new operator. More... | |
static UtilExport void | operator delete (void *ptr, void *placement_ptr) |
Placement delete operator. More... | |
|
pure virtual |
enum AssetType has been moved to iAsset.h.
See iAsset.h for the various assets types supported by this accessor. Gets the AssetUser pointing on the asset. Gets the full path of the asset, as declared by the asset.
|
pure virtual |
Implementing classes should implement this method so that a call to this method causes the component to point to a newly declared asset.
Note: If an error occurs while repathing, the client might choose to indicate this by returning an error message via GetRetargetErrorMsg().
[in] | aNewAssetUser | An AssetUser of a new asset to refer to. The path of the AssetUser need not be a fully-qualified path. |
|
virtual |
Should return whether this is an input asset.
This method should return true if the asset in question is used as an input to a render. An example of an asset that is not an input would be a RenderElements output asset.
Default implementation: returns true
|
pure virtual |
Returns the asset type for this asset declaration.
Should return an asset type defined in the AssetType enum above. If the asset does not fall under one of the predefined categories, declare the asset as kOtherAsset.
In this case, the GetAssetDesc() should return an appropriate string defining the category to which this asset belongs.
|
virtual |
Returns an asset description string, or NULL if this is a standard asset.
A component can normally return NULL for this method if the asset declaration falls under one of the pre-defined categories. If an component declares an as kOtherAsset, then it should return an appropriate asset type description (i.e. in the vein of Bitmap, Photometric, etc.) This description will be used to visually group assets together. A third-party developer can therefore define a new asset group type by consistently returning the same description string for their declared assets, and this will be reflected appropriately in the application interface.
Default implementation: returns NULL
|
virtual |
Returns the full path of an icon file associated with a custom asset description.
If the asset type returned by this accessor is kOtherAsset, and the asset description returned by GetAssetDesc() is non-NULL, then this method should be overwritten to return the full path of an icon file (*.ico) that should be used as the icon for this new asset category. Otherwise, the result from this field is ignored.
Default implementation: returns NULL
|
virtual |
A brief description string of the asset client.
A one or two word description of an asset client. This description will be used to briefly describe the source client of this asset.
Default implementation: returns NULL
|
virtual |
Whether it is possible to retarget this client's asset.
There are cases where an asset can be declared, but cannot be retargeted. If this is the case for an implementing client, then false should be returned here.
Default implementation: returns true
|
virtual |
Allows a client to return an error message related to a failed SetPath attempt.
An asset client can report a SetPath error via this method. If an error occurs during the SetPath call, then this method should report the error. A manager which calls SetPath on an IAssetAccessor should call GetRetargetErrorMsg() to determine whether the SetPath succeeded. GetRetargetErrorMsg should return NULL if no error occurs.