Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
moab::ComponentFactory Class Reference
+ Inheritance diagram for moab::ComponentFactory:
+ Collaboration diagram for moab::ComponentFactory:

Public Member Functions

 ComponentFactory ()
 
virtual ~ComponentFactory ()
 
virtual int QueryInterface (const MBuuid &, UnknownInterface **)
 
- Public Member Functions inherited from moab::UnknownInterface
virtual ~UnknownInterface ()
 

Static Public Attributes

static std::list< UnknownInterface * > objects_in_use
 

Detailed Description

Definition at line 62 of file Factory.cpp.

Constructor & Destructor Documentation

◆ ComponentFactory()

moab::ComponentFactory::ComponentFactory ( )
inline

Definition at line 65 of file Factory.cpp.

65 {}

◆ ~ComponentFactory()

virtual moab::ComponentFactory::~ComponentFactory ( )
inlinevirtual

Definition at line 66 of file Factory.cpp.

66 {}

Member Function Documentation

◆ QueryInterface()

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

Implements moab::UnknownInterface.

Definition at line 83 of file Factory.cpp.

84 {
85  // this is an unknown interface that was requested
86  // if wanted, we could provide a default interface
87  // if IDD_MBUnknown is specified
88  if( uuid == IDD_MBUnknown ) return 0;
89  // IDD_MBVerde interface was requested
90  // create an Verde object and have it return the interface
91  // requested
92  else if( uuid == IDD_MBCore )
93  {
94  Core* mdb = new Core;
95  // if the object does not contain the interface requested, delete the object
96  if( !mdb->QueryInterface( uuid, iface ) )
97  {
98  delete mdb;
99  return 0;
100  }
101  return 1;
102  }
103  else
104  return 0;
105 }

References moab::IDD_MBCore, moab::IDD_MBUnknown, iface, and moab::Core::QueryInterface().

Referenced by moab::GetInterface().

Member Data Documentation

◆ objects_in_use

std::list< UnknownInterface * > moab::ComponentFactory::objects_in_use
static

Definition at line 70 of file Factory.cpp.

Referenced by moab::DeInitialize(), moab::GetInterface(), and moab::ReleaseInterface().


The documentation for this class was generated from the following file: