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

#include <IVOSDiskPage.h>

Inheritance diagram for IVOSDiskPage:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IVOSDISKPAGE }
 

Public Member Functions

virtual void SetStrand (UID strandID)=0
 
virtual UID GetStrand () const =0
 
virtual UID NextPage () const =0
 
virtual UID PrevPage () const =0
 
virtual void SetNextPage (UID page)=0
 
virtual void SetPrevPage (UID page)=0
 
virtual void AddRefObj (VOS_Object *object)=0
 
virtual void ReleaseObj (VOS_Object *object)=0
 
virtual VOS_ObjectQueryFindObject (int32 *offset)=0
 
virtual int32 LocateObjectStart (const VOS_Object *object)=0
 
virtual VOS_ObjectQueryFirstObj ()=0
 
virtual VOS_ObjectQueryLastObj ()=0
 
virtual VOS_ObjectQueryNextObj (VOS_Object *object)=0
 
virtual VOS_ObjectQueryPrevObj (VOS_Object *obj)=0
 
virtual int32 ObjectIndexOnPage (const VOS_Object *object)=0
 
virtual void InsertObj (VOS_Object *newOne, VOS_Object *before=nil)=0
 
virtual void AppendObj (VOS_Object *newOne, VOS_Object *after=nil)=0
 
virtual void RemoveObj (VOS_Object *theOne, bool16 deleteIt=kTrue)=0
 
virtual void ReplaceObj (VOS_Object *replaceMe, VOS_Object *replaceWith, bool16 deleteIt=kTrue)=0
 
virtual void RemovePage ()=0
 
virtual void InsertPage (UID newPage, VOS_Object *before=nil)=0
 
virtual int32 TotalLength ()=0
 
virtual int32 TotalObjects ()=0
 
virtual ClassID GetClassOfObjectsInStrand () const =0
 
virtual void AdjustLength (int32 delta)=0
 
virtual void DirtyPage (Bool16 markDoc=kTrue)=0
 
virtual UID RemoveOneOrMorePages (int32 *length, K2Vector< UID > *pageIDList, K2Vector< int32 > *pageLenList)=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 IVOSDiskPage represents a node within a double-linked list of IVOSDiskPage's each page contains a list of VOS_Objects. This is the basic data structure used by each strand within the ITextModel. Pseudo-iterators called VOS_Cursors are used to walk the data. NOTE: Normally this objects would NOT be accessed directly.

See Also
ITextModel
VOS_Object
VOS_Cursor

Member Function Documentation

virtual void IVOSDiskPage::AddRefObj (VOS_Objectobject)
pure virtual

Add a reference to the object. This object must be contained on this page.

Parameters
objectis the VOS_Object who is being referenced.
virtual void IVOSDiskPage::AdjustLength (int32 delta)
pure virtual

Used by the VOS_Objects to tell the page that lengths have changed.

Parameters
deltais the adjustment to the total number of characters on the page.
virtual void IVOSDiskPage::AppendObj (VOS_ObjectnewOne,
VOS_Objectafter = nil 
)
pure virtual

Append an object onto the page. May cause the page to split into two.

Parameters
newOneis the new VOS_Object to add to the page.
afteris the object to append after. Nil means to add at the end of the page. An object off the page will fail.
virtual void IVOSDiskPage::DirtyPage (Bool16 markDoc = kTrue)
pure virtual

Used by the VOS_Objects on the page to mark the page Dirty.

Parameters
markDocindicates whether to mark the document dirty also.
virtual ClassID IVOSDiskPage::GetClassOfObjectsInStrand () const
pure virtual

What type of VOS_Objects are being stored on this disk page? Each strand only can be made up of one type of VOS_Object in the normal scheme.

Returns
the ClassID of the VOS_Objects on this page.
virtual UID IVOSDiskPage::GetStrand () const
pure virtual

What is the strand that owns this page?

Returns
the UID of the strand that uses this disk page.
virtual void IVOSDiskPage::InsertObj (VOS_ObjectnewOne,
VOS_Objectbefore = nil 
)
pure virtual

Insert an object onto the page. May cause the page to split into two.

Parameters
newOneis the new VOS_Object to add to the page.
beforeis the object to insert before. Nil means to insert at the beginning of the page. An object off the page will fail.
virtual void IVOSDiskPage::InsertPage (UID newPage,
VOS_Objectbefore = nil 
)
pure virtual

Insert a new page into the linked list. Maintains the linked list and the caches.

Parameters
newPageis a UID of a new VOSDiskpage to add to the structure.
before,ifnon-nil, specifies that the new page is to be inserted before the location of an object on the page. Can cause this page to split.
virtual int32 IVOSDiskPage::LocateObjectStart (const VOS_Objectobject)
pure virtual

