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

#include <IVOSCache.h>

Inheritance diagram for IVOSCache:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IVOSCACHE }
 

Public Member Functions

virtual VOS_Cursor Locate (int32 virtualKey)=0
 
virtual int32 LocatePageStart (IVOSDiskPage *page)=0
 
virtual void PageSplit (IVOSDiskPage *formerFirst, IVOSDiskPage *newSecond)=0
 
virtual void LengthAdjusted (IVOSDiskPage *which)=0
 
virtual void PageRemoved (IVOSDiskPage *which)=0
 
virtual void PageInserted (IVOSDiskPage *newOne, IVOSDiskPage *beforeThis)=0
 
virtual void Reset ()=0
 
virtual void GetAllPageUIDs (ITextModel *story, UIDList *list)=0
 
virtual UID GetPageUIDs (UID startPage, int32 *length, int32 *pageCount, K2Vector< UID > *pageIDList, K2Vector< int32 > *pageLenList)=0
 
virtual void PagesRemoved (UID startPage, int32 pageCount)=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

The IVOSCache interface exists on each strand within a text model. It is used to get an iterator over the strand (VOS_Cursor). It has other summary data about the strand.

See Also
ITextModel
VOS_Object
VOS_Cursor
IVOSDiskPage

Member Function Documentation

virtual void IVOSCache::GetAllPageUIDs (ITextModelstory,
UIDListlist 
)
pure virtual

Add all IVOSDiskPage objects used by this strand to the UIDList.

Parameters
storyis the owning story.
listis the UIDList to fill out.
virtual UID IVOSCache::GetPageUIDs (UID startPage,
int32 * length,
int32 * pageCount,
K2Vector< UID > * pageIDList,
K2Vector< int32 > * pageLenList 
)
pure virtual

Get complete IVOS_DiskPage data for a range of text indices.

Parameters
startPageis the IVOSDiskPage object to begin getting information for.
lengthis the number of characters to span. If the next diskpage is longer than the length left, then length is left with the number of characters on the next page and that next page's UID is returned.
pageCountis set to be the number of IVOSDiskPage objects that were processed and added to the lists.
pageIDListis the list of the IVOSDiskPage objects that were contained in the range.
pageLenListis a list of lengths, each corresponding to the disk pages in the pageIDList.
Returns
the next disk page UID when the range doesn't extend through the end of the story.
virtual void IVOSCache::LengthAdjusted (IVOSDiskPagewhich)
pure virtual

Tells this IVOSCache that the page length has changed. Called by the disk page to keep the cache in sync.

Parameters
whichis the diskpage that has changed length.
virtual VOS_Cursor IVOSCache::Locate (int32 virtualKey)
pure virtual

Return a cursor object pointing to the data in the strand at the passed in position.

Parameters
virtualKeyis the character index within the strand that the cursor will point to.
Returns
a VOS_Cursor object pointing to the correct position in the strand.
virtual int32 IVOSCache::LocatePageStart (IVOSDiskPagepage)
pure virtual

What is the absolute TextIndex of the first object on the passed in IVOSDiskPage. Disk page objects don't have absolute positions themselves, only deltas.

Parameters
pageis the page to ask about.
Returns
the TextIndex of the first element on the page.
virtual void IVOSCache::PageInserted (IVOSDiskPagenewOne,
IVOSDiskPagebeforeThis 
)
pure virtual

Tells this IVOSCache that a new page has been added. Called by the disk page to keep the cache in sync.

Parameters
newOneis the page that was added.
beforeThisis the diskpage that comes after the new page.
virtual void IVOSCache::PageRemoved (IVOSDiskPagewhich)
pure virtual

Tells this IVOSCache that the page has been removed. Called by the disk page to keep the cache in sync.

Parameters
whichis the diskpage that has been removed.
virtual void IVOSCache::PageSplit (IVOSDiskPageformerFirst,
IVOSDiskPagenewSecond 
)
pure virtual

Tells this IVOSCache that the page has been split. Called by the disk page to keep the cache in sync.

Parameters
formerFirstis the page that was split.
newSecondis the new diskpage that was created when formerFirst was split and inserted after it.
virtual void IVOSCache::PagesRemoved (UID startPage,
int32 pageCount 
)
pure virtual

Tells this IVOSCache that a bunch of pages were removed.

Parameters
startPageis the first page that was deleted.
pageCountis the number of removed pages.
virtual void IVOSCache::Reset ()
pure virtual

Clears all data in the cache, which will be regenerated.