TDE core libraries
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

global.h 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. /* This file is part of the KDE libraries
  2. Copyright (C) 2000 David Faure <faure@kde.org>
  3. This library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Library General Public
  5. License version 2 as published by the Free Software Foundation.
  6. This library is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  9. Library General Public License for more details.
  10. You should have received a copy of the GNU Library General Public License
  11. along with this library; see the file COPYING.LIB. If not, write to
  12. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  13. Boston, MA 02110-1301, USA.
  14. */
  15. #ifndef __tdeio_global_h__
  16. #define __tdeio_global_h__
  17. #include <tqstring.h>
  18. #include <tqvaluelist.h>
  19. #include <tqptrlist.h>
  20. #include <tqdatastream.h>
  21. #include <tqdatetime.h>
  22. #include <tqmap.h>
  23. #include <kurl.h>
  24. /**
  25. * @short A namespace for KIO globals
  26. *
  27. */
  28. namespace TDEIO
  29. {
  30. /// 64-bit file offset
  31. typedef TQ_LLONG fileoffset_t;
  32. /// 64-bit file size
  33. typedef TQ_ULLONG filesize_t;
  34. /**
  35. * Converts @p size from bytes to the string representation.
  36. *
  37. * @param size size in bytes
  38. * @return converted size as a string - e.g. 123.4 kB , 12.0 MB
  39. */
  40. TDEIO_EXPORT TQString convertSize( TDEIO::filesize_t size );
  41. /**
  42. * Converts @p size from bytes to a string representation with includes
  43. * the size in bytes.
  44. * e.g. 90 B, 240 B, 1.4 KB (1495 B), 2.6MB (2,734,344 B), 0 B
  45. * @param size size in bytes
  46. * @return converted size as a string - e.g. 1.4 KB (1495 B), 45 B
  47. */
  48. TDEIO_EXPORT TQString convertSizeWithBytes( TDEIO::filesize_t size );
  49. /**
  50. * Converts a size to a string representation
  51. * Not unlike TQString::number(...)
  52. *
  53. * @param size size in bytes
  54. * @return converted size as a string - e.g. 123456789
  55. */
  56. TDEIO_EXPORT TQString number( TDEIO::filesize_t size );
  57. /**
  58. * Converts size from kilo-bytes to the string representation.
  59. *
  60. * @param kbSize size in kilo-bytes
  61. * @return converted size as a string - e.g. 123.4 kB , 12.0 MB
  62. */
  63. TDEIO_EXPORT TQString convertSizeFromKB( TDEIO::filesize_t kbSize );
  64. /**
  65. * Calculates remaining time in seconds from total size, processed size and speed.
  66. *
  67. * @param totalSize total size in bytes
  68. * @param processedSize processed size in bytes
  69. * @param speed speed in bytes per second
  70. * @return calculated remaining time in seconds
  71. *
  72. * @since 3.4
  73. */
  74. TDEIO_EXPORT unsigned int calculateRemainingSeconds( TDEIO::filesize_t totalSize,
  75. TDEIO::filesize_t processedSize, TDEIO::filesize_t speed );
  76. /**
  77. * Convert @p seconds to a string representing number of days, hours, minutes and seconds
  78. *
  79. * @param seconds number of seconds to convert
  80. * @return string representation in a locale depending format
  81. *
  82. * @since 3.4
  83. */
  84. TDEIO_EXPORT TQString convertSeconds( unsigned int seconds );
  85. /**
  86. * Calculates remaining time from total size, processed size and speed.
  87. * Warning: As TQTime is limited to 23:59:59, use calculateRemainingSeconds() instead
  88. *
  89. * @param totalSize total size in bytes
  90. * @param processedSize processed size in bytes
  91. * @param speed speed in bytes per second
  92. * @return calculated remaining time
  93. */
  94. TDEIO_EXPORT TQTime calculateRemaining( TDEIO::filesize_t totalSize, TDEIO::filesize_t processedSize, TDEIO::filesize_t speed ) KDE_DEPRECATED;
  95. /**
  96. * Helper for showing information about a set of files and directories
  97. * @param items the number of items (= @p files + @p dirs + number of symlinks :)
  98. * @param files the number of files
  99. * @param dirs the number of dirs
  100. * @param size the sum of the size of the @p files
  101. * @param showSize whether to show the size in the result
  102. * @return the summary string
  103. */
  104. TDEIO_EXPORT TQString itemsSummaryString(uint items, uint files, uint dirs, TDEIO::filesize_t size, bool showSize);
  105. /**
  106. * Encodes (from the text displayed to the real filename)
  107. * This translates % into %% and / into %2f
  108. * Used by TDEIO::link, for instance.
  109. * @param str the file name to encode
  110. * @return the encoded file name
  111. */
  112. TDEIO_EXPORT TQString encodeFileName( const TQString & str );
  113. /**
  114. * Decodes (from the filename to the text displayed)
  115. * This translates %2[fF] into / and %% into %
  116. * @param str the file name to decode
  117. * @return the decoded file name
  118. */
  119. TDEIO_EXPORT TQString decodeFileName( const TQString & str );
  120. /**
  121. * Commands that can be invoked by a job.
  122. */
  123. enum Command {
  124. CMD_HOST = '0', // 48
  125. CMD_CONNECT = '1', // 49
  126. CMD_DISCONNECT = '2', // 50
  127. CMD_SLAVE_STATUS = '3', // 51
  128. CMD_SLAVE_CONNECT = '4', // 52
  129. CMD_SLAVE_HOLD = '5', // 53
  130. CMD_NONE = 'A', // 65
  131. CMD_TESTDIR = 'B', // 66
  132. CMD_GET = 'C', // 67
  133. CMD_PUT = 'D', // 68
  134. CMD_STAT = 'E', // 69
  135. CMD_MIMETYPE = 'F', // 70
  136. CMD_LISTDIR = 'G', // 71
  137. CMD_MKDIR = 'H', // 72
  138. CMD_RENAME = 'I', // 73
  139. CMD_COPY = 'J', // 74
  140. CMD_DEL = 'K', // 75
  141. CMD_CHMOD = 'L', // 76
  142. CMD_SPECIAL = 'M', // 77
  143. CMD_USERPASS = 'N', // 78
  144. CMD_REPARSECONFIGURATION = 'O', // 79
  145. CMD_META_DATA = 'P', // 80
  146. CMD_SYMLINK = 'Q', // 81
  147. CMD_SUBURL = 'R', // 82 Inform the slave about the url it is streaming on.
  148. CMD_MESSAGEBOXANSWER = 'S', // 83
  149. CMD_RESUMEANSWER = 'T', // 84
  150. CMD_CONFIG = 'U', // 85
  151. CMD_MULTI_GET = 'V', // 86
  152. CMD_LOCALURL = 'W' // 87
  153. // Add new ones here once a release is done, to avoid breaking binary compatibility.
  154. // Note that protocol-specific commands shouldn't be added here, but should use special.
  155. };
  156. /**
  157. * Error codes that can be emitted by KIO.
  158. */
  159. enum Error {
  160. ERR_CANNOT_OPEN_FOR_READING = 1,
  161. ERR_CANNOT_OPEN_FOR_WRITING = 2,
  162. ERR_CANNOT_LAUNCH_PROCESS = 3,
  163. ERR_INTERNAL = 4,
  164. ERR_MALFORMED_URL = 5,
  165. ERR_UNSUPPORTED_PROTOCOL = 6,
  166. ERR_NO_SOURCE_PROTOCOL = 7,
  167. ERR_UNSUPPORTED_ACTION = 8,
  168. ERR_IS_DIRECTORY = 9, // ... where a file was expected
  169. ERR_IS_FILE = 10, // ... where a directory was expected (e.g. listing)
  170. ERR_DOES_NOT_EXIST = 11,
  171. ERR_FILE_ALREADY_EXIST = 12,
  172. ERR_DIR_ALREADY_EXIST = 13,
  173. ERR_UNKNOWN_HOST = 14,
  174. ERR_ACCESS_DENIED = 15,
  175. ERR_WRITE_ACCESS_DENIED = 16,
  176. ERR_CANNOT_ENTER_DIRECTORY = 17,
  177. ERR_PROTOCOL_IS_NOT_A_FILESYSTEM = 18,
  178. ERR_CYCLIC_LINK = 19,
  179. ERR_USER_CANCELED = 20,
  180. ERR_CYCLIC_COPY = 21,
  181. ERR_COULD_NOT_CREATE_SOCKET = 22, // KDE4: s/COULD_NOT/CANNOT/ or the other way round
  182. ERR_COULD_NOT_CONNECT = 23,
  183. ERR_CONNECTION_BROKEN = 24,
  184. ERR_NOT_FILTER_PROTOCOL = 25,
  185. ERR_COULD_NOT_MOUNT = 26,
  186. ERR_COULD_NOT_UNMOUNT = 27,
  187. ERR_COULD_NOT_READ = 28,
  188. ERR_COULD_NOT_WRITE = 29,
  189. ERR_COULD_NOT_BIND = 30,
  190. ERR_COULD_NOT_LISTEN = 31,
  191. ERR_COULD_NOT_ACCEPT = 32,
  192. ERR_COULD_NOT_LOGIN = 33,
  193. ERR_COULD_NOT_STAT = 34,
  194. ERR_COULD_NOT_CLOSEDIR = 35,
  195. ERR_COULD_NOT_MKDIR = 37,
  196. ERR_COULD_NOT_RMDIR = 38,
  197. ERR_CANNOT_RESUME = 39,
  198. ERR_CANNOT_RENAME = 40,
  199. ERR_CANNOT_CHMOD = 41,
  200. ERR_CANNOT_DELETE = 42,
  201. // The text argument is the protocol that the dead slave supported.
  202. // This means for example: file, ftp, http, ...
  203. ERR_SLAVE_DIED = 43,
  204. ERR_OUT_OF_MEMORY = 44,
  205. ERR_UNKNOWN_PROXY_HOST = 45,
  206. ERR_COULD_NOT_AUTHENTICATE = 46,
  207. ERR_ABORTED = 47, // Action got aborted from application side
  208. ERR_INTERNAL_SERVER = 48,
  209. ERR_SERVER_TIMEOUT = 49,
  210. ERR_SERVICE_NOT_AVAILABLE = 50,
  211. ERR_UNKNOWN = 51,
  212. // (was a warning) ERR_CHECKSUM_MISMATCH = 52,
  213. ERR_UNKNOWN_INTERRUPT = 53,
  214. ERR_CANNOT_DELETE_ORIGINAL = 54,
  215. ERR_CANNOT_DELETE_PARTIAL = 55,
  216. ERR_CANNOT_RENAME_ORIGINAL = 56,
  217. ERR_CANNOT_RENAME_PARTIAL = 57,
  218. ERR_NEED_PASSWD = 58,
  219. ERR_CANNOT_SYMLINK = 59,
  220. ERR_NO_CONTENT = 60, // Action succeeded but no content will follow.
  221. ERR_DISK_FULL = 61,
  222. ERR_IDENTICAL_FILES = 62, // src==dest when moving/copying
  223. ERR_SLAVE_DEFINED = 63, // for slave specified errors that can be
  224. // rich text. Email links will be handled
  225. // by the standard email app and all hrefs
  226. // will be handled by the standard browser.
  227. // <a href="exec:/khelpcenter ?" will be
  228. // forked.
  229. ERR_UPGRADE_REQUIRED = 64, // A transport upgrade is required to access this
  230. // object. For instance, TLS is demanded by
  231. // the server in order to continue.
  232. ERR_POST_DENIED = 65, // Issued when trying to POST data to a certain Ports
  233. // see job.cpp
  234. ERR_OFFLINE_MODE = 66 // Used when an app is in offline mode and a
  235. // requested document is unavailable.
  236. };
  237. /**
  238. * Returns a translated error message for @p errorCode using the
  239. * additional error information provided by @p errorText.
  240. * @param errorCode the error code
  241. * @param errorText the additional error text
  242. * @return the created error string
  243. */
  244. TDEIO_EXPORT TQString buildErrorString(int errorCode, const TQString &errorText);
  245. /**
  246. * Returns a translated html error message for @p errorCode using the
  247. * additional error information provided by @p errorText , @p reqUrl
  248. * (the request URL), and the ioslave @p method .
  249. * @param errorCode the error code
  250. * @param errorText the additional error text
  251. * @param reqUrl the request URL
  252. * @param method the ioslave method
  253. * @return the created error string
  254. */
  255. TDEIO_EXPORT TQString buildHTMLErrorString(int errorCode, const TQString &errorText,
  256. const KURL *reqUrl = 0L, int method = -1 );
  257. /**
  258. * Returns translated error details for @p errorCode using the
  259. * additional error information provided by @p errorText , @p reqUrl
  260. * (the request URL), and the ioslave @p method .
  261. *
  262. * @param errorCode the error code
  263. * @param errorText the additional error text
  264. * @param reqUrl the request URL
  265. * @param method the ioslave method
  266. * @return the following data:
  267. * @li TQString errorName - the name of the error
  268. * @li TQString techName - if not null, the more technical name of the error
  269. * @li TQString description - a description of the error
  270. * @li TQStringList causes - a list of possible causes of the error
  271. * @li TQStringList solutions - a liso of solutions for the error
  272. */
  273. TDEIO_EXPORT TQByteArray rawErrorDetail(int errorCode, const TQString &errorText,
  274. const KURL *reqUrl = 0L, int method = -1 );
  275. /**
  276. * Returns an appropriate error message if the given command @p cmd
  277. * is an unsupported action (ERR_UNSUPPORTED_ACTION).
  278. * @param protocol name of the protocol
  279. * @param cmd given command
  280. * @see enum Command
  281. * @since 3.2
  282. */
  283. TDEIO_EXPORT TQString unsupportedActionErrorString(const TQString &protocol, int cmd);
  284. /**
  285. * Constants used to specify the type of a KUDSAtom.
  286. */
  287. enum UDSAtomTypes {
  288. /// First let's define the item types
  289. UDS_STRING = 1,
  290. UDS_LONG = 2,
  291. UDS_TIME = 4 | UDS_LONG,
  292. // To add new UDS entries below, you can use a step of 8
  293. // (i.e. 8, 16, 24, 32, etc.) Only the last 3 bits are a bitfield,
  294. // the rest isn't.
  295. /// Size of the file
  296. UDS_SIZE = 8 | UDS_LONG,
  297. UDS_SIZE_LARGE = 32768 | UDS_LONG, // For internal use only
  298. /// User ID of the file owner
  299. UDS_USER = 16 | UDS_STRING,
  300. /// Name of the icon, that should be used for displaying.
  301. /// It overrides all other detection mechanisms
  302. /// @since 3.2
  303. UDS_ICON_NAME = 24 | UDS_STRING,
  304. /// Group ID of the file owner
  305. UDS_GROUP = 32 | UDS_STRING,
  306. /// Extra data (used only if you specified Columns/ColumnsTypes)
  307. /// This is the only UDS entry that can be repeated.
  308. /// @since 3.2
  309. UDS_EXTRA = 48 | UDS_STRING,
  310. /// Filename - as displayed in directory listings etc.
  311. /// "." has the usual special meaning of "current directory"
  312. UDS_NAME = 64 | UDS_STRING,
  313. /// A local file path if the ioslave display files sitting
  314. /// on the local filesystem (but in another hierarchy, e.g. media:/)
  315. UDS_LOCAL_PATH = 72 | UDS_STRING,
  316. /// Treat the file as a hidden file or as a normal file,
  317. /// regardless of (the absence of) a leading dot in the filename.
  318. UDS_HIDDEN = 80 | UDS_LONG,
  319. /// Indicates that the entry has extended ACL entries
  320. /// @since 3.5
  321. UDS_EXTENDED_ACL = 88 | UDS_LONG,
  322. /// The access control list serialized into a single string.
  323. /// @since 3.5
  324. UDS_ACL_STRING = 96 | UDS_STRING,
  325. /// The default access control list serialized into a single string.
  326. /// Only available for directories.
  327. /// @since 3.5
  328. UDS_DEFAULT_ACL_STRING = 104 | UDS_STRING,
  329. // available: 112, 120
  330. /// Access permissions (part of the mode returned by stat)
  331. UDS_ACCESS = 128 | UDS_LONG,
  332. /// The last time the file was modified
  333. UDS_MODIFICATION_TIME = 256 | UDS_TIME,
  334. /// The last time the file was opened
  335. UDS_ACCESS_TIME = 512 | UDS_TIME,
  336. /// The time the file was created
  337. UDS_CREATION_TIME = 1024 | UDS_TIME,
  338. /// File type, part of the mode returned by stat
  339. /// (for a link, this returns the file type of the pointed item)
  340. /// check UDS_LINK_DEST to know if this is a link
  341. UDS_FILE_TYPE = 2048 | UDS_LONG,
  342. /// Name of the file where the link points to
  343. /// Allows to check for a symlink (don't use S_ISLNK !)
  344. UDS_LINK_DEST = 4096 | UDS_STRING,
  345. /// An alternative URL (If different from the caption)
  346. UDS_URL = 8192 | UDS_STRING,
  347. /// A mime type; prevents guessing
  348. UDS_MIME_TYPE = 16384 | UDS_STRING,
  349. /// A mime type to be used for displaying only.
  350. /// But when 'running' the file, the mimetype is re-determined
  351. UDS_GUESSED_MIME_TYPE = 16392 | UDS_STRING,
  352. /// XML properties, e.g. for WebDAV
  353. /// @since 3.1
  354. UDS_XML_PROPERTIES = 0x8000 | UDS_STRING
  355. };
  356. /**
  357. * Specifies how to use the cache.
  358. * @see parseCacheControl()
  359. * @see getCacheControlString()
  360. */
  361. enum CacheControl
  362. {
  363. CC_CacheOnly, ///< Fail request if not in cache
  364. CC_Cache, ///< Use cached entry if available
  365. CC_Verify, ///< Validate cached entry with remote site if expired
  366. CC_Refresh, ///< Always validate cached entry with remote site
  367. ///< @since 3.1
  368. CC_Reload ///< Always fetch from remote site.
  369. };
  370. /**
  371. * Parses the string representation of the cache control option.
  372. *
  373. * @param cacheControl the string representation
  374. * @return the cache control value
  375. * @see getCacheControlString()
  376. */
  377. TDEIO_EXPORT TDEIO::CacheControl parseCacheControl(const TQString &cacheControl);
  378. /**
  379. * Returns a string representation of the given cache control method.
  380. *
  381. * @param cacheControl the cache control method
  382. * @return the string representation
  383. * @see parseCacheControl()
  384. */
  385. TDEIO_EXPORT TQString getCacheControlString(TDEIO::CacheControl cacheControl);
  386. /**
  387. * Returns the mount point where @p device is mounted
  388. * right now. This means, it has to be mounted, not just
  389. * defined in fstab.
  390. */
  391. TDEIO_EXPORT TQString findDeviceMountPoint( const TQString& device );
  392. /**
  393. * Returns the mount point on which resides @p filename.
  394. * For instance if /home is a separate partition, findPathMountPoint("/home/user/blah")
  395. * will return /home
  396. * @param filename the file name to check
  397. * @return the mount point of the given @p filename
  398. */
  399. TDEIO_EXPORT TQString findPathMountPoint( const TQString & filename );
  400. /**
  401. * Checks if the path belongs to a filesystem that is probably
  402. * slow. It checks for NFS or for paths belonging to automounted
  403. * paths not yet mounted
  404. * @param filename the file name to check
  405. * @return true if the filesystem is probably slow
  406. */
  407. TDEIO_EXPORT bool probably_slow_mounted(const TQString& filename);
  408. /**
  409. * Checks if the path belongs to a filesystem that is manually
  410. * mounted.
  411. * @param filename the file name to check
  412. * @return true if the filesystem is manually mounted
  413. */
  414. TDEIO_EXPORT bool manually_mounted(const TQString& filename);
  415. enum FileSystemFlag { SupportsChmod, SupportsChown, SupportsUTime,
  416. SupportsSymlinks, CaseInsensitive };
  417. /**
  418. * Checks the capabilities of the filesystem to which a given file belongs.
  419. * given feature (e.g. chmod).
  420. * @param filename the file name to check
  421. * @param flag the flag to check
  422. * @return true if the filesystem has that flag, false if not (or some error occurred)
  423. *
  424. * The availables flags are:
  425. * @li SupportsChmod: returns true if the filesystem supports chmod
  426. * (e.g. msdos filesystems return false)
  427. * @li SupportsChown: returns true if the filesystem supports chown
  428. * (e.g. msdos filesystems return false)
  429. * @li SupportsUtime: returns true if the filesystems supports utime
  430. * (e.g. msdos filesystems return false)
  431. * @li SupportsSymlinks: returns true if the filesystems supports symlinks
  432. * (e.g. msdos filesystems return false)
  433. * @li CaseInsensitive: returns true if the filesystem treats
  434. * "foo" and "FOO" as being the same file (true for msdos systems)
  435. *
  436. */
  437. TDEIO_EXPORT bool testFileSystemFlag(const TQString& filename, FileSystemFlag flag);
  438. /************
  439. *
  440. * Universal Directory Service
  441. *
  442. * Any file or URL can be represented by the UDSEntry type below
  443. * A UDSEntry is a list of atoms
  444. * Each atom contains a specific bit of information for the file
  445. *
  446. * The following UDS constants represent the different possible values
  447. * for m_uds in the UDS atom structure below
  448. *
  449. * Each atom contains a specific bit of information for the file
  450. */
  451. class TDEIO_EXPORT UDSAtom
  452. {
  453. public:
  454. /**
  455. * Whether 'm_str' or 'm_long' is used depends on the value of 'm_uds'.
  456. */
  457. TQString m_str;
  458. /**
  459. * Whether 'm_str' or 'm_long' is used depends on the value of 'm_uds'.
  460. */
  461. long long m_long;
  462. /**
  463. * Holds one of the UDS_XXX constants
  464. */
  465. unsigned int m_uds;
  466. };
  467. /**
  468. * An entry is the list of atoms containing all the informations for a file or URL
  469. */
  470. typedef TQValueList<UDSAtom> UDSEntry;
  471. typedef TQValueList<UDSEntry> UDSEntryList;
  472. typedef TQValueListIterator<UDSEntry> UDSEntryListIterator;
  473. typedef TQValueListConstIterator<UDSEntry> UDSEntryListConstIterator;
  474. /**
  475. * MetaData is a simple map of key/value strings.
  476. */
  477. class TDEIO_EXPORT MetaData : public TQMap<TQString, TQString>
  478. {
  479. public:
  480. /**
  481. * Creates an empty meta data map.
  482. */
  483. MetaData() : TQMap<TQString, TQString>() { };
  484. /**
  485. * Copy constructor.
  486. */
  487. MetaData(const TQMap<TQString, TQString>&metaData) :
  488. TQMap<TQString, TQString>(metaData) { };
  489. /**
  490. * Adds the given meta data map to this map.
  491. * @param metaData the map to add
  492. * @return this map
  493. */
  494. MetaData & operator+= ( const TQMap<TQString,TQString> &metaData )
  495. {
  496. TQMap<TQString,TQString>::ConstIterator it;
  497. for( it = metaData.begin();
  498. it != metaData.end();
  499. ++it)
  500. {
  501. replace(it.key(), it.data());
  502. }
  503. return *this;
  504. }
  505. };
  506. }
  507. #endif