InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
XMLContentReference Class Reference

#include <XMLContentReference.h>

Public Types

enum  ContentType {
  kContentType_Text = 0, kContentType_PageItem, kContentType_Table, kContentType_TableGrid,
  kContentType_TableCell, kContentType_NoContent
}
 
typedef base_type data_type
 

Public Member Functions

 XMLContentReference ()
 
 XMLContentReference (const UIDRef &baseUIDRef, const GridID &gridID=kInvalidGridID)
 
 XMLContentReference (const UIDRef &baseUIDRef, const GridID &startGrid, const GridSpan &span)
 
 XMLContentReference (const XMLContentReference &other)
 
ContentType GetContentType () const
 
const UIDRefGetUIDRef () const
 
void SetUIDRef (const UIDRef &uidRef)
 
UID GetUID () const
 
void SetUID (UID uid)
 
IDataBaseGetDataBase () const
 
void SetDataBase (IDataBase *db)
 
GridAddress GetGridAddress (const ITableModel *tableModel) const
 
const GridIDGetGridID () const
 
void SetGridID (GridID gridID)
 
const GridSpanGetSpan () const
 
void SetSpan (const GridSpan &span)
 
GridArea GetGridArea (ITableModel *tableModel) const
 
void SetNoContent (void)
 
IXMLReferenceDataInstantiate () const
 
bool16 IsInline () const
 
bool16 IsTable () const
 
bool16 IsTableCell () const
 
bool16 IsTableGrid () const
 
bool16 IsNoContent () const
 
bool16 IsTableCellPlacedPageItem () const
 
void ReadWrite (IPMStream *s, IDataBase *db=nil)
 
bool16 operator== (const XMLContentReference &other) const
 
bool16 operator!= (const XMLContentReference &compareAgainst) const
 
bool16 operator< (const XMLContentReference &compareAgainst) const
 
void SetTableTagPreference (IXMLElementCommands::TableTagPreference newSetting)
 
IXMLElementCommands::TableTagPreference GetTableTagPreference () const
 

Detailed Description

Represents the content information for a XML structure element. A XML structure element may be associated with a specific content item. This class contains information about the content item.

Member Typedef Documentation

no specialized copy semantics required for K2Vector

Member Enumeration Documentation

the type of the content
Enumerator
kContentType_PageItem 

content is text (PCDATA)

kContentType_Table 

page item

kContentType_TableGrid 

table

kContentType_TableCell 

table row

kContentType_NoContent 

table cell no content is associated with this. Note that this is different than text content that's empty

Constructor & Destructor Documentation

XMLContentReference::XMLContentReference ()

constructors Default constructor

XMLContentReference::XMLContentReference (const UIDRefbaseUIDRef,
const GridIDgridID = kInvalidGridID 
)

Constructor

Parameters
baseUIDRef
XMLContentReference::XMLContentReference (const UIDRefbaseUIDRef,
const GridIDstartGrid,
const GridSpanspan 
)

Constructor

Parameters
baseUIDRef
XMLContentReference::XMLContentReference (const XMLContentReferenceother)

Copy constructor

Parameters
otherobject to cpy state from

Member Function Documentation

ContentType XMLContentReference::GetContentType () const

accessors and mutators for member data Get the content's type

Returns
ContentType
IDataBase* XMLContentReference::GetDataBase () const

Accessor for database stored with the base UIDRef

Returns
IDataBase
GridAddress XMLContentReference::GetGridAddress (const ITableModeltableModel) const

Accessor for the table cell by GridAddress return GridAddress

GridArea XMLContentReference::GetGridArea (ITableModeltableModel) const

Accesor for the grid area, including GridID & GridSpan

Parameters
tableModel- what table owns this element
Returns
GridArea
const GridID& XMLContentReference::GetGridID () const

Accessor for the table cell grid ID return GridID

const GridSpan& XMLContentReference::GetSpan () const

Accessor for the grid extent return GridSpan

UID XMLContentReference::GetUID () const

Accessor for base UID associated with the base UIDRef

Returns
base UID associated with the reference
const UIDRef& XMLContentReference::GetUIDRef () const

Accessor for base UIDRef

Returns
const UIDRef&
IXMLReferenceData* XMLContentReference::Instantiate () const

methods for accessing associated content Instantiate the XMLReferenceData of the content item from the database

Returns
reference-incremented interface ptr to IXMLReferenceData
bool16 XMLContentReference::IsInline () const

determine whether the content is an inline page item

Returns
kTrue if the content is an inline page item; kFalse otherwise
bool16 XMLContentReference::IsNoContent () const

determine whether the content is a no content

Returns
kTrue if the content is a no content type
bool16 XMLContentReference::IsTable () const

determine whether the content is a table

Returns
kTrue if the content is a table; kFalse otherwise
bool16 XMLContentReference::IsTableCell () const

determine whether the content is a table cell

Returns
kTrue if the content is a table cell; kFalse otherwise
bool16 XMLContentReference::IsTableCellPlacedPageItem () const

determine whether the content is a pageitem placed inside table cell

Returns
kTrue if the content is a pageitem placed inside table cell
bool16 XMLContentReference::IsTableGrid () const

determine whether the content is a table grid

Returns
kTrue if the content is a table grid; kFalse otherwise
bool16 XMLContentReference::operator!= (const XMLContentReferencecompareAgainst) const
inline

Inequality operator

Parameters
compareAgainstcomparand
Returns
kTrue if equality operation fails, kFalse otherwise
bool16 XMLContentReference::operator< (const XMLContentReferencecompareAgainst) const

Less than operator

Parameters
compareAgainstcomparand
Returns
kTrue if this is less than compareAgainst, kFalse otherwise
bool16 XMLContentReference::operator== (const XMLContentReferenceother) const

Equality operator

Parameters
othercomparand
Returns
kTrue if member data match, kFalse otherwise
void XMLContentReference::ReadWrite (IPMStreams,
IDataBasedb = nil 
)

misc utilities Method to serialise object to or deserialise object from given stream

Parameters
sstream to read state from or write state to
db
void XMLContentReference::SetDataBase (IDataBasedb)

Mutator for database of base UIDRef

Parameters
dbdata base of content
void XMLContentReference::SetGridID (GridID gridID)

Mutator for the table cell grid ID

Parameters
gridIDGridID of the table cell
void XMLContentReference::SetNoContent (void )

Mutator for marking this as having no content

void XMLContentReference::SetSpan (const GridSpanspan)

Mutator for the grid extent

Parameters
GridSpanof the table grid element
void XMLContentReference::SetUID (UID uid)

Mutator for content base UIDRef's UID

Parameters
uidnew content UID
void XMLContentReference::SetUIDRef (const UIDRefuidRef)

Mutator for base UIDRef

Parameters
uidRefnew content UIDRef