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

Storage, name and type information for an attribute. More...

#include <openexr_attr.h>

Public Attributes

const char * name
 
const char * type_name
 
uint8_t name_length
 
uint8_t type_name_length
 
uint8_t pad [2]
 
exr_attribute_type_t type
 
union {
   uint8_t   uc
 
   double   d
 
   float   f
 
   int32_t   i
 
   exr_attr_box2i_t *   box2i
 
   exr_attr_box2f_t *   box2f
 
   exr_attr_chlist_t *   chlist
 
   exr_attr_chromaticities_t *   chromaticities
 
   exr_attr_keycode_t *   keycode
 
   exr_attr_float_vector_t *   floatvector
 
   exr_attr_m33f_t *   m33f
 
   exr_attr_m33d_t *   m33d
 
   exr_attr_m44f_t *   m44f
 
   exr_attr_m44d_t *   m44d
 
   exr_attr_preview_t *   preview
 
   exr_attr_rational_t *   rational
 
   exr_attr_string_t *   string
 
   exr_attr_string_vector_t *   stringvector
 
   exr_attr_tiledesc_t *   tiledesc
 
   exr_attr_timecode_t *   timecode
 
   exr_attr_v2i_t *   v2i
 
   exr_attr_v2f_t *   v2f
 
   exr_attr_v2d_t *   v2d
 
   exr_attr_v3i_t *   v3i
 
   exr_attr_v3f_t *   v3f
 
   exr_attr_v3d_t *   v3d
 
   exr_attr_opaquedata_t *   opaque
 
   uint8_t *   rawptr
 
}; 
 

Detailed Description

Storage, name and type information for an attribute.

Attributes (metadata) for the file cause a surprising amount of overhead. It is not uncommon for a production-grade EXR to have many attributes. As such, the attribute struct is designed in a slightly more complicated manner. It is optimized to have the storage for that attribute: the struct itself, the name, the type, and the data all allocated as one block. Further, the type and standard names may use a static string to avoid allocating space for those as necessary with the pointers pointing to static strings (not to be freed). Finally, small values are optimized for.

Definition at line 439 of file openexr_attr.h.

Member Data Documentation

union { ... }

Union of pointers of different types that can be used to type pun to an appropriate type for builtins. Do note that while this looks like a big thing, it is only the size of a single pointer. These are all pointers into some other data block storing the value you want, with the exception of the pod types which are just put in place (i.e. small value optimization).

The attribute type type should directly correlate to one of these entries.

exr_attr_box2f_t* exr_attribute_t::box2f

Definition at line 474 of file openexr_attr.h.

exr_attr_box2i_t* exr_attribute_t::box2i

Definition at line 473 of file openexr_attr.h.

exr_attr_chlist_t* exr_attribute_t::chlist

Definition at line 475 of file openexr_attr.h.

exr_attr_chromaticities_t* exr_attribute_t::chromaticities

Definition at line 476 of file openexr_attr.h.

double exr_attribute_t::d

Definition at line 469 of file openexr_attr.h.

float exr_attribute_t::f

Definition at line 470 of file openexr_attr.h.

exr_attr_float_vector_t* exr_attribute_t::floatvector

Definition at line 478 of file openexr_attr.h.

int32_t exr_attribute_t::i

Definition at line 471 of file openexr_attr.h.

exr_attr_keycode_t* exr_attribute_t::keycode

Definition at line 477 of file openexr_attr.h.

exr_attr_m33d_t* exr_attribute_t::m33d

Definition at line 480 of file openexr_attr.h.

exr_attr_m33f_t* exr_attribute_t::m33f

Definition at line 479 of file openexr_attr.h.

exr_attr_m44d_t* exr_attribute_t::m44d

Definition at line 482 of file openexr_attr.h.

exr_attr_m44f_t* exr_attribute_t::m44f

Definition at line 481 of file openexr_attr.h.

const char* exr_attribute_t::name

Name of the attribute.

Definition at line 442 of file openexr_attr.h.

uint8_t exr_attribute_t::name_length

Length of name string (short flag is 31 max, long allows 255).

Definition at line 446 of file openexr_attr.h.

exr_attr_opaquedata_t* exr_attribute_t::opaque

Definition at line 495 of file openexr_attr.h.

uint8_t exr_attribute_t::pad[2]

Definition at line 450 of file openexr_attr.h.

exr_attr_preview_t* exr_attribute_t::preview

Definition at line 483 of file openexr_attr.h.

exr_attr_rational_t* exr_attribute_t::rational

Definition at line 484 of file openexr_attr.h.

uint8_t* exr_attribute_t::rawptr

Definition at line 496 of file openexr_attr.h.

exr_attr_string_t* exr_attribute_t::string

Definition at line 485 of file openexr_attr.h.

exr_attr_string_vector_t* exr_attribute_t::stringvector

Definition at line 486 of file openexr_attr.h.

exr_attr_tiledesc_t* exr_attribute_t::tiledesc

Definition at line 487 of file openexr_attr.h.

exr_attr_timecode_t* exr_attribute_t::timecode

Definition at line 488 of file openexr_attr.h.

exr_attribute_type_t exr_attribute_t::type

Enum of the attribute type.

Definition at line 453 of file openexr_attr.h.

const char* exr_attribute_t::type_name

String type name of the attribute.

Definition at line 444 of file openexr_attr.h.

uint8_t exr_attribute_t::type_name_length

Length of type string (short flag is 31 max, long allows 255).

Definition at line 448 of file openexr_attr.h.

uint8_t exr_attribute_t::uc

Definition at line 468 of file openexr_attr.h.

exr_attr_v2d_t* exr_attribute_t::v2d

Definition at line 491 of file openexr_attr.h.

exr_attr_v2f_t* exr_attribute_t::v2f

Definition at line 490 of file openexr_attr.h.

exr_attr_v2i_t* exr_attribute_t::v2i

Definition at line 489 of file openexr_attr.h.

exr_attr_v3d_t* exr_attribute_t::v3d

Definition at line 494 of file openexr_attr.h.

exr_attr_v3f_t* exr_attribute_t::v3f

Definition at line 493 of file openexr_attr.h.

exr_attr_v3i_t* exr_attribute_t::v3i

Definition at line 492 of file openexr_attr.h.


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