InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StoryListNodeID.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Matt Joss
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 __StoryListNodeID__
25 #define __StoryListNodeID__
26 
27 
28 #include "NodeID.h"
29 #include "IPMStream.h"
30 #include "IAssignmentMgr.h"
31 #include "AssignmentUIID.h"
32 
33 //========================================================================================
34 // class StoryListNodeID
35 //========================================================================================
37 {
38 public:
39  enum { kNodeType = kStoryListNodeIDClass }; //We just use the tree view widget for convenience
40  enum { kInvalidIndex = -1 };
41  typedef enum { kRootNodeType = 0x0001,
42  kDocNodeType = 0x0010,
43  kAssignmentNodeType = 0x0100,
44  kStoryNodeType = 0x1000,
45  kAllNodeType = 0x1110 } StoryListType;
46 /*
47  assignment node has : AssignmentName, AssignmentWriter
48  document node has : AssignmentName, AssignmentWriter, IAssignedDocument
49  story node has : AssignmentName, Assignmentwriter, IAssignedDocument, StoryName, StoryFilePath
50 */
51 
52  static NodeID_rv Create() {return new StoryListNodeID(UIDRef::gNull, kRootNodeType);}
53 
54  static NodeID_rv Create(const UIDRef& itemRef, StoryListType type)
55  { return new StoryListNodeID(itemRef, type); }
56 
57  virtual ~StoryListNodeID() { }
58 
59  virtual NodeType GetNodeType() const { return kNodeType; }
60 
61  virtual int32 Compare(const NodeIDClass* NodeID) const;
62  virtual NodeIDClass* Clone() const;
63  virtual void Read(IPMStream* stream);
64  virtual void Write(IPMStream* stream) const;
65 
66  virtual void GetAssignmentPath(PMString& name) const;
67  virtual UIDRef GetContentRef() const;
68  virtual void GetUIDRef(UIDRef& ref) const;
69  virtual UIDRef GetUIDRef() const;
70  virtual UIDRef GetRawUIDRef() const;
71  virtual void GetStoryPath(PMString& name) const;
72 
73  virtual StoryListType GetStoryListType() const { return fType; }
74  virtual PMString GetDescription() const ;
75 
76 private:
77  StoryListNodeID(const UIDRef& ref, const StoryListType type);
78 
79  int32 CompareUIDRefs(const UIDRef& one, const UIDRef& two) const;
80 
81  StoryListType fType;
82  UIDRef fUIDRef;
83 
84 };
85 
86 #endif