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

#include <VOSObject.h>

Inheritance diagram for VOS_Object:
VOS_RedlineObject

Public Member Functions

VOS_Objectoperator= (const VOS_Object &rhs)=delete
 
virtual int32 VirtualLength () const =0
 
virtual VOS_ObjectDuplicate () const =0
 
virtual VOS_ObjectDivide (int32 atOffset)=0
 
virtual bool16 JoinWith (VOS_Object *next)=0
 
virtual void ReadWrite (IPMStream *s, ImplementationID prop)=0
 
virtual void Release ()
 
virtual void AddRef ()
 
virtual void SetDiskPage (IVOSDiskPage *block)
 
IVOSDiskPageGrabDiskPage ()
 
IDataBaseGetDataBase () const
 
void InsertObj (VOS_Object *newone)
 
void AppendObj (VOS_Object *newone)
 
void AdjustObjectLength (int32 delta)
 
void PreDirty (bool8 dbModified=kTrue)
 
bool16 IsDirty () const
 
int32 VirtualKey () const
 
Snapshot routines

All snapshot routines are used by database snapshot for undo and SHOULD NOT be called directly.

SnapshotID GetSnapshotID () const
 
void SetSnapshot (scoped_snapshotdataref &snapshot)
 
bool16 IsSnapshotUptodate () const
 
void SetSnapshotNotuptodate ()
 

Static Public Member Functions

static void InsertSavedData (VOS_Cursor &cursor, VOS_SavedData *datalist)
 

Protected Member Functions

 VOS_Object (const VOS_Object &copy)
 

Detailed Description

VOS_Object is the basic object used to implement text model strands. Most Text Model strands are implemented as a list of VOSDiskPages, each containing an array of VOS_Object subclasses. A VOS_Cursor, returned from IVOSCache::Locate(), points to a VOS_Object. NOTE: This is a base class and is not derived from IPMUnknown.

See Also
ITextModel
IVOSCache
VOS_SimpleCursor
VOS_Cursor
VOS_SavedData

Member Function Documentation

virtual void VOS_Object::AddRef ()
virtual

Increment the object's ref count.

void VOS_Object::AdjustObjectLength (int32 delta)
inline

Inform the containing object that an object in the container has changed its length.

Parameters
deltais the adjustment to the length. Doesn't apply the delta to the object, just the container.
void VOS_Object::AppendObj (VOS_Objectnewone)
inline

Append the object after the current object.

Parameters
newoneis the object to append.
virtual VOS_Object* VOS_Object::Divide (int32 atOffset)
pure virtual

Splits the object in 2 and returns the bottom portion of the object.

Parameters
atOffsetis the split point, 0 < atOffset < VirtualLength().
Returns
the second half of the object.

Implemented in VOS_RedlineObject.

virtual VOS_Object* VOS_Object::Duplicate () const
pure virtual

Create a copy of the object. It is not placed in the data structures, only copied.

Returns
a new copy.

Implemented in VOS_RedlineObject.

IDataBase* VOS_Object::GetDataBase (void ) const
inline

Get the relevant database.

Returns
the database. Will return nil if the object isn't located in a story yet.
IVOSDiskPage* VOS_Object::GrabDiskPage ()
inline

Get without AddRef'ing the containing disk page.

Returns
the containing disk page.
void VOS_Object::InsertObj (VOS_Objectnewone)
inline

Insert the object into the container in front of this object.

Parameters
newoneis the object to insert.
static void VOS_Object::InsertSavedData (VOS_Cursorcursor,
VOS_SavedDatadatalist 
)
static

Insert the data contained in VOS_SavedData at the position specified by the cursor.

Parameters
cursoris the location to insert at.
datalistis the data to insert.
bool16 VOS_Object::IsDirty () const

Is the object dirty?

Returns
true if the object needs writing.
virtual bool16 VOS_Object::JoinWith (VOS_Objectnext)
pure virtual

Called during Write(), allows two adjacent objects that have become identical to combine.

Parameters
nextis the object that occurs next in the data structure.
Returns
true when the 2 objects should be joined. If so the next object isn't written out.

Implemented in VOS_RedlineObject.

void VOS_Object::PreDirty (bool8 dbModified = kTrue)

Mark the object dirty.

virtual void VOS_Object::ReadWrite (IPMStreams,
ImplementationID prop 
)
pure virtual

The object needs to read or write itself to disk.

Parameters
sis the IPMStream.
propis the implementationID of the object.

Implemented in VOS_RedlineObject.

virtual void VOS_Object::Release ()
virtual

Decrement the object's ref count, may delete itself when the refcount falls below 1.

virtual void VOS_Object::SetDiskPage (IVOSDiskPageblock)
virtual

PRIVATE: Used to set the object's pointer back to its container.

Parameters
blockis the containing disk page.
int32 VOS_Object::VirtualKey () const
inline

The VirtualKey is the absolute position of this object in a TextModel.

Returns
the TextIndex of the start of this object.
virtual int32 VOS_Object::VirtualLength () const
pure virtual

How many characters does this object represent?

Returns
the number of characters.

Implemented in VOS_RedlineObject.