Wrappers
 
 
 

The objects which make up the API (C++ classes) are wrappers on internal Alias data, whether read in from a file, or created while running the interactive package. These wrappers can be thought of as a means to indirectly access the data. Access to the data is done through methods contained in the wrapper classes. This provides a clean and consistent view of the data and hides its internal representation.

Wrappers are only allocated when necessary. This means that developers using the API are responsible for deleting wrappers when they are no longer needed.

New versus Reused Wrappers

All methods which return a pointer to an object return a new wrapper, except for the casting methods (that is, AlObject::asLightNodePtr()). Methods are provided to reuse wrappers when sets of data are processed as a group. These include any method whose name ends in “D” (that is, AlSurface::nextShaderD()), and any iterator (that is, AlIterator).