SophiaFramework UNIVERSE 5.3 |
BREW 2.0 | BREW 2.1 | BREW 3.1 | BREW 4.0 |
---|---|---|---|
O | O | O | O |
Protected Functions | |
---|---|
static SFBBaseSmp |
FactoryByCreate(
AEECLSID id
, SFCErrorPtr exception = null
) Create the instance for the specified ClassID's interface.
|
static SFBBaseSmp |
FactoryByQuery(
SFBQuerySmpConstRef query
, AEECLSID id
, SFCErrorPtr exception = null
) Create the instance for the specified ClassID's interface using the SFBQuery instance.
|
[ protected, static ] SFBBaseSmp FactoryByCreate( AEECLSID id // Class ID SFCErrorPtr exception = null // Error );
This function creates the C++ wrapper class instance for the interface to be created by the ISHELL_CreateInstance() function.
The following is a example to implement the SFBHash::NewInstance function.
// implement SFBHash::NewInstance() #include <SFBWrapper/SFBHash.h.hpp> /*public static */SFBHashSmp SFBHash::NewInstance(AEECLSID id, SFCErrorPtr exception) { // implement NewInstance() using FactoryByCreate() // downcast by static_pointer_cast macro return static_pointer_cast<SFBHash>(FactoryByCreate(id, exception)); }// SFBHash::NewInstance //
[ protected, static ] SFBBaseSmp FactoryByQuery( SFBQuerySmpConstRef query // SFBQuery instance AEECLSID id // ClassID SFCErrorPtr exception = null // Error );
This function creates the C++ wrapper class instance for the interface to be created by the IQI_QueryInterface() function.
The following is a example to implement the SFBBitmapDev::NewInstance function.
// implement SFBBitmapDev::NewInstance()
#include <SFBWrapper/SFBBitmapDev.h.hpp>
#include <SFBWrapper/SFBBitmap.h.hpp>
/*public static */SFBBitmapDevSmp SFBBitmapDev::NewInstance(SFBBitmapSmpConstRef bitmap, SFCErrorPtr exception)
{
return static_pointer_cast<SFBBitmapDev>(FactoryByQuery(bitmap, AEEIID_BITMAPDEV, exception));
}// SFBBitmapDev::NewInstance //
/*public static */SFBBitmapDevSmp SFBBitmapDev::NewInstance(SFBBitmapSmpConstRef bitmap, AEECLSID id, SFCErrorPtr exception)
{
return static_pointer_cast<SFBBitmapDev>(FactoryByQuery(bitmap, id, exception));
}// SFBBitmapDev::NewInstance //
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |