HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
exr_attr_opaquedata_t Struct Reference

#include <openexr_attr.h>

Public Attributes

int32_t size
 
int32_t unpacked_size
 
int32_t packed_alloc_size
 
uint8_t pad [4]
 
voidpacked_data
 
voidunpacked_data
 
exr_result_t(* unpack_func_ptr )(exr_context_t ctxt, const void *data, int32_t attrsize, int32_t *outsize, void **outbuffer)
 
exr_result_t(* pack_func_ptr )(exr_context_t ctxt, const void *data, int32_t datasize, int32_t *outsize, void *outbuffer)
 
void(* destroy_unpacked_func_ptr )(exr_context_t ctxt, void *data, int32_t attrsize)
 

Detailed Description

Custom storage structure for opaque data.

Handlers for opaque types can be registered, then when a non-builtin type is encountered with a registered handler, the function pointers to unpack/pack it will be set up.

See Also
exr_register_attr_type_handler

Definition at line 377 of file openexr_attr.h.

Member Data Documentation

void(* exr_attr_opaquedata_t::destroy_unpacked_func_ptr)(exr_context_t ctxt, void *data, int32_t attrsize)

Definition at line 410 of file openexr_attr.h.

exr_result_t(* exr_attr_opaquedata_t::pack_func_ptr)(exr_context_t ctxt, const void *data, int32_t datasize, int32_t *outsize, void *outbuffer)

Definition at line 404 of file openexr_attr.h.

int32_t exr_attr_opaquedata_t::packed_alloc_size

If this is non-zero, the struct owns the data, if 0, is a const ref.

Definition at line 382 of file openexr_attr.h.

void* exr_attr_opaquedata_t::packed_data

Definition at line 385 of file openexr_attr.h.

uint8_t exr_attr_opaquedata_t::pad[4]

Definition at line 383 of file openexr_attr.h.

int32_t exr_attr_opaquedata_t::size

Definition at line 379 of file openexr_attr.h.

exr_result_t(* exr_attr_opaquedata_t::unpack_func_ptr)(exr_context_t ctxt, const void *data, int32_t attrsize, int32_t *outsize, void **outbuffer)

An application can register an attribute handler which then fills in these function pointers. This allows a user to delay the expansion of the custom type until access is desired, and similarly, to delay the packing of the data until write time.

Definition at line 398 of file openexr_attr.h.

void* exr_attr_opaquedata_t::unpacked_data

When an application wants to have custom data, they can store an unpacked form here which will be requested to be destroyed upon destruction of the attribute.

Definition at line 391 of file openexr_attr.h.

int32_t exr_attr_opaquedata_t::unpacked_size

Definition at line 380 of file openexr_attr.h.


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