InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
PnlTrvFileNodeID.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 // Each C++ implementation class in the plug-in and its corresponding ImplementationID
24 // should be registered in this file.
25 //
26 //========================================================================================
27 
28 #ifndef __PnlTrvFileNodeID__
29 #define __PnlTrvFileNodeID__
30 
31 #include "NodeID.h"
32 #include "IPMStream.h"
33 #include "PnlTrvID.h"
34 
44 {
45  public:
46  enum { kNodeType = kPnlTrvTreeViewWidgetBoss };
47 
48 
53  static NodeID_rv Create() { return new PnlTrvFileNodeID(); }
54 
59  static NodeID_rv Create(const PMString& path)
60  { return new PnlTrvFileNodeID(path); }
61 
64  virtual ~PnlTrvFileNodeID() {}
65 
68  virtual NodeType GetNodeType() const { return kNodeType; }
69 
74  virtual int32 Compare(const NodeIDClass* NodeID) const;
75 
79  virtual NodeIDClass* Clone() const;
80 
85  virtual void Read(IPMStream* stream);
86 
91  virtual void Write(IPMStream* stream) const;
92 
96  const PMString& GetPath() const { return fPath; }
97 
100  virtual PMString GetDescription() const { return fPath; }
101 
102  private:
103  // Note we're keeping the destructor private to force use of the factory methods
104  PnlTrvFileNodeID() {}
105 
106  PnlTrvFileNodeID(PMString path):fPath(path) {}
107 
108  PMString fPath;
109 };
110 
111 #endif // __PnlTrvFileNodeID__
112 
113