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

#include <CContentIterator.h>

Public Member Functions

 CContentIterator (IPMUnknown *owner, IPMStream *s)
 
virtual ~CContentIterator ()
 
virtual bool16 IsClassID () const =0
 
virtual IPMStreamQueryContentStream ()=0
 
virtual ClassID GetClassID () const =0
 
virtual ImplementationID GetImplementationID () const =0
 
virtual uint32 GetLength () const =0
 
virtual bool16 Next ()=0
 
virtual void ResetRead (IContentWriteIterator *out=nil)=0
 
virtual void CreateClassID (ClassID id)=0
 
virtual uint32 CloseClassID (ClassID id)=0
 
virtual void CreateImplementationID (ImplementationID id)=0
 
virtual uint32 CloseImplementationID (ImplementationID id)=0
 
virtual void AbortID ()=0
 
virtual void ResetWrite ()=0
 
virtual void BeginList (IContentWriteIterator::ListType)
 
virtual void EndList ()
 
bool16 EndOfList () const
 
virtual int32 GetOriginPosition () const
 

Protected Member Functions

IPMStreamGetStream () const
 
bool IsReadIterator () const
 
int32 CurrentPosition (IPMStream *s) const
 
void SetEndOfList (bool16 atEnd)
 

Detailed Description

This class provides basic support for both input and output content iterators. Much of its functionality must be provided by a subclass (see comments, below).

Constructor & Destructor Documentation

CContentIterator::CContentIterator (IPMUnknownowner,
IPMStreams 
)

ctor

Parameters
ownerIN Owning Boss
sIN Input or output stream associated with this iterator
virtual CContentIterator::~CContentIterator ()
virtual

dtor

Member Function Documentation

virtual void CContentIterator::AbortID ()
pure virtual

Abandon process output for the most recent class or implementation ID. (Only meaningful for Output iterators) Must be supplied by a subclass.

virtual void CContentIterator::BeginList (IContentWriteIterator::ListType )
inlinevirtual

Notification method: Called when we start processing a list. May be overridden by a subclass.

Parameters
listTypeIN The type of list being processed.
virtual uint32 CContentIterator::CloseClassID (ClassID id)
pure virtual

Finish processing output for the most recent class ID. If the supplied ID differs from the one supplied to CreateClassID(), the class is renumbered in the database. (Only meaningful for Output iterators) Must be supplied by a subclass.

Parameters
idIN The class ID
virtual uint32 CContentIterator::CloseImplementationID (ImplementationID id)
pure virtual

Finish processing output for the most recent implementation ID. If the supplied ID differs from the one supplied to CreateImplementationID(), the implementation is renumbered in the database. (Only meaningful for Output iterators) Must be supplied by a subclass.

Parameters
idIN The implementation ID
virtual void CContentIterator::CreateClassID (ClassID id)
pure virtual

Add a class ID to the output iterator. (Only meaningful for Output iterators) Must be supplied by a subclass.

Parameters
idIN The class ID
virtual void CContentIterator::CreateImplementationID (ImplementationID id)
pure virtual

Add an implementation ID to the output iterator. (Only meaningful for Output iterators) Must be supplied by a subclass.

Parameters
idIN The implementation ID
int32 CContentIterator::CurrentPosition (IPMStreams) const
inlineprotected

Return the current stream position relative to the iterator's origin. For input iterators, this means the number of bytes already consumed. For output iterators, it means the number of bytes written.

Returns
The position
virtual void CContentIterator::EndList ()
inlinevirtual

A notification method: Called when we are finished processing a list. May be overridden by a subclass.

bool16 CContentIterator::EndOfList () const
inline

Determines whether we are at the end of the data. (Only meaningful for Input iterators)

Returns
kTrue if at the end, kFalse otherwise.
virtual ClassID CContentIterator::GetClassID () const
pure virtual

Return the ID of the current class being processed

Returns
The class ID or kInvalidClass if there is no current class Must be supplied by a subclass.
virtual ImplementationID CContentIterator::GetImplementationID () const
pure virtual

Return the ID of the current implementation being processed

Returns
The implementation ID or kInvalidImpl if there is no current implementation Must be supplied by a subclass.
virtual uint32 CContentIterator::GetLength () const
pure virtual

Return the length of the data associated with the current class or implementation (Only meaningful for Input iterators) Must be supplied by a subclass.

Returns
The data length in bytes
virtual int32 CContentIterator::GetOriginPosition () const
inlinevirtual

Returns the stream offset when the iterator was first constructed, or after the most recent reset.

Returns
The stream offset
IPMStream* CContentIterator::GetStream () const
inlineprotected

Return an unreferenced pointer to the input or output stream associated with this iterator.

Returns
The stream
virtual bool16 CContentIterator::IsClassID () const
pure virtual

Determine whether the ID currently being processed is a class or implementation. Must be supplied by a subclass.

Returns
kTrue if a class, kFalse if an implementation
bool CContentIterator::IsReadIterator () const
inlineprotected

Determine whether this is an input or output iterator.

Returns
kTrue if input, kFalse if output
virtual bool16 CContentIterator::Next ()
pure virtual

Advance to the next class or implementation ID (Only meaningful for Input iterators) Must be supplied by a subclass.

Returns
kTrue if another ID was found, kFalse if not
virtual IPMStream* CContentIterator::QueryContentStream ()
pure virtual

Return a referenced pointer to the stream associated with the iterator. Must be supplied by a subclass.

Returns
The stream
virtual void CContentIterator::ResetRead (IContentWriteIteratorout = nil)
pure virtual

Resets an input iterator to the state that it was in when constructed and optionally associates an output iterator with it. (Only meaningful for Input iterators) Must be supplied by a subclass.

Parameters
outIN An output iterator
virtual void CContentIterator::ResetWrite ()
pure virtual

Reset an output iterator to its initial, empty state. (Only meaningful for Output iterators) Must be supplied by a subclass.

void CContentIterator::SetEndOfList (bool16 atEnd)
inlineprotected

Sets the iterator's end-of-file status.

Parameters
atEndIN kTrue if at eof, kFalse if not