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

#include <ITextAttrMissingImplData.h>

Inheritance diagram for ITextAttrMissingImplData:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ITEXTATTRMISSINGIMPLDATA }
 
enum  MissingAttributeType { kTreatAsDefault = 0, kTreatAsBlackBox = 1 }
 

Public Member Functions

virtual void Set (const ClassID &classId, MissingAttributeType missingType, int16 dataLength, uchar *adoptDataBuffer)=0
 
virtual void Set (const ClassID &classId, MissingAttributeType treatAsBlackBox, IPMUnknown *adoptAttr)=0
 
virtual ClassID GetClassID () const =0
 
virtual int16 GetDataLength () const =0
 
virtual const uchar * GetDataBuffer () const =0
 
virtual IPMUnknownQueryEmbeddedAttribute (PMIID faceID=IID_IUNKNOWN) const =0
 
virtual bool16 TreatAsBlackBox () 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 interface is used for wrapping attributes which may go missing if the plug-in that supplies them is missing. It controls the persistence of the attribute, how it is compared with other attributes, how it is copied from one AttributeBossList to another.

Member Enumeration Documentation

Treatment of wrapped attribute.
Enumerator
kTreatAsDefault 

Central data management, not copied when missing.

kTreatAsBlackBox 

Self-managed (no convert, no ref-index), copied when missing.

Member Function Documentation

virtual ClassID ITextAttrMissingImplData::GetClassID () const
pure virtual

Return the classID of the wrapped (embedded) attribute.

Returns
ClassID the classID of the embedded attribute
virtual const uchar* ITextAttrMissingImplData::GetDataBuffer () const
pure virtual

Return a buffer containing the last used persisted form of the attribute.

Returns
uchar* the embedded attribute as a serialized buffer
virtual int16 ITextAttrMissingImplData::GetDataLength () const
pure virtual

Return the number of bytes used for persisting the embedded attribute.

Returns
int16 sizeof the embedded attribute
virtual IPMUnknown* ITextAttrMissingImplData::QueryEmbeddedAttribute (PMIID faceID = IID_IUNKNOWN) const
pure virtual

Return the embedded attribute as an instantiated object. This may return nil if the plug-in that supplied the attribute is missing.

Parameters
faceIDwhich interface of the attribute to return
Returns
IPMUnknown* the embedded attribute
virtual void ITextAttrMissingImplData::Set (const ClassIDclassId,
MissingAttributeType missingType,
int16 dataLength,
uchar * adoptDataBuffer 
)
pure virtual

Initialize a blank new attribute. Use this form if you are reading the attribute in from disk.

Parameters
classIdthe classID of the embedded attribute
missingTypehow to treat the attribute within the system (black box or not)
dataLengthlength of serialized data in bytes
adoptDataBufferbuffer containing serialized data for embedded attribute. This pointer is adopted by the object, and will be deleted when the wrapper missing attribute is deleted.
virtual void ITextAttrMissingImplData::Set (const ClassIDclassId,
MissingAttributeType treatAsBlackBox,
IPMUnknownadoptAttr 
)
pure virtual

Initialize a blank new attribute. Use this form if you have an instantiated attribute that needs to be wrapped.

Parameters
classIdthe classID of the embedded attribute
treatAsBlackBoxhow to treat the attribute within the system (black box or not)
adoptAttrpointer to the attribute to embed. This pointer is adopted by the object, and will be deleted when the wrapper missing attribute is deleted.
virtual bool16 ITextAttrMissingImplData::TreatAsBlackBox () const
pure virtual

Returns whether the attribute should be treated a "black box" attribute. Black box attributes are copied even if the plug-in is missing, are always ignored on open (no warning to the user on opening the doc with the plug-in missing), and the data for these objects will not be converted.

Returns
kTrue if the attribute is a black box attribute