Find the offset of a VOS_Object that is located on this page. This is not an absolute index or position, only an offset (in characters) from the beginning of the page.

Parameters
objectis the object in question.
Returns
the offset from the page start of the beginning of the object.
virtual UID IVOSDiskPage::NextPage () const
pure virtual

What is the IVOSDiskPage that comes after this one?

Returns
the UID of the next disk page.
virtual int32 IVOSDiskPage::ObjectIndexOnPage (const VOS_Objectobject)
pure virtual

Find the index of a VOS_Object that is located on this page. This is not any kind of character position, just the index relative to other VOS_Objects on this page.

Parameters
objectis the object in question.
Returns
the index of the object.
virtual UID IVOSDiskPage::PrevPage () const
pure virtual

What is the IVOSDiskPage that comes before this one?

Returns
the UID of the previous disk page.
virtual VOS_Object* IVOSDiskPage::QueryFindObject (int32 * offset)
pure virtual

Find the VOS_Object that is located at the specified offset on this page. This is not an absolute index or position, only an offset (in characters) from the beginning of the page.

Parameters
offsetis the number of characters from the beginning of the page. Offset is updated to be the offset WITHIN the returned object (the object contains the position, but doesn't have to start with it).
Returns
an AddRef'd object that contains the offset.
virtual VOS_Object* IVOSDiskPage::QueryFirstObj ()
pure virtual

Query the first object on the page

Returns
an AddRef'd pointer to the first object on the page.
virtual VOS_Object* IVOSDiskPage::QueryLastObj ()
pure virtual

Query the last object on the page

Returns
an AddRef'd pointer to the last object on the page.
virtual VOS_Object* IVOSDiskPage::QueryNextObj (VOS_Objectobject)
pure virtual

Query the object that occurs after another one on the page. This routine will return nil if the passed in object is NOT on this page or if the object is the last object on the page – it doesn't go to the next page automatically.

Parameters
objectis one object on the page.
Returns
an AddRef'd pointer to the next object on the page.
virtual VOS_Object* IVOSDiskPage::QueryPrevObj (VOS_Objectobj)
pure virtual

Query the object that occurs before another one on the page. This routine will return nil if the passed in object is NOT on this page or if the object is the first object on the page – it doesn't go to the previous page automatically.

Parameters
objis one object on the page.
Returns
an AddRef'd pointer to the previous object on the page.
virtual void IVOSDiskPage::ReleaseObj (VOS_Objectobject)
pure virtual

Release a reference to the object. This object must be contained on this page.

Parameters
objectis the VOS_Object who used to be referenced.
virtual void IVOSDiskPage::RemoveObj (VOS_ObjecttheOne,
bool16 deleteIt = kTrue 
)
pure virtual

Remove an object from the page.

Parameters
theOneis the new VOS_Object to remove. Will fail if the object is not found.
deleteItindicates whether to force the object to be destructed.
virtual UID IVOSDiskPage::RemoveOneOrMorePages (int32 * length,
K2Vector< UID > * pageIDList,
K2Vector< int32 > * pageLenList 
)
pure virtual

Shortcut method to remove more than one page at a time.

Parameters
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.
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 IVOSDiskPage::RemovePage ()
pure virtual

Remove the page from the chain of pages. Updates the previous & next pointers of all diskpages involved, tells the cache, etc. but doesn't delete the object from the database.

virtual void IVOSDiskPage::ReplaceObj (VOS_ObjectreplaceMe,
VOS_ObjectreplaceWith,
bool16 deleteIt = kTrue 
)
pure virtual

Replace an object onto the page.

Parameters
replaceMeis the old VOS_Object to remove from the page. This object must be on this page.
replaceWithis the new VOS_Object to add to the page.
deleteItindicates whether to force the old object to be destructed.
virtual void IVOSDiskPage::SetNextPage (UID page)
pure virtual

What is the IVOSDiskPage that comes after this one?

Parameters
pageis the UID of the next disk page.
virtual void IVOSDiskPage::SetPrevPage (UID page)
pure virtual

What is the IVOSDiskPage that comes before this one?

Parameters
pageis the UID of the previous disk page.
virtual void IVOSDiskPage::SetStrand (UID strandID)
pure virtual

What is the strand that owns this page?

Parameters
strandIDis the UID of the strand that uses this disk page.
virtual int32 IVOSDiskPage::TotalLength ()
pure virtual

How many characters are represented by this disk page?

Returns
the number of character positions represented by this page.
virtual int32 IVOSDiskPage::TotalObjects ()
pure virtual

How many VOS_Objects are on this page?

Returns
the number of VOS_Objects on this page.