Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
xpathoperation.h
1//
2// xpathoperation.h
3// These functions are declared in macos_fileoperation, win_fileoperation...
4//
5// Created by Mootools on 20/05/2016.
6// Copyright © 2016 Mootools. All rights reserved.
7//
8
9#ifndef xpathoperation_h
10#define xpathoperation_h
11
12BEGIN_MOOTOOLS_NAMESPACE
13
14typedef enum XURL_TYPE
15{
16 XURL_INVALID = 0, // This is not an url
17 XURL_DIRECTORY = 0x01,
18 XURL_FILE = 0x02,
19} XURL_TYPE;
20
21typedef enum XPATH_GETPART
22{
23 XPATH_GET_ROOT,
24 XPATH_GET_PATH,
25 XPATH_STRIP_PATH,
26 XPATH_GET_FILENAME,
27 XPATH_STRIP_FILENAME,
28 XPATH_GET_EXT,
29 XPATH_STRIP_EXT,
30 XPATH_GET_SHORTEST_PATH, // Return the shortest path when . and .. exists (ie path such C:\abc\..\abc\file.txt). Return the path itself if it fails.
31 XPATH_GET_QUERY, // Must be an URL
32} XPATH_GETPART;
33
34typedef enum XPATH_QUALIFY
35{
36 XPATH_IS_VALID_NAME = 1, // Check if the name is o/S compatible (ie windows : length < MAX_PATH)
37 XPATH_IS_RELATIVE,
38 XPATH_IS_ROOT,
39 XPATH_IS_VALID_DIRECTORY, // occurs when XFILE_ATTRIBUTE_DIRECTORY attribute is set for the path
40 XPATH_IS_URL,
41 XPATH_IS_UNC,
42 XPATH_IS_NETWORK,
43 XPATH_IS_EXE,
44} XPATH_QUALIFY;
45
46void xPathSlashTerminate(CXString& path);
47bool xPathQualify(const CXString& path, XPATH_QUALIFY part);
48CXString xPathGetPart(const CXString& path, XPATH_GETPART part, bool *result = NULL);
49unsigned int xPathQualifyURL(const CXString& path); // Return non 0 XURL_TYPE combination if path is an URL, 0 otherwise
50CXString xPathConvertToAbsolutePath(const CXString& mainPath, const CXString& relativePath); // If relativePath is relative, make the path absolute using mainPath. Otherwise return relativePath. Cf PathCanonicalize
51
52END_MOOTOOLS_NAMESPACE
53
54#ifdef __WINDOWS__
55 #include "./win/win_pathoperation.h"
56#elif defined (__APPLE__)
57 #include "./macos/macos_pathoperation.h"
58#elif defined (__LINUX__)
59 #include "./linux/linux_pathoperation.h"
60#endif
61
62#endif /* xpathoperation_h */
The class defines an x, y, z 3D point which can use int, float or double.
Definition 3DPoint.h:27