Inheritance diagram for Factory:
Public Methods | |
Factory (const char *classID) | |
oa::oaUInt4 | createInstance (IBase *reserved, const Guid &interfaceID, void **ptr) |
~Factory () |
createInstance()
function of the IFactory
interface. This template class is intended to be used as the factory for most implementations of OpenAccess plug-ins. The template parameter T
is the implementation class that this factory is responsible for creating. The constructor value classID
is the name of the plug-in. For example, a plug-in called "SamplePlug" may have an implementation class as follows:
class SamplePlug : public PlugInBase{ public: SamplePlug(); ~SamplePlug(); // ISampleInterface functions: . . . private: static Factory factory; . . . }
with a line in the .cpp file as follows:
FactorySamplePlug::factory("SamplePlug");
Note that the class name and the Plug-in name do not have to be the same as they do in this example.
|
This is the constructor for the
|
|
|
|
This function creates an instance of the T class and sets the ptr argument to the interface specified by the interfaceID argument. Note that the factory increments the reference count of the object prior to returning from this call.
Implements IFactory. |
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.