RiMaterialSamplePointer

Smart pointer to make garbage collection easier.

All class functions are defined inline.


[ Materials | Source | Search | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

DESCRIPTION

Class Summary

class RiMaterialSamplePointer
{
public:
// Constructors and assignment
RiMaterialSamplePointer(RiMaterialSample *sample) ;
RiMaterialSamplePointer(RiMaterialSamplePointer &rhs) ;
~RiMaterialSamplePointer() ;
// Accessors
RiMaterialSample *operator->() const ;
protected:
}; // RiMaterialSamplePointer


DESCRIPTION

The responsibility for deleting the RiMaterialSample falls to the Shader, a routine with many early exit points. This class encapsulates that responsibility, acting just like a pointer, but deleting the RiMaterialSample when it's destructor is called. The user need not worry about memory leaks. This class transfers ownership when copied (using the copy constructor). This means that after passing by value, the original will contain NULL.


RiMaterialSamplePointer(RiMaterialSample *sample) ;

Default Constructor

    RiMaterialSamplePointer(RiMaterialSample *sample)                 
;

Function is currently defined inline.


RiMaterialSamplePointer(RiMaterialSamplePointer &rhs) ;

Copy Constructor (transfers ownership to the copy)

    RiMaterialSamplePointer(RiMaterialSamplePointer &rhs)                                    
;

Function is currently defined inline.


~RiMaterialSamplePointer() ;

Destructor

    ~RiMaterialSamplePointer()               
;

Function is currently defined inline.


RiMaterialSample *operator->() const ;

    RiMaterialSample *operator->() const                                     
;

Function is currently defined inline.


All Members

public:
// Accessors
RiMaterialSample *operator->() const ;
protected:

Ancestors

Class does not inherit from any other class.


Descendants

Class is not inherited by any others.


Generated from source by the Cocoon utilities on Fri Feb 25 15:15:30 2000 .