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

#include <IClassInfo.h>

Inheritance diagram for IClassInfo:
IControllingUnknownIPMUnknown

Public Member Functions

virtual int32 CountInterfaces () const =0
 
virtual PMIID GetInterface (int32 index) const =0
 
virtual ImplementationID GetImplementation (PMIID whichInterface) const =0
 
virtual ImplementationID GetImplementationByIndex (int32 interfaceIndex) const =0
 
virtual PMIID GetIID (ImplementationID whichInterface) const =0
 
virtual ClassID GetClass () const =0
 
virtual ClassID GetParentClass () const =0
 
virtual PluginID GetOwnerComponent (PMIID forWhat=IID_IUNKNOWN) const =0
 
virtual IPMUnknownCreateInterface (InterfaceInfo const *interfaceInfo, IControllingUnknown *boss) const =0
 
virtual void DestructInterface (int32 index, IPMUnknown *obj) const =0
 
virtual int32 GetIndex (PMIID interfaceID) const =0
 
virtual void Init (ClassID clsID)=0
 
virtual void SetParentClass (ClassID parentClass)=0
 
virtual void SetOwnerComponent (PluginID owner)=0
 
virtual void AddInterface (PMIID interfaceID, ImplementationID faceID, PluginID owner, bool16 asAddin=kFalse)=0
 
virtual std::pair
< InterfaceInfo const *, int32 > 
FindInterfaceInfo (PMIID interfaceID) const =0
 
virtual void FinalizeClassInfo ()=0
 
virtual void Unregister (PluginID owner)=0
 
virtual IPMUnknownConstructBoss () const =0
 
- Public Member Functions inherited from IControllingUnknown
virtual ImplementationID GetImplementationID (IPMUnknown *p) const =0
 
virtual PMIID GetInterfaceID (IPMUnknown *p) const =0
 
virtual uint32 GetRefCount () const =0
 
virtual IPMUnknownGetInterfacePtr (PMIID interfaceID) const =0
 
virtual IPMUnknownGetInterfacePtr (ImplementationID implID) const =0
 
virtual const IPMPersistGetPersist () const =0
 
virtual void SwitchExecutionContext ()=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Additional Inherited Members

- Public Types inherited from IControllingUnknown
enum  { kDefaultIID = IID_ICONTROLLINGUNKNOWN }
 

Detailed Description

IClassInfo represents meta-class information for a boss class, allowing callers to iterate through interfaces and implementations of a boss class. You can get an IClassInfo interface for a particular boss class from IObjectModel. It provides generic information about all boss objects of a given class: what interfaces they support, what implementations they use, etc.

See Also
IObjectModel

Member Function Documentation

virtual int32 IClassInfo::CountInterfaces () const
pure virtual
Return the total number of interfaces supported by the class.

Returns
number of interfaces supported by the class.
virtual void IClassInfo::FinalizeClassInfo ()
pure virtual

Forces the Class Info to finalize. Used internally during the first startup. Should not be called by regular code.

virtual std::pair<InterfaceInfo const*, int32> IClassInfo::FindInterfaceInfo (PMIID interfaceID) const
pure virtual

Looks up the InterfaceInfo asociated with the specified PMIID. Returns a pair of the InterfaceInfo pointer and interface index. The pair is useful when the caller needs to know the index of this PMIID as well (it avoids and extra lookup). If the class info doesn't support this interface returns a pair of (nil, -1).

virtual ClassID IClassInfo::GetClass () const
pure virtual
Return the ID of the class that this classinfo represents.

Returns
the ClassID of the class

Implements IControllingUnknown.

virtual PMIID IClassInfo::GetIID (ImplementationID whichInterface) const
pure virtual
Given the implementationID, find the corresponding IID.

Parameters
whichInterfacethe ImplementationID of the interface we want to find out about
Returns
the IID (InterfaceID) of the interface, or IID_IUNKNOWN
virtual ImplementationID IClassInfo::GetImplementation (PMIID whichInterface) const
pure virtual
Given the interfaceID (IID), find the corresponding ImplementationID

Parameters
whichInterfacethe IID of the interface within the boss
Returns
the ImplementationID used to implement the interface, or kInvalidImpl
virtual ImplementationID IClassInfo::GetImplementationByIndex (int32 interfaceIndex) const
pure virtual
Given the index of an interfaceID (IID), find the corresponding ImplementationID

Parameters
interfaceIndexthe index of the interface within the boss(probably from calling GetIndex previously)
Returns
the ImplementationID used to implement the interface, or kInvalidImpl
virtual PMIID IClassInfo::GetInterface (int32 index) const
pure virtual
Return the n'th supported interface. Used together with

CountInterfaces, this allows callers to iterate over the interfaces.

Parameters
indexthe index of the interface within the boss
Returns
n'th supported interface.
virtual PluginID IClassInfo::GetOwnerComponent (PMIID forWhat = IID_IUNKNOWN) const
pure virtual
Return the ID of the plug-in that registered the class.

Parameters
forWhatthe interface we want to find out about (or nothing to find out the owner of the class)
Returns
the PluginID of the plug-in that added the interface into the boss (or supplied the boss itself, if IID_IUNKNOWN)
virtual ClassID IClassInfo::GetParentClass () const
pure virtual
Return the parent (base) class that this class is derived from, 

or kInvalidClass if there is no parent.

Returns
the ClassID of the parent (base) class