InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CusDtLnkUITreeDataNode.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Adobe Developer Technologies
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 __CusDtLnkUITreeDataNode_H_DEFINED__
25 #define __CusDtLnkUITreeDataNode_H_DEFINED__
26 
27 #include <map>
36 {
37 public:
38  enum TreeDataNodeType { eRootType, eDataBaseType, eAssetType, eValueType } ;
39  enum AssetState { eStatePlaceholder, eStateProvisional, eStateFinal };
42 
44  virtual ~CusDtLnkUITreeDataNode();
45 
46  // +K2Vector support
47 
53 
59 
63  // -K2Vector support
64 
69  bool operator==(const CusDtLnkUITreeDataNode& rhs) const;
70 
71 
76  const CusDtLnkUITreeDataNode& GetNthChild(int32 indexInParent) const;
77 
82 
86  int32 ChildCount() const;
87 
90  PMString GetUniqueKey() const;
91 
92  TreeDataNodeType GetNodeType() const ;
93 
94  void SetNodeType(TreeDataNodeType typ);
95 
99  void AddChild(const CusDtLnkUITreeDataNode& o);
100 
104  void RemoveChild(const CusDtLnkUITreeDataNode& o);
105 
109  void SetParent(const CusDtLnkUITreeDataNode* p);
110 
114  void SetUniqueKey(const PMString& uk);
115 
116  URI GetURIFromNode() const;
117 
118 
119  void SetAssetDataBasePath(const PMString& dbPath);
120 
121  PMString GetAssetDataBasePath() const;
122 
123 
124  void AddAssetRecordValue(const PMString& name, const PMString& val);
125 
126  int32 GetAssetRecordFieldCount() const;
127  PMString GetNthAssetRecordFieldName(int32 index) const;
128  PMString GetAssetRecordFieldValue(const PMString& key) const;
129 
130  IDFile ResolveAssetPath() const;
131 
132  AssetState GetAssetState() const;
133  PMString GetDescription() const;
134 
135 private:
136  void deepcopy(const CusDtLnkUITreeDataNode& rhs);
137 
139 
140 
141 
142  PMString fUniqueKey;
143 
144  CusDtLnkUITreeDataNode* fParent;
145  TreeDataNodeType fNodeType;
146 
147  // Applies iff node type is asset
148  std::map<PMString, PMString> fAssetRecordValues;
149  PMString fAssetDataBasePath;
150 
151 
152 };
153 
154 #endif // __CusDtLnkUITreeDataNode_H_DEFINED__
155