class Model_Ptr<model>


The templated class Model_Ptr<model> is used to handle pointers to classes inheriting the class Model. Its purpose is similar to the standard library's std::auto_ptr<model>. However, there are two main differences. First, rather than maintaining a record of ownership, the class clones the Model anytime the class is copied. Second, additional functionality is provided to enable the programmer to retrieve an instance of any class that inherits the class model. For example, the following statement is used to query the user for a specific instance of the class BRDF_Model:

Model_Ptr<BRDF_Model> brdf_model = Get_Model_Ptr();

The following statement also will create an instance of the class:

Model_Ptr<BRDF_Model> brdf_model = "Microroughness_BRDF_Model";

Further documentation for Model_Ptr<model> can be found in the header file inherit.h.

Include file:

#include "inherit.h"

See also:

SCATMECH HomeModelInheritance 


For More Information

SCATMECH Technical Information and Questions
Optical Technology Division (OTD) Home Page
OTD Technical Inquiries
OTD Website Comments

Current SCATMECH version: 6.00 (February 2008)
This page first online: Version 4.00 (July 2003)
This page last modified: Version 6.00 (February 2008)