Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

hyp.std.factorydata.h

00001 /*
00002 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
00003  Hyperion Pattern.
00004  Hyperion Pattern is a part of the Hyperion Project.
00005 ----------------------------------------------------------
00006  Copyright (c) 2001 Pierre Rebours.
00007 
00008  This library is free software; you can redistribute it and/or
00009  modify it under the terms of the GNU Lesser General Public
00010  License as published by the Free Software Foundation; either
00011  version 2.1 of the License, or (at your option) any later version.
00012 
00013  This library is distributed in the hope that it will be useful,
00014  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016  
00017  See hyp.license.txt file for more information about the license.
00018  
00019  Web: http://lagrandeporte.multimania.com/hyperion
00020  Email: pierre_rebours@yahoo.com
00021 ----------------------------------------------------------
00022  CVS
00023  $Log$
00024 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
00025 */
00026 
00027 
00028 #ifndef _hypstd_factorydata_h_
00029 #define _hypstd_factorydata_h_
00030 
00031 
00032 #ifndef hyp_KERNEL_STD_INSIDE
00033 #error Inclusion not allowed (include hyp.kernel.std.h instead)
00034 #endif
00035 
00041 class CFactoryData
00042 {
00043 public:
00047         typedef com_result (*PTR_CREATEINSTANCE)(IUnknown*,CUnknown**);
00048         
00049 
00050         CFactoryData(const hypCLSID* pCLSID,
00051                                  PTR_CREATEINSTANCE CreateInstance,
00052                                  const std::string& ComponentName) :
00053         m_pCLSID(pCLSID),
00054         CreateInstance(CreateInstance),
00055         m_ComponentName(ComponentName) {
00056         }
00057 
00058         CFactoryData(const CFactoryData& aFactoryData)
00059         {
00060                 m_pCLSID=aFactoryData.m_pCLSID;
00061                 CreateInstance=aFactoryData.CreateInstance;
00062                 m_ComponentName=aFactoryData.m_ComponentName;
00063         }
00064 
00065         ~CFactoryData() { }
00066         
00070         bool IsClassID(const hypCLSID& clsid) const
00071         { return clsid==(*m_pCLSID); }
00072 
00074         const hypCLSID* m_pCLSID;
00075 
00077         PTR_CREATEINSTANCE CreateInstance;
00078         
00080         std::string m_ComponentName;
00081 };
00082 
00083 
00084 #endif

Top of Page
written by Pierre Rebours © 2000-2001. Terms of Use.