PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBBase
Wrapper Class for the IBase interface.
#include <SFBBase.h.hpp>
class SFBBase;
SFMTYPEDEFWRAPPER(SFBBase)

Inheritance diagram

 Inheritance diagram of SFBBaseClass

Version

BREW 2.0 BREW 2.1 BREW 3.1 BREW 4.0
O O O O

Reference

BREW API IBase

Member

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.

SFBBase::FactoryByCreate
Create the instance for the specified ClassID's interface.
[ protected, static ]
SFBBaseSmp FactoryByCreate(
    AEECLSID id                    // Class ID
    SFCErrorPtr exception = null   // Error
);

Description

This function creates the C++ wrapper class instance for the interface to be created by the ISHELL_CreateInstance() function.

Example

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 //

Reference

SFBBase::FactoryByQuery


SFBBase::FactoryByQuery
Create the instance for the specified ClassID's interface using the SFBQuery instance.
[ protected, static ]
SFBBaseSmp FactoryByQuery(
    SFBQuerySmpConstRef query      // SFBQuery instance
    AEECLSID id                    // ClassID
    SFCErrorPtr exception = null   // Error
);

Description

This function creates the C++ wrapper class instance for the interface to be created by the IQI_QueryInterface() function.

Example

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 //

Reference

SFBBase::FactoryByCreate