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

#include <DOMObjectReference.h>

Public Types

typedef object_type data_type
 

Public Member Functions

 DOMObjectReference ()
 
 DOMObjectReference (const WideString &key, uint32 position)
 
 DOMObjectReference (const WideString &key, IDOMElement *element)
 
 DOMObjectReference (const DOMObjectReference &other)
 
 ~DOMObjectReference ()
 
const WideStringGetKey () const
 
uint32 GetPosition () const
 
IDOMElementQueryElement () const
 
bool16 IsResolved () const
 
void SetElement (IDOMElement *element)
 
bool16 operator== (const DOMObjectReference &other) const
 
DOMObjectReferenceoperator= (const DOMObjectReference &other)
 

Detailed Description

This is a helper class for DOMAttributeValue. It encapsulates information about an inter-object reference in INX. A reference consists of:

  1. A key that represents the element being referenced.
  2. A pointer to the referenced element.
  3. The position of this reference in its associated ReferenceList. Note: Values can contain lists of other values. A reference's position value is determined after the hierarchy is flattened.
    Author
    Steve Pellegrin
    See Also
    DOMAttributeValue

Constructor & Destructor Documentation

DOMObjectReference::DOMObjectReference ()

Constructs an empty reference

DOMObjectReference::DOMObjectReference (const WideStringkey,
uint32 position 
)

Constructs an unresolved reference.

Parameters
keyIN the key that identifies the object being referenced.
positionIN the reference's position in its list.
DOMObjectReference::DOMObjectReference (const WideStringkey,
IDOMElementelement 
)

Constructs a resolved reference.

Parameters
keyIN the key that identifies the object being referenced.
elementIN the referenced element.
DOMObjectReference::DOMObjectReference (const DOMObjectReferenceother)

Constructs a reference that is a copy of another

Parameters
otherIN the reference to copy.
DOMObjectReference::~DOMObjectReference ()

Destructor

Member Function Documentation

const WideString& DOMObjectReference::GetKey () const

Get the reference's key

Returns
The key.
uint32 DOMObjectReference::GetPosition () const

Get the reference's position

Returns
The position.
bool16 DOMObjectReference::IsResolved () const

Determine whether the reference is resolved.

Returns
kTrue if resolved, kFalse if not.
DOMObjectReference& DOMObjectReference::operator= (const DOMObjectReferenceother)

Assign the value of another reference to this one.

Parameters
otherIN Another reference.
bool16 DOMObjectReference::operator== (const DOMObjectReferenceother) const

Tests the reference for equality with another.

Parameters
otherIN Another reference.
IDOMElement* DOMObjectReference::QueryElement () const

Get the reference's element

Returns
The element (may be nil)
void DOMObjectReference::SetElement (IDOMElementelement)

Sets the reference's element.

Parameters
elementIN The element.