13#if !defined(OCF_OLEFACTO_H)
17#if defined(BI_HAS_PRAGMA_ONCE)
79 return Registrar->CreateAutoObject(obj, info, app,
typeid(*app));
85template <
class T>
void
96template <
class T>
void
113template<
class T,
class Auto> T*
118 app->SetCmdShow(SW_HIDE);
122 Auto::AutomateApp(app, options);
128template<
class T,
class Auto>
131 Auto::UnregisterAutomation(app);
146template <
class T,
class Auto>
TUnknown*
150 return app->CreateOleObject(options, link);
162template <
class T,
class Auto>
TUnknown*
178 void* viewObj =
dynamic_cast<void*
>(view);
179 void* docObj =
dynamic_cast<void*
>(doc);
180 if ((autoObj = Auto::AutomateObject(app, viewObj,
typeid(*view))) != 0 ||
181 (autoObj = Auto::AutomateObject(app, docObj,
typeid(*doc))) != 0) {
271template <
class T,
class Obj> IUnknown*
283 app = Obj::CreateApp(options);
285 Obj::CreateObject(app, options, link);
290 Obj::DestroyApp(app);
299 TUnknown* doc = Obj::CreateObject(app, options, link);
307 IUnknown* ifc = obj ? obj->
SetOuter(outer) : 0;
322:
public TOleFactoryBase<T, TOleFactoryNoDocView<T, TOleFactoryNoAuto<T> > >
330:
public TOleFactoryBase<T, TOleFactoryDocView<T, TOleFactoryNoAuto<T> > >
338:
public TOleFactoryBase<T, TOleFactoryNoDocView<T, TOleFactoryAuto<T> > >
346:
public TOleFactoryBase<T, TOleFactoryDocView<T, TOleFactoryAuto<T> > >
400 app->nCmdShow = SW_HIDE;
408template <
class T>
void
439template <
class T> IUnknown*
448 app = CreateApp(options);
466 if (options &
amRun) {
Definition of class TAppDictionary.
A template class, TAutoFactory<> creates callback code for ObjectWindows classes.
static void DestroyApp(T *app)
Destroys the previously created application referred to in app.
static T * CreateApp(owl::uint32 options)
Called when the app is not found and needs to be created.
static IUnknown * Create(IUnknown *outer, owl::uint32 options, owl::uint32 id)
Create is a TComponentFactory callback function that creates or destroys the application or creates o...
holders for C++ object pointers for automation conversions
Linking & embeding version of the Registrar.
Factory for OWL non-Doc/View, automated OLE components.
Factory for OWL Doc/View, automated OLE components.
Factory for OWL Doc/View, non-automated OLE components.
A template class, TOleFactoryBase<> creates callback code for ObjectWindows classes.
static IUnknown * Create(IUnknown *outer, owl::uint32 options, owl::uint32 id)
A TComponentFactory callback function that creates or destroys the application or creates objects.
Factory for OWL non-Doc/View, non-automated OLE components.
The generic OLE2 window. Use as a client of a frame window.
virtual TOcView * CreateOcView(owl::TRegLink *link, bool isRemote, IUnknown *outer)
Called to perform the actual setting up of the OcView member.
Standard implementation of a controlling IUnknown for an object, to be inherited with other COM inter...
IUnknown * SetOuter(IUnknown *outer=0)
unsigned long AdjustRefCount(int i)
IUnknown & Aggregate(TUnknown &inner)
TApplication * GetApplication(uint pid=0)
Looks up and returns the application associated with a given process ID.
Derived from TModule and TMsgThread and virtually derived from TEventHandler, TApplication acts as an...
TDocManager creates a document manager object that manages the list of current documents and register...
virtual TDocument * CreateDoc(TDocTemplate *tpl, LPCTSTR path, TDocument *parent=nullptr, long flags=0)
CreateDoc creates a document based on the directory path and the specified template.
TDocTemplate is an abstract base class that contains document template functionality.
virtual TView * ConstructView(TDocument &doc)=0
A pure virtual function that must be defined in a derived class, ConstructView creates the view speci...
An abstract base class, TDocument is the base class for all document objects and serves as an interfa...
TView * InitView(TView *view)
called from template InitView
A linked structure in which each node points to a list of TRegList objects (or TRegList-derived objec...
Abstract base class for view access from document.
Definition of class TDocManager.
const uint dtNewDoc
create new document, no path used
const uint dtNoAutoView
no automatic create of default view
Object Component Framework (COM encapsulation)
IUnknown *(* TComponentFactory)(IUnknown *outer, owl::uint32 options, owl::uint32 id)
@ amShutdown
set in factory call to shutdown/delete app
@ amServedApp
per instance flag, app refcnt held by container
@ amExeMode
may be overridden per instance if running DLL
@ amEmbedding
cmdline, overridden per Instance if embedded DLL
@ amRun
set in factory call to run application msg loop
TAppDictionary & OWLGetAppDictionary()
Global exported TAppDictionary in Owl.
ObjectComponents fundamental definitions.
OLE Registration definitions.
owl::TPointer< ocf::TRegistrar > Registrar
Global registrar object defined by the client application.
Low level OLE Utility class definitions.
TOleWindow - Class encapsulating a window which can be an OLE container or server window.
#define TYPESAFE_DOWNCAST(object, toClass)
Various types of smart pointer templatized classes.
Application creation/destruction callouts shared for doc/view and non-d/v.
static T * CreateApp(owl::uint32 options)
static void DestroyApp(T *app)
Automated application default automation callout implementation.
static void AutomateApp(T *app, owl::uint32 options)
Default callout to aggregate an automation helper to an automated app.
static TUnknown * AutomateObject(T *app, const void *obj, const std::type_info &info)
Default callout to aggregate an automation helper to an automated object.
static void UnregisterAutomation(T *app)
Default callout to unregister automation active object.
Docview application callout implementation - supplies CreateObject function.
static TUnknown * CreateObject(T *app, owl::uint32 options, owl::TRegLink *link)
Non-automated application automation callout stub implementation.
static TUnknown * AutomateObject(T *app, const void *obj, const std::type_info &info)
static void UnregisterAutomation(T *app)
static void AutomateApp(T *app, owl::uint32 options)
Non-docview application callout implementation, no CreateObject implemented User must either provide ...
static TUnknown * CreateObject(T *app, owl::uint32 options, owl::TRegLink *link)