//---------------------------------------------------------------------------- // // Copyright (C) 2003 Intel Corporation // // File: CimClassFactory.h // // Contents: Factory functions for creating typed CIM objects, definitions. // //---------------------------------------------------------------------------- #ifndef CIMCLASSFACTORY_H #define CIMCLASSFACTORY_H 1 #include #include "CimTypedDllExport.h" #include "CimWsman.h" namespace Intel { namespace Manageability { namespace Cim { namespace Typed { using std::map; using std::pair; using std::string; using Intel::WSManagement::ICimWsmanClient; using Intel::Manageability::Cim::Untyped::CimObject; class CimBase; // factory class class CIMFRAMEWORK_API CimClassFactory { private: // map entry // key is string name of class // data is pointer to function returning CimBase* and accepting CimObject typedef CimBase * (*CreateFuncPtr) (const CimObject &object); typedef pair map_entry; typedef map FactoryMap; static FactoryMap _cimMap; public: CimClassFactory(); // Factory functions. The implementations are autogenerated in CimClassFactory.cpp static CimBase* CreateCimClass(ICimWsmanClient *client, const string& xml); static CimBase* CreateCimClass(const CimObject &object); static CimBase* CreateCimClass(const CimObject &object, const string &className, const string &baseClassName); }; }; }; }; }; #endif // CIMCLASSFACTORY_H