- fiveloavesbin.zip
- FiveLoavesBin
- 5loavessrc.zip
- FiveLoavesSrc
- 5Loaves.dsw
- 5Loaves.opt
- Library
- Build
- makefile.linux
- makefile.sun
- XMLFoundationLib.dsp
- XMLFoundationLib.plg
- inc
- src
- README.TXT
- Servers
- 5Loaves
- VNCAPI
- Tools
- FileXfer
- vnc_winsrc
|
// --------------------------------------------------------------------------
// www.UnitedBusinessTechnologies.com
// Copyright (c) 1998 - 2002 All Rights Reserved.
//
// Source in this file is released to the public under the following license:
// --------------------------------------------------------------------------
// This toolkit may be used free of charge for any purpose including corporate
// and academic use. For profit, and Non-Profit uses are permitted.
//
// This source code and any work derived from this source code must retain
// this copyright at the top of each source file.
//
// UBT welcomes any suggestions, improvements or new platform ports.
// email to: XMLFoundation@UnitedBusinessTechnologies.com
// --------------------------------------------------------------------------
// (Business Object Link)Relation
#ifdef _SDK_COM_ATL_
#define IMP_BOL_RELATION(iFaceImpl, BOLBusObj) \
\
iFaceImpl::BOLSmartPointer::~BOLSmartPointer() \
{ \
m_pBOLBusinessObject->Release(); \
} \
\
RegisterInterface iFaceImpl##Unique( \
iFaceImpl::FactoryCreate, \
BOLBusObj::FactoryCreate, \
#iFaceImpl, \
#BOLBusObj); \
\
CComObject<iFaceImpl>* iFaceImpl::getCOMObject(BOLBusObj *pBusObj) \
{ \
if (pBusObj) \
{ \
return (CComObject<iFaceImpl>*) \
pBusObj->getInterfaceImplementation(); \
} \
return 0; \
} \
\
void* iFaceImpl::FactoryCreate( void *pTheBOLObject ) \
{ \
CComObject<iFaceImpl>* pImpl = NULL; \
CComObject<iFaceImpl>::CreateInstance(&pImpl); \
BOLBusObj *pBOL = ((BOLBusObj *)pTheBOLObject); \
pImpl->setBOLBusinessObject( pBOL ); \
pBOL->AddRef(); \
return (void *)pImpl; \
}
#elif defined _SDK_CORBA_
#define IMP_BOL_RELATION(iFaceImpl, BOLBusObj) \
\
iFaceImpl::BOLSmartPointer::~BOLSmartPointer() \
{ \
m_pBOLBusinessObject->Release(); \
} \
\
RegisterInterface iFaceImpl##Unique( \
iFaceImpl::FactoryCreate, \
BOLBusObj::FactoryCreate, \
#iFaceImpl, \
#BOLBusObj); \
\
iFaceImpl* iFaceImpl::getCORBAObject(BOLBusObj *pBusObj) \
{ \
if (pBusObj) \
{ \
return (iFaceImpl*)pBusObj->getInterfaceImplementation(); \
} \
return 0; \
} \
\
void* iFaceImpl::FactoryCreate( void *pTheBOLObject ) \
{ \
iFaceImpl *pImpl = new iFaceImpl(); \
BOLBusObj *pBOL = ((BOLBusObj *)pTheBOLObject); \
pImpl->setBOLBusinessObject( pBOL ); \
pBOL->AddRef(); \
return (void *)pImpl; \
} \
#endif
#ifdef _SDK_CORBA_
//
// If you get a compile error "missing ; before *" in VC++ you probably
// need to forward declare the BOL type in your COM/CORBA header file.
//
#define DEF_BOL_RELATION(iFaceImpl, BOLBusObj) \
struct BOLSmartPointer \
{ \
BOLBusObj *m_pBOLBusinessObject; \
BOLSmartPointer::~BOLSmartPointer(); \
} m_SmartPtrInstance; \
public: \
void setBOLBusinessObject(BOLBusObj *pTheBOLObject) \
{ \
m_SmartPtrInstance.m_pBOLBusinessObject = pTheBOLObject; \
} \
BOLBusObj *getBusObj() \
{ \
return m_SmartPtrInstance.m_pBOLBusinessObject; \
} \
\
static iFaceImpl* getCORBAObject(BOLBusObj *pBusObj); \
static void* FactoryCreate( void *pTheBOLObject ); \
#elif defined _SDK_COM_ATL_
//
// If you get a compile error "missing ; before *" in VC++ you probably
// need to forward declare the BOL type in your COM/CORBA header file.
//
#define DEF_BOL_RELATION(iFaceImpl, BOLBusObj) \
struct BOLSmartPointer \
{ \
BOLBusObj *m_pBOLBusinessObject; \
BOLSmartPointer::~BOLSmartPointer(); \
} m_SmartPtrInstance; \
public: \
void setBOLBusinessObject(BOLBusObj *pTheBOLObject) \
{ \
m_SmartPtrInstance.m_pBOLBusinessObject = pTheBOLObject; \
} \
BOLBusObj *getBusObj() \
{ \
return m_SmartPtrInstance.m_pBOLBusinessObject; \
} \
static CComObject<iFaceImpl>* getCOMObject(BOLBusObj *pBusObj); \
static void* FactoryCreate( void *pTheBOLObject ); \
#else
#define DEF_BOL_RELATION(a,b) Define_SDK_CORBA_or_SDK_COM_ATL_
#endif
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here