--- /dev/null
+#ifndef path_h\r
+#define path_h\r
+\r
+struct PathData\r
+ {\r
+private:\r
+ PathData(PathData &);\r
+ PathData &operator=(PathData &);\r
+\r
+public:\r
+ char *Start;\r
+ char *Front;\r
+ char *Back;\r
+ unsigned Bytes;\r
+\r
+public:\r
+ PathData()\r
+ {\r
+ Clear(true);\r
+ }\r
+ ~PathData()\r
+ {\r
+ Free();\r
+ }\r
+ void Free();\r
+ void Alloc(unsigned MaxLen);\r
+ void Clear(bool ctor = false)\r
+ {\r
+ Start = 0;\r
+ if (ctor)\r
+ {\r
+ Front = 0;\r
+ Back = 0;\r
+ Bytes = 0;\r
+ }\r
+ else\r
+ Free();\r
+ }\r
+ void Copy(const PathData &rhs);\r
+ void FromStr(const char *PathStr);\r
+ void Reverse()\r
+ {\r
+ asserta(Start != 0);\r
+ unsigned L = (unsigned) strlen(Start);\r
+ for (unsigned k = 0; k < L/2; ++k)\r
+ {\r
+ char c = Start[k];\r
+ Start[k] = Start[L-k-1];\r
+ Start[L-k-1] = c;\r
+ }\r
+ }\r
+ void SetEmpty()\r
+ {\r
+ Start = 0;\r
+ }\r
+\r
+ bool IsEmpty() const\r
+ {\r
+ return Start == 0;\r
+ }\r
+ };\r
+\r
+#endif // path_h\r