#include <IVOSCache.h>
|
| enum | { kDefaultIID = IID_IVOSCACHE } |
| |
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
Add all IVOSDiskPage objects used by this strand to the UIDList.
- Parameters
| story | is the owning story. |
| list | is 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
| startPage | is the IVOSDiskPage object to begin getting information for. |
| length | is 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. |
| pageCount | is set to be the number of IVOSDiskPage objects that were processed and added to the lists. |
| pageIDList | is the list of the IVOSDiskPage objects that were contained in the range. |
| pageLenList | is 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 | ( | IVOSDiskPage * | which | ) | |
| pure virtual |
Tells this IVOSCache that the page length has changed. Called by the disk page to keep the cache in sync.
- Parameters
| which | is 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
| virtualKey | is 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 | ( | IVOSDiskPage * | page | ) | |
| 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
| page | is the page to ask about. |
- Returns
- the TextIndex of the first element on the page.
Tells this IVOSCache that a new page has been added. Called by the disk page to keep the cache in sync.
- Parameters
| newOne | is the page that was added. |
| beforeThis | is the diskpage that comes after the new page. |
Tells this IVOSCache that the page has been removed. Called by the disk page to keep the cache in sync.
- Parameters
| which | is the diskpage that has been removed. |
Tells this IVOSCache that the page has been split. Called by the disk page to keep the cache in sync.
- Parameters
| formerFirst | is the page that was split. |
| newSecond | is 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
| startPage | is the first page that was deleted. |
| pageCount | is the number of removed pages. |
| virtual void IVOSCache::Reset | ( | | ) | |
| pure virtual |
Clears all data in the cache, which will be regenerated.