InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDPath.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Michael Easter
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 // Description:
24 // This class is a wrapper around the APath class which provides InDesign specific
25 // implementations and extensions to the APath class.
26 //
27 //========================================================================================
28 
29 #ifndef __IDPath__
30 #define __IDPath__
31 
32 // ----- Includes -----
33 #include "APath.h"
34 
35 class IPMStream;
36 class WideString;
37 
38 using namespace adobe::afl;
39 
44 class IDPath : public APath
45 {
46 public:
47  typedef APath inherited;
48  typedef object_type data_type;
49 
54  IDPath();
55 
62  IDPath(const APathComponent& component);
63 
75  IDPath(const AString& pathStr, PathType typeHint = kDefaultOSPath);
76 
88  IDPath(const WideString& pathStr, PathType typeHint = kDefaultOSPath);
89 
95  IDPath(const IDPath& path);
96 
102  IDPath(const APath& path);
103 
108  virtual ~IDPath();
109 
115  friend void swap(IDPath &lhs, IDPath &rhs) noexcept;
116 
123  IDPath& operator=(const IDPath& rhs);
124 
125  IDPath(IDPath&& rhs) noexcept
126  : APath(std::move(rhs))
127  {
128  }
129 
130  IDPath& operator=(IDPath&& rhs) noexcept;
131 
138  IDPath& operator=(const APath& rhs);
139 
146  bool operator==(const IDPath& rhs) const;
147 
154  bool operator!=(const IDPath& rhs) const;
155 
162  IDPath& operator+=(const IDPath& rhs);
163 
170  IDPath& operator+=(const APathComponent& rhs);
171 
181  bool SetPath(const WideString& pathStr, PathType typeHint = kDefaultOSPath);
182 
188  IDPath& Append(const IDPath& path);
189 
195  IDPath& Append(const APathComponent& component);
196 };
197 
198 inline void swap(IDPath &lhs, IDPath &rhs) noexcept
199 {
200  using std::swap;
201  swap(static_cast<APath &>(lhs), static_cast<APath &>(rhs));
202 }
203 
204 inline IDPath& IDPath::operator=(IDPath&& rhs) noexcept
205 {
206  swap(*this, rhs);
207 
208  return *this;
209 }
210 
211 #endif // __IDPath__