InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IObjectModel Class Referenceabstract

#include <IObjectModel.h>

Inheritance diagram for IObjectModel:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IOBJECTMODEL }
 

Public Member Functions

virtual IPMUnknownConstructObject (ClassID theClass, PMIID iid) const =0
 
virtual ReadWriteObject QueryReadWrite (ImplementationID faceID) const =0
 
virtual void ReleaseReadWrite (const ReadWriteObject &releaseThis) const =0
 
virtual ReadWriteObject QueryInterfaceSnapshotReadWrite (ImplementationID faceID) const =0
 
virtual InterfaceResetViewFun QueryInterfaceResetViewFun (ImplementationID prop) const =0
 
virtual void ReleaseInterfaceResetViewFun (ImplementationID prop) const =0
 
Iterate the registered classes
virtual uint32 CountClasses () const =0
 
virtual ClassID GetClassID (uint32 indexCount) const =0
 
virtual IClassInfoQueryClassInfo (ClassID theClass) const =0
 
virtual IObjectModelIteratorNewObjectModelIterator (PMIID iid) const =0
 
Get the name of an ID
virtual const char * GetIDName (int32 idSpace, int32 id) const =0
 
virtual const char * GetIDName (ClassID id) const =0
 
virtual const char * GetIDName (PMIID id) const =0
 
virtual const char * GetIDName (ImplementationID id) const =0
 
virtual const char * GetIDName (PluginID id) const =0
 
virtual const char * GetIDName (ServiceID id) const =0
 
virtual const char * GetIDName (WidgetID id) const =0
 
virtual const char * GetIDName (ActionID id) const =0
 
For Internal Use Only
virtual void RegisterID (PluginID ownerComponent, int32 IDSpaceID, const char *name, int32 id)=0
 
virtual void AddClassFactory (PluginID ownerComponent, ClassID id, BossConstructor construct)=0
 
virtual void RegisterInterfaceFactory (PluginID ownerComponent, ImplementationID faceID)=0
 
virtual void FillOutInterfaceFactory (PluginID ownerComponent, ImplementationID faceID, InterfaceConstructor construct, InterfaceDestructor destroyer, InterfaceSizeOf sizeofFunc, InterfaceReadWrite readWriter, InterfaceReadWrite snapshotReadWriter, InterfaceResetViewFun resetViewFun)=0
 
virtual void AddImplementationAlias (PluginID ownerComponent, ImplementationID implID, ImplementationID basedOn)=0
 
virtual ITagRegistryGetTagRegistry ()=0
 
virtual PluginID GetOwner (ImplementationID implID) const =0
 
virtual PluginID GetOwnerAlias (ImplementationID implID) const =0
 
virtual IInterfaceRegistry * GetInterfaceRegistry () const =0
 
virtual BossConstructor GetClassConstructor (const ClassID theClass) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

This is an interface to the object model (kObjectModelBoss), which is responsible for managing boss classes, implementation factories, supplied by plug-ins and the application.

See Also
kObjectModelBoss

Member Function Documentation

virtual IPMUnknown* IObjectModel::ConstructObject (ClassID theClass,
PMIID iid 
) const
pure virtual
Creates a new instance of the boss class and returns it. This is usually called from the helper function, CreateObject.

Parameters
theClassThe boss class we want to create an instance of
iidThe interface of the instance to return
Returns
A pointer to the new object, or nil if it could not be created, or if the interface isn't supported.
virtual uint32 IObjectModel::CountClasses () const
pure virtual
Return the number of registered classes. See GetClassID()

Returns
The number of boss installed classes in the system.
virtual ClassID IObjectModel::GetClassID (uint32 indexCount) const
pure virtual
Return the ClassID of the n'th class. See CountClasses()

Returns
The ClassID of the n'th class.
virtual const char* IObjectModel::GetIDName (int32 idSpace,
int32 id 
) const
pure virtual
Get the name of an ID, given an ID-space and unique hex value

Parameters
idSpaceThe ID-space of id : kClassIDSpace, kServiceIDSpace, etc.
idThe ID we want to get the name of
Returns
A C++ nul-terminated char* containing the name of the ID
virtual const char* IObjectModel::GetIDName (ClassID id) const
pure virtual
Get the name of a ClassID

Parameters
idThe ClassID we want to get the name of
Returns
A C++ nul-terminated char* containing the name of the ID
virtual const char* IObjectModel::GetIDName (PMIID id) const
pure virtual
Get the name of a PMIID

Parameters
idThe PMIID we want to get the name of
Returns
A C++ nul-terminated char* containing the name of the ID
virtual const char* IObjectModel::GetIDName (ImplementationID id) const
pure virtual
Get the name of an ImplementationID

Parameters
idThe ImplementationID we want to get the name of
Returns
A C++ nul-terminated char* containing the name of the ID
virtual const char* IObjectModel::GetIDName (PluginID id) const
pure virtual
Get the name of a PluginID

Parameters
idThe PluginID we want to get the name of
Returns
A C++ nul-terminated char* containing the name of the ID
virtual const char* IObjectModel::GetIDName (ServiceID id) const
pure virtual
Get the name of a ServiceID

Parameters
idThe ServiceID we want to get the name of
Returns
A C++ nul-terminated char* containing the name of the ID
virtual const char* IObjectModel::GetIDName (WidgetID id) const
pure virtual
Get the name of a WidgetID

Parameters
idThe WidgetID we want to get the name of
Returns
A C++ nul-terminated char* containing the name of the ID
virtual const char* IObjectModel::GetIDName (ActionID id) const
pure virtual
Get the name of a ActionID

Parameters
idThe ActionID we want to get the name of
Returns
A C++ nul-terminated char* containing the name of the ID
virtual IObjectModelIterator* IObjectModel::NewObjectModelIterator (PMIID iid) const
pure virtual
Returns an iterator for all the classes registered as supporting the "iid" interface.

Parameters
iidThe interface we want a list of classes for
Returns
An iterator that will iterate over all the classes that implement the iid.
virtual IClassInfo* IObjectModel::QueryClassInfo (ClassID theClass) const
pure virtual
Return the meta-info for the requested class. The caller must Release when done with it.

Parameters
theClassThe class we want to find out about
Returns
The class's meta-data.
virtual ReadWriteObject IObjectModel::QueryReadWrite (ImplementationID faceID) const
pure virtual
Return the implementation's ReadWrite function. The ref-count of the plug-in is

incremented in the QueryReadWrite, and decremented by ReleaseReadWrite(); so calls to QueryReadWrite MUST be matched with corresponding calls to ReleaseReadWrite unless the ReadWrite function returned is nil. If there is a ReadWrite function registered for the implementation, but the plug-in is not loaded, QueryReadWrite will load the plug-in and then return function.

Parameters
faceIDThe implementation we want the ReadWrite function for
Returns
The ReadWrite function associated with the implementation, if there is one, nil otherwise.
virtual void IObjectModel::ReleaseReadWrite (const ReadWriteObjectreleaseThis) const
pure virtual
Release the ReadWriteObject that was returned by a previous call to QueryReadWrite().

Parameters
releaseThisThe ReadWriteObject to be released.