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

#include <IDataUpdaterFacade.h>

Inheritance diagram for IDataUpdaterFacade:
IPMUnknownCPMUnknown< IDataUpdaterFacade >DataUpdaterFacade

Public Types

enum  { kDefaultIID = IID_IDATAUPDATERFACADE }
 

Public Member Functions

virtual bool16 CanInsertData (ITextModel *iTextModel, TextIndex textIndex, int32 length)=0
 
virtual ErrorCode InsertData (ITextModel *iTextModel, TextIndex &textIndex, int32 length, const WideString &table, const WideString &record, const WideString &field, const WideString &value)=0
 
virtual ErrorCode InsertAllData (ITextModel *iTextModel, TextIndex &textIndex, const IDFile &file)=0
 
virtual ErrorCode UpdateData (const UIDRef &docUIDRef, const IDFile &file)=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

From SDK sample; Abstract facade interface that encapsulates XMLDataUpdater features and functionality.

Member Function Documentation

virtual bool16 IDataUpdaterFacade::CanInsertData (ITextModeliTextModel,
TextIndex textIndex,
int32 length 
)
pure virtual

Determine if data can be inserted.

Parameters
iTextModelIN the text model of the target story.
textIndexIN the start of the range of text to examine.
lengththe IN length of the range of text to examine. Return kSuccess if tag can be inserted, other ErrorCode otherwise.

Implemented in DataUpdaterFacade.

virtual ErrorCode IDataUpdaterFacade::InsertAllData (ITextModeliTextModel,
TextIndex & textIndex,
const IDFilefile 
)
pure virtual

Create all data for each value in the given CSV file.

Precondition
IDataUpdaterFacade::CanInsertData == kTrue
Parameters
iTextModelIN the text model of the target story.
textIndexIN the position in the text to insert the data.
fileIN CSV file containing the data.
Returns
kSuccess on success, other ErrorCode otherwise.

Implemented in DataUpdaterFacade.

virtual ErrorCode IDataUpdaterFacade::InsertData (ITextModeliTextModel,
TextIndex & textIndex,
int32 length,
const WideStringtable,
const WideStringrecord,
const WideStringfield,
const WideStringvalue 
)
pure virtual

Insert a xml tagged data.

Precondition
IDataUpdaterFacade::CanInsertData == kTrue
Parameters
iTextModelIN the text model of the target story.
textIndexIN the start of the range of text to examine.
lengththe IN length of the range of text to examine.
tableIN the table for the data tag (see IDataUpdaterDataTagTextAttr::SetTable).
recordIN the key for the data tag (see IDataUpdaterDataTagTextAttr::SetKey).
fieldIN the field for the data tag (see IDataUpdaterDataTagTextAttr::SetField).
valueIN the value for the data tag (see IDataUpdaterDataTagTextAttr::SetValue).
Returns
kSuccess on success, other ErrorCode otherwise.

Implemented in DataUpdaterFacade.

virtual ErrorCode IDataUpdaterFacade::UpdateData (const UIDRefdocUIDRef,
const IDFilefile 
)
pure virtual

Look for XML tagged data in all stories in the given document and update their values if they can be updated with the data from new file.

Parameters
docUIDRefIN the target document.
fileIN CSV file containing data to be used to update xmldataupdater data tags in the document.
Returns
kSuccess on success, other ErrorCode otherwise.

Implemented in DataUpdaterFacade.