moab
moab::ComponentFactory Class Reference
Inheritance diagram for moab::ComponentFactory:
moab::UnknownInterface

List of all members.

Public Member Functions

 ComponentFactory ()
virtual ~ComponentFactory ()
virtual int QueryInterface (const MBuuid &, UnknownInterface **)

Static Public Attributes

static std::list
< UnknownInterface * > 
objects_in_use

Detailed Description

Definition at line 69 of file Factory.cpp.


Constructor & Destructor Documentation

Definition at line 72 of file Factory.cpp.

{}
virtual moab::ComponentFactory::~ComponentFactory ( ) [inline, virtual]

Definition at line 73 of file Factory.cpp.

{}

Member Function Documentation

int moab::ComponentFactory::QueryInterface ( const MBuuid uuid,
UnknownInterface **  iface 
) [virtual]

Implements moab::UnknownInterface.

Definition at line 92 of file Factory.cpp.

{
   // this is an unknown interface that was requested
   // if wanted, we could provide a default interface
   // if IDD_MBUnknown is specified
   if(uuid == IDD_MBUnknown)
      return 0;
   // IDD_MBVerde interface was requested
   // create an Verde object and have it return the interface
   // requested
   else if(uuid == IDD_MBCore)
   {
      Core* mdb = new Core;
      // if the object does not contain the interface requested, delete the object
      if(!mdb->QueryInterface(uuid, iface))
      {
         delete mdb;
         return 0;
      }
      return 1;
   }
   else
      return 0;

}

Member Data Documentation

Definition at line 78 of file Factory.cpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines