InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
DOMObjectReference.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Steve Pellegrin
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __DOMObjectReference_h__
25 #define __DOMObjectReference_h__
26 
27 // Adobe Patent or Adobe Patent Pending Invention Included Within this File
28 // Adobe patent application tracking B234, entitled Method and apparatus for formatting portion of content, inventors: Craig Rainwater, Steve Pellegrin, Robin Briggs
29 
30 
31 #include "K2Vector.h"
32 
33 class WideString;
34 class IDOMElement;
35 
48 {
49 public:
50  typedef object_type data_type;
51 
52 public:
60  DOMObjectReference(const WideString & key, uint32 position);
65  DOMObjectReference(const WideString & key, IDOMElement *element);
73 
77  const WideString &GetKey() const;
78 
82  uint32 GetPosition() const;
83 
87  IDOMElement *QueryElement() const;
88 
92  bool16 IsResolved() const;
93 
97  void SetElement(IDOMElement *element);
98 
102  bool16 operator==(const DOMObjectReference &other) const;
103 
108 
109 private:
110  void Copy(const DOMObjectReference &other);
111 
112 private:
113  WideString fKey;
114  uint32 fPosition;
115  InterfacePtr<IDOMElement> fElement;
116 };
117 
119 
120 #endif // __DOMObjectReference_h__