/src/gdal/port/cpl_conv.h
Line | Count | Source |
1 | | /****************************************************************************** |
2 | | * |
3 | | * Project: CPL - Common Portability Library |
4 | | * Purpose: Convenience functions declarations. |
5 | | * This is intended to remain light weight. |
6 | | * Author: Frank Warmerdam, warmerdam@pobox.com |
7 | | * |
8 | | ****************************************************************************** |
9 | | * Copyright (c) 1998, Frank Warmerdam |
10 | | * Copyright (c) 2007-2013, Even Rouault <even dot rouault at spatialys.com> |
11 | | * |
12 | | * SPDX-License-Identifier: MIT |
13 | | ****************************************************************************/ |
14 | | |
15 | | #ifndef CPL_CONV_H_INCLUDED |
16 | | #define CPL_CONV_H_INCLUDED |
17 | | |
18 | | #include "cpl_port.h" |
19 | | #include "cpl_vsi.h" |
20 | | #include "cpl_error.h" |
21 | | |
22 | | #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS) |
23 | | #include <charconv> |
24 | | #include <cstdint> |
25 | | #include <limits> |
26 | | #if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) |
27 | | #include <optional> |
28 | | #define HAVE_STRING_VIEW |
29 | | #include <string_view> |
30 | | #endif |
31 | | #endif |
32 | | |
33 | | /** |
34 | | * \file cpl_conv.h |
35 | | * |
36 | | * Various convenience functions for CPL. |
37 | | * |
38 | | */ |
39 | | |
40 | | /* -------------------------------------------------------------------- */ |
41 | | /* Runtime check of various configuration items. */ |
42 | | /* -------------------------------------------------------------------- */ |
43 | | CPL_C_START |
44 | | |
45 | | /*! @cond Doxygen_Suppress */ |
46 | | void CPL_DLL CPLVerifyConfiguration(void); |
47 | | /*! @endcond */ |
48 | | |
49 | | bool CPL_DLL CPLIsDebugEnabled(void); |
50 | | |
51 | | /** Special value to indicate setting the null value to a configuration option, |
52 | | * even if there is an environment variable defining it. |
53 | | * |
54 | | * @since 3.13 |
55 | | */ |
56 | 1.77M | #define CPL_NULL_VALUE "__CPL_NULL_VALUE__" |
57 | | |
58 | | const char CPL_DLL *CPL_STDCALL CPLGetConfigOption(const char *, const char *) |
59 | | CPL_WARN_UNUSED_RESULT; |
60 | | const char CPL_DLL *CPL_STDCALL CPLGetThreadLocalConfigOption( |
61 | | const char *, const char *) CPL_WARN_UNUSED_RESULT; |
62 | | const char CPL_DLL *CPL_STDCALL |
63 | | CPLGetGlobalConfigOption(const char *, const char *) CPL_WARN_UNUSED_RESULT; |
64 | | void CPL_DLL CPL_STDCALL CPLSetConfigOption(const char *, const char *); |
65 | | void CPL_DLL CPL_STDCALL CPLSetThreadLocalConfigOption(const char *pszKey, |
66 | | const char *pszValue); |
67 | | void CPL_DLL CPLDeclareKnownConfigOption(const char *pszKey, |
68 | | const char *pszDefinition); |
69 | | char CPL_DLL **CPLGetKnownConfigOptions(void); |
70 | | |
71 | | /** Callback for CPLSubscribeToSetConfigOption() */ |
72 | | typedef void (*CPLSetConfigOptionSubscriber)(const char *pszKey, |
73 | | const char *pszValue, |
74 | | bool bThreadLocal, |
75 | | void *pUserData); |
76 | | int CPL_DLL CPLSubscribeToSetConfigOption( |
77 | | CPLSetConfigOptionSubscriber pfnCallback, void *pUserData); |
78 | | void CPL_DLL CPLUnsubscribeToSetConfigOption(int nSubscriberId); |
79 | | |
80 | | /*! @cond Doxygen_Suppress */ |
81 | | void CPL_DLL CPL_STDCALL CPLFreeConfig(void); |
82 | | /*! @endcond */ |
83 | | char CPL_DLL **CPLGetConfigOptions(void); |
84 | | void CPL_DLL CPLSetConfigOptions(const char *const *papszConfigOptions); |
85 | | char CPL_DLL **CPLGetThreadLocalConfigOptions(void); |
86 | | void CPL_DLL |
87 | | CPLSetThreadLocalConfigOptions(const char *const *papszConfigOptions); |
88 | | void CPL_DLL CPLLoadConfigOptionsFromFile(const char *pszFilename, |
89 | | int bOverrideEnvVars); |
90 | | void CPL_DLL CPLLoadConfigOptionsFromPredefinedFiles(void); |
91 | | |
92 | | /* -------------------------------------------------------------------- */ |
93 | | /* Safe malloc() API. Thin cover over VSI functions with fatal */ |
94 | | /* error reporting if memory allocation fails. */ |
95 | | /* -------------------------------------------------------------------- */ |
96 | | void CPL_DLL *CPLMalloc(size_t) CPL_WARN_UNUSED_RESULT; |
97 | | void CPL_DLL *CPLCalloc(size_t, size_t) CPL_WARN_UNUSED_RESULT; |
98 | | void CPL_DLL *CPLRealloc(void *, size_t) CPL_WARN_UNUSED_RESULT; |
99 | | char CPL_DLL * |
100 | | CPLStrdup(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL; |
101 | | char CPL_DLL *CPLStrlwr(char *); |
102 | | |
103 | | /** Alias of VSIFree() */ |
104 | 2.11G | #define CPLFree VSIFree |
105 | | |
106 | | /* -------------------------------------------------------------------- */ |
107 | | /* Read a line from a text file, and strip of CR/LF. */ |
108 | | /* -------------------------------------------------------------------- */ |
109 | | char CPL_DLL *CPLFGets(char *, int, FILE *); |
110 | | const char CPL_DLL *CPLReadLine(FILE *); |
111 | | const char CPL_DLL *CPLReadLineL(VSILFILE *); |
112 | | const char CPL_DLL *CPLReadLine2L(VSILFILE *, int, CSLConstList); |
113 | | const char CPL_DLL *CPLReadLine3L(VSILFILE *, int, int *, CSLConstList); |
114 | | |
115 | | /* -------------------------------------------------------------------- */ |
116 | | /* Convert ASCII string to floating point number */ |
117 | | /* (THESE FUNCTIONS ARE NOT LOCALE AWARE!). */ |
118 | | /* -------------------------------------------------------------------- */ |
119 | | double CPL_DLL CPLAtof(const char *); |
120 | | double CPL_DLL CPLAtofDelim(const char *, char); |
121 | | double CPL_DLL CPLStrtod(const char *, char **); |
122 | | double CPL_DLL CPLStrtodM(const char *, char **); |
123 | | double CPL_DLL CPLStrtodDelim(const char *, char **, char); |
124 | | float CPL_DLL CPLStrtof(const char *, char **); |
125 | | float CPL_DLL CPLStrtofDelim(const char *, char **, char); |
126 | | |
127 | | #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS) |
128 | | extern "C++" |
129 | | { |
130 | | namespace cpl |
131 | | { |
132 | | #if defined(DOXYGEN_SKIP) || defined(HAVE_STRING_VIEW) |
133 | | double CPL_DLL strtod_delim(std::string_view, char **, char); |
134 | | #endif |
135 | | } // namespace cpl |
136 | | } |
137 | | #endif |
138 | | |
139 | | /* -------------------------------------------------------------------- */ |
140 | | /* Convert number to string. This function is locale agnostic */ |
141 | | /* (i.e. it will support "," or "." regardless of current locale) */ |
142 | | /* -------------------------------------------------------------------- */ |
143 | | double CPL_DLL CPLAtofM(const char *); |
144 | | |
145 | | /* -------------------------------------------------------------------- */ |
146 | | /* Read a numeric value from an ASCII character string. */ |
147 | | /* -------------------------------------------------------------------- */ |
148 | | char CPL_DLL *CPLScanString(const char *, int, int, int); |
149 | | double CPL_DLL CPLScanDouble(const char *, int); |
150 | | long CPL_DLL CPLScanLong(const char *, int); |
151 | | unsigned long CPL_DLL CPLScanULong(const char *, int); |
152 | | GUIntBig CPL_DLL CPLScanUIntBig(const char *, int); |
153 | | GIntBig CPL_DLL CPLAtoGIntBig(const char *pszString); |
154 | | GIntBig CPL_DLL CPLAtoGIntBigEx(const char *pszString, int bWarn, |
155 | | int *pbOverflow); |
156 | | void CPL_DLL *CPLScanPointer(const char *, int); |
157 | | |
158 | | /* -------------------------------------------------------------------- */ |
159 | | /* Print a value to an ASCII character string. */ |
160 | | /* -------------------------------------------------------------------- */ |
161 | | int CPL_DLL CPLPrintString(char *, const char *, int); |
162 | | int CPL_DLL CPLPrintStringFill(char *, const char *, int); |
163 | | int CPL_DLL CPLPrintInt32(char *, GInt32, int); |
164 | | int CPL_DLL CPLPrintUIntBig(char *, GUIntBig, int); |
165 | | int CPL_DLL CPLPrintDouble(char *, const char *, double, const char *); |
166 | | int CPL_DLL CPLPrintTime(char *, int, const char *, const struct tm *, |
167 | | const char *); |
168 | | int CPL_DLL CPLPrintPointer(char *, void *, int); |
169 | | |
170 | | #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS) |
171 | | extern "C++" |
172 | | { |
173 | | std::string CPL_DLL CPLFormatReadableFileSize(uint64_t nSizeInBytes); |
174 | | std::string CPL_DLL CPLFormatReadableFileSize(double dfSizeInBytes); |
175 | | } |
176 | | #endif |
177 | | |
178 | | /* -------------------------------------------------------------------- */ |
179 | | /* Fetch a function from DLL / so. */ |
180 | | /* -------------------------------------------------------------------- */ |
181 | | |
182 | | void CPL_DLL *CPLGetSymbol(const char *, const char *); |
183 | | |
184 | | /* -------------------------------------------------------------------- */ |
185 | | /* Fetch executable path. */ |
186 | | /* -------------------------------------------------------------------- */ |
187 | | int CPL_DLL CPLGetExecPath(char *pszPathBuf, int nMaxLength); |
188 | | |
189 | | /* -------------------------------------------------------------------- */ |
190 | | /* Filename handling functions. */ |
191 | | /* -------------------------------------------------------------------- */ |
192 | | |
193 | | #if defined(DOXYGEN_SKIP) || !defined(__cplusplus) || \ |
194 | | !defined(GDAL_COMPILATION) || \ |
195 | | (defined(__cplusplus) && defined(ALLOW_DEPRECATED_CPL_PATH_FUNCTIONS)) |
196 | | const char CPL_DLL * |
197 | | CPLGetPath(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL; |
198 | | const char CPL_DLL * |
199 | | CPLGetDirname(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL; |
200 | | const char CPL_DLL * |
201 | | CPLGetBasename(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL; |
202 | | const char CPL_DLL * |
203 | | CPLGetExtension(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL; |
204 | | const char CPL_DLL *CPLFormFilename( |
205 | | const char *pszPath, const char *pszBasename, |
206 | | const char *pszExtension) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL; |
207 | | const char CPL_DLL *CPLFormCIFilename( |
208 | | const char *pszPath, const char *pszBasename, |
209 | | const char *pszExtension) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL; |
210 | | const char CPL_DLL *CPLResetExtension(const char *, const char *) |
211 | | CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL; |
212 | | const char CPL_DLL *CPLProjectRelativeFilename(const char *pszProjectDir, |
213 | | const char *pszSecondaryFilename) |
214 | | CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL; |
215 | | const char CPL_DLL * |
216 | | CPLCleanTrailingSlash(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL; |
217 | | const char CPL_DLL *CPLGenerateTempFilename(const char *pszStem) |
218 | | CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL; |
219 | | const char CPL_DLL *CPLExpandTilde(const char *pszFilename) |
220 | | CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL; |
221 | | const char CPL_DLL * |
222 | | CPLLaunderForFilename(const char *pszName, |
223 | | const char *pszOutputPath) CPL_WARN_UNUSED_RESULT; |
224 | | #endif |
225 | | |
226 | | char CPL_DLL *CPLGetCurrentDir(void); |
227 | | const char CPL_DLL * |
228 | | CPLGetFilename(const char *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL; |
229 | | int CPL_DLL CPLIsFilenameRelative(const char *pszFilename); |
230 | | const char CPL_DLL *CPLExtractRelativePath(const char *, const char *, int *) |
231 | | CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL; |
232 | | char CPL_DLL ** |
233 | | CPLCorrespondingPaths(const char *pszOldFilename, const char *pszNewFilename, |
234 | | CSLConstList papszFileList) CPL_WARN_UNUSED_RESULT; |
235 | | int CPL_DLL CPLCheckForFile(char *pszFilename, CSLConstList papszSiblingList); |
236 | | |
237 | | const char CPL_DLL *CPLGetHomeDir(void) CPL_WARN_UNUSED_RESULT; |
238 | | |
239 | | #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS) |
240 | | |
241 | | extern "C++" |
242 | | { |
243 | | std::string CPL_DLL CPLGetPathSafe(const char *) CPL_WARN_UNUSED_RESULT; |
244 | | std::string CPL_DLL CPLGetDirnameSafe(const char *) CPL_WARN_UNUSED_RESULT; |
245 | | std::string CPL_DLL CPLGetBasenameSafe(const char *) CPL_WARN_UNUSED_RESULT; |
246 | | std::string CPL_DLL CPLGetExtensionSafe(const char *) |
247 | | CPL_WARN_UNUSED_RESULT; |
248 | | std::string CPL_DLL CPLFormFilenameSafe( |
249 | | const char *pszPath, const char *pszBasename, |
250 | | const char *pszExtension = nullptr) CPL_WARN_UNUSED_RESULT; |
251 | | std::string CPL_DLL CPLFormCIFilenameSafe( |
252 | | const char *pszPath, const char *pszBasename, |
253 | | const char *pszExtension = nullptr) CPL_WARN_UNUSED_RESULT; |
254 | | std::string CPL_DLL CPLResetExtensionSafe(const char *, const char *) |
255 | | CPL_WARN_UNUSED_RESULT; |
256 | | std::string CPL_DLL CPLProjectRelativeFilenameSafe( |
257 | | const char *pszProjectDir, |
258 | | const char *pszSecondaryFilename) CPL_WARN_UNUSED_RESULT; |
259 | | std::string CPL_DLL CPLCleanTrailingSlashSafe(const char *pszPath) |
260 | | CPL_WARN_UNUSED_RESULT; |
261 | | std::string CPL_DLL CPLGenerateTempFilenameSafe(const char *pszStem) |
262 | | CPL_WARN_UNUSED_RESULT; |
263 | | std::string CPL_DLL CPLExpandTildeSafe(const char *pszFilename) |
264 | | CPL_WARN_UNUSED_RESULT; |
265 | | std::string CPL_DLL CPLLaunderForFilenameSafe( |
266 | | const char *pszName, const char *pszOutputPath) CPL_WARN_UNUSED_RESULT; |
267 | | std::string CPL_DLL CPLLaunderForFilenameSafe( |
268 | | const std::string &osName, char chReplacementChar = '_', |
269 | | const char *pszExtraReservedCharacters = nullptr) |
270 | | CPL_WARN_UNUSED_RESULT; |
271 | | |
272 | | #ifdef HAVE_STRING_VIEW |
273 | | std::string |
274 | | CPL_DLL CPLLexicallyNormalize(std::string_view svPath, char sep1, |
275 | | char sep2 = 0) CPL_WARN_UNUSED_RESULT; |
276 | | #endif |
277 | | } |
278 | | |
279 | | #endif // defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS) |
280 | | |
281 | | bool CPL_DLL CPLHasPathTraversal(const char *pszFilename); |
282 | | bool CPL_DLL CPLHasUnbalancedPathTraversal(const char *pszFilename); |
283 | | |
284 | | /* -------------------------------------------------------------------- */ |
285 | | /* Find File Function */ |
286 | | /* -------------------------------------------------------------------- */ |
287 | | |
288 | | /** Callback for CPLPushFileFinder */ |
289 | | typedef char const *(*CPLFileFinder)(const char *, const char *); |
290 | | |
291 | | const char CPL_DLL *CPLFindFile(const char *pszClass, const char *pszBasename); |
292 | | const char CPL_DLL *CPLDefaultFindFile(const char *pszClass, |
293 | | const char *pszBasename); |
294 | | void CPL_DLL CPLPushFileFinder(CPLFileFinder pfnFinder); |
295 | | CPLFileFinder CPL_DLL CPLPopFileFinder(void); |
296 | | void CPL_DLL CPLPushFinderLocation(const char *); |
297 | | void CPL_DLL CPLPopFinderLocation(void); |
298 | | void CPL_DLL CPLFinderClean(void); |
299 | | |
300 | | /* -------------------------------------------------------------------- */ |
301 | | /* Safe version of stat() that works properly on stuff like "C:". */ |
302 | | /* -------------------------------------------------------------------- */ |
303 | | int CPL_DLL CPLStat(const char *, VSIStatBuf *) CPL_WARN_UNUSED_RESULT; |
304 | | |
305 | | /* -------------------------------------------------------------------- */ |
306 | | /* Reference counted file handle manager. Makes sharing file */ |
307 | | /* handles more practical. */ |
308 | | /* -------------------------------------------------------------------- */ |
309 | | |
310 | | /** Information on a shared file */ |
311 | | typedef struct |
312 | | { |
313 | | FILE *fp; /**< File pointer */ |
314 | | int nRefCount; /**< Reference counter */ |
315 | | int bLarge; /**< Whether fp must be interpreted as VSIFILE* */ |
316 | | char *pszFilename; /**< Filename */ |
317 | | char *pszAccess; /**< Access mode */ |
318 | | } CPLSharedFileInfo; |
319 | | |
320 | | FILE CPL_DLL *CPLOpenShared(const char *, const char *, int); |
321 | | void CPL_DLL CPLCloseShared(FILE *); |
322 | | CPLSharedFileInfo CPL_DLL *CPLGetSharedList(int *); |
323 | | void CPL_DLL CPLDumpSharedList(FILE *); |
324 | | /*! @cond Doxygen_Suppress */ |
325 | | void CPL_DLL CPLCleanupSharedFileMutex(void); |
326 | | /*! @endcond */ |
327 | | |
328 | | /* -------------------------------------------------------------------- */ |
329 | | /* DMS to Dec to DMS conversion. */ |
330 | | /* -------------------------------------------------------------------- */ |
331 | | double CPL_DLL CPLDMSToDec(const char *is); |
332 | | const char CPL_DLL *CPLDecToDMS(double dfAngle, const char *pszAxis, |
333 | | int nPrecision); |
334 | | double CPL_DLL CPLPackedDMSToDec(double); |
335 | | double CPL_DLL CPLDecToPackedDMS(double dfDec); |
336 | | |
337 | | CPLErr CPL_DLL CPLStringToComplex(const char *pszString, double *pdfReal, |
338 | | double *pdfImag); |
339 | | |
340 | | /* -------------------------------------------------------------------- */ |
341 | | /* Misc other functions. */ |
342 | | /* -------------------------------------------------------------------- */ |
343 | | int CPL_DLL CPLUnlinkTree(const char *); |
344 | | int CPL_DLL CPLCopyFile(const char *pszNewPath, const char *pszOldPath); |
345 | | int CPL_DLL CPLCopyTree(const char *pszNewPath, const char *pszOldPath); |
346 | | int CPL_DLL CPLMoveFile(const char *pszNewPath, const char *pszOldPath); |
347 | | int CPL_DLL CPLSymlink(const char *pszOldPath, const char *pszNewPath, |
348 | | CSLConstList papszOptions); |
349 | | int CPL_DLL CPLGetRemainingFileDescriptorCount(void); |
350 | | |
351 | | /* -------------------------------------------------------------------- */ |
352 | | /* Lock related functions. */ |
353 | | /* -------------------------------------------------------------------- */ |
354 | | |
355 | | /** Return code of CPLLockFileEx(). */ |
356 | | typedef enum |
357 | | { |
358 | | CLFS_OK, /**< CPLLockFileEx() succeeded. */ |
359 | | CLFS_CANNOT_CREATE_LOCK, /**< Lock file creation failed. */ |
360 | | CLFS_LOCK_BUSY, /**< Lock already taken (and still alive). */ |
361 | | CLFS_API_MISUSE, /**< API misuse. */ |
362 | | CLFS_THREAD_CREATION_FAILED, /**< Thread creation failed. */ |
363 | | } CPLLockFileStatus; |
364 | | |
365 | | /** Handle type returned by CPLLockFileEx(). */ |
366 | | typedef struct CPLLockFileStruct *CPLLockFileHandle; |
367 | | |
368 | | CPLLockFileStatus CPL_DLL CPLLockFileEx(const char *pszLockFileName, |
369 | | CPLLockFileHandle *phLockFileHandle, |
370 | | CSLConstList papszOptions); |
371 | | |
372 | | void CPL_DLL CPLUnlockFileEx(CPLLockFileHandle hLockFileHandle); |
373 | | |
374 | | /* -------------------------------------------------------------------- */ |
375 | | /* ZIP Creation. */ |
376 | | /* -------------------------------------------------------------------- */ |
377 | | |
378 | | /*! @cond Doxygen_Suppress */ |
379 | | #define CPL_ZIP_API_OFFERED |
380 | | /*! @endcond */ |
381 | | void CPL_DLL *CPLCreateZip(const char *pszZipFilename, char **papszOptions); |
382 | | CPLErr CPL_DLL CPLCreateFileInZip(void *hZip, const char *pszFilename, |
383 | | char **papszOptions); |
384 | | CPLErr CPL_DLL CPLWriteFileInZip(void *hZip, const void *pBuffer, |
385 | | int nBufferSize); |
386 | | CPLErr CPL_DLL CPLCloseFileInZip(void *hZip); |
387 | | CPLErr CPL_DLL CPLAddFileInZip(void *hZip, const char *pszArchiveFilename, |
388 | | const char *pszInputFilename, VSILFILE *fpInput, |
389 | | CSLConstList papszOptions, |
390 | | GDALProgressFunc pProgressFunc, |
391 | | void *pProgressData); |
392 | | CPLErr CPL_DLL CPLCloseZip(void *hZip); |
393 | | |
394 | | /* -------------------------------------------------------------------- */ |
395 | | /* ZLib compression */ |
396 | | /* -------------------------------------------------------------------- */ |
397 | | |
398 | | void CPL_DLL *CPLZLibDeflate(const void *ptr, size_t nBytes, int nLevel, |
399 | | void *outptr, size_t nOutAvailableBytes, |
400 | | size_t *pnOutBytes); |
401 | | void CPL_DLL *CPLZLibInflate(const void *ptr, size_t nBytes, void *outptr, |
402 | | size_t nOutAvailableBytes, size_t *pnOutBytes); |
403 | | void CPL_DLL *CPLZLibInflateEx(const void *ptr, size_t nBytes, void *outptr, |
404 | | size_t nOutAvailableBytes, |
405 | | bool bAllowResizeOutptr, size_t *pnOutBytes); |
406 | | |
407 | | /* -------------------------------------------------------------------- */ |
408 | | /* XML validation. */ |
409 | | /* -------------------------------------------------------------------- */ |
410 | | int CPL_DLL CPLValidateXML(const char *pszXMLFilename, |
411 | | const char *pszXSDFilename, |
412 | | CSLConstList papszOptions); |
413 | | |
414 | | /* -------------------------------------------------------------------- */ |
415 | | /* Locale handling. Prevents parallel executions of setlocale(). */ |
416 | | /* -------------------------------------------------------------------- */ |
417 | | char *CPLsetlocale(int category, const char *locale); |
418 | | /*! @cond Doxygen_Suppress */ |
419 | | void CPLCleanupSetlocaleMutex(void); |
420 | | /*! @endcond */ |
421 | | |
422 | | /*! |
423 | | CPLIsPowerOfTwo() |
424 | | @param i - tested number |
425 | | @return TRUE if i is power of two otherwise return FALSE |
426 | | */ |
427 | | int CPL_DLL CPLIsPowerOfTwo(unsigned int i); |
428 | | |
429 | | /* -------------------------------------------------------------------- */ |
430 | | /* Terminal related */ |
431 | | /* -------------------------------------------------------------------- */ |
432 | | |
433 | | bool CPL_DLL CPLIsInteractive(FILE *f); |
434 | | |
435 | | CPL_C_END |
436 | | |
437 | | /* -------------------------------------------------------------------- */ |
438 | | /* C++ object for temporarily forcing a LC_NUMERIC locale to "C". */ |
439 | | /* -------------------------------------------------------------------- */ |
440 | | |
441 | | //! @cond Doxygen_Suppress |
442 | | #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS) |
443 | | |
444 | | extern "C++" |
445 | | { |
446 | | class CPL_DLL CPLLocaleC |
447 | | { |
448 | | CPL_DISALLOW_COPY_ASSIGN(CPLLocaleC) |
449 | | public: |
450 | | CPLLocaleC(); |
451 | | ~CPLLocaleC(); |
452 | | |
453 | | private: |
454 | | char *pszOldLocale; |
455 | | }; |
456 | | |
457 | | // Does the same as CPLLocaleC except that, when available, it tries to |
458 | | // only affect the current thread. But code that would be dependent of |
459 | | // setlocale(LC_NUMERIC, NULL) returning "C", such as current proj.4 |
460 | | // versions, will not work depending on the actual implementation |
461 | | class CPLThreadLocaleCPrivate; |
462 | | |
463 | | class CPL_DLL CPLThreadLocaleC |
464 | | { |
465 | | CPL_DISALLOW_COPY_ASSIGN(CPLThreadLocaleC) |
466 | | |
467 | | public: |
468 | | CPLThreadLocaleC(); |
469 | | ~CPLThreadLocaleC(); |
470 | | |
471 | | private: |
472 | | CPLThreadLocaleCPrivate *m_private; |
473 | | }; |
474 | | } |
475 | | |
476 | | #endif /* def __cplusplus */ |
477 | | //! @endcond |
478 | | |
479 | | /* -------------------------------------------------------------------- */ |
480 | | /* C++ object for temporarily forcing a config option */ |
481 | | /* -------------------------------------------------------------------- */ |
482 | | |
483 | | //! @cond Doxygen_Suppress |
484 | | #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS) |
485 | | |
486 | | extern "C++" |
487 | | { |
488 | | class CPL_DLL CPLConfigOptionSetter |
489 | | { |
490 | | CPL_DISALLOW_COPY_ASSIGN(CPLConfigOptionSetter) |
491 | | public: |
492 | | CPLConfigOptionSetter(const char *pszKey, const char *pszValue, |
493 | | bool bSetOnlyIfUndefined); |
494 | | ~CPLConfigOptionSetter(); |
495 | | |
496 | | private: |
497 | | char *m_pszKey; |
498 | | char *m_pszOldValue; |
499 | | bool m_bRestoreOldValue; |
500 | | }; |
501 | | } |
502 | | |
503 | | #endif /* def __cplusplus */ |
504 | | //! @endcond |
505 | | |
506 | | #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS) |
507 | | |
508 | | extern "C++" |
509 | | { |
510 | | |
511 | | #ifndef DOXYGEN_SKIP |
512 | | #include <type_traits> // for std::is_base_of |
513 | | #endif |
514 | | |
515 | | namespace cpl |
516 | | { |
517 | | /** Use cpl::down_cast<Derived*>(pointer_to_base) as equivalent of |
518 | | * static_cast<Derived*>(pointer_to_base) with safe checking in debug |
519 | | * mode. |
520 | | * |
521 | | * Only works if no virtual inheritance is involved. |
522 | | * |
523 | | * @param f pointer to a base class |
524 | | * @return pointer to a derived class |
525 | | */ |
526 | | template <typename To, typename From> inline To down_cast(From *f) |
527 | 377M | { |
528 | 377M | static_assert( |
529 | 377M | (std::is_base_of<From, |
530 | 377M | typename std::remove_pointer<To>::type>::value), |
531 | 377M | "target type not derived from source type"); |
532 | 377M | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); |
533 | 377M | return static_cast<To>(f); |
534 | 377M | } OGRPoint* cpl::down_cast<OGRPoint*, OGRGeometry>(OGRGeometry*) Line | Count | Source | 527 | 151k | { | 528 | 151k | static_assert( | 529 | 151k | (std::is_base_of<From, | 530 | 151k | typename std::remove_pointer<To>::type>::value), | 531 | 151k | "target type not derived from source type"); | 532 | 151k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 151k | return static_cast<To>(f); | 534 | 151k | } |
OGRPoint const* cpl::down_cast<OGRPoint const*, OGRGeometry const>(OGRGeometry const*) Line | Count | Source | 527 | 202k | { | 528 | 202k | static_assert( | 529 | 202k | (std::is_base_of<From, | 530 | 202k | typename std::remove_pointer<To>::type>::value), | 531 | 202k | "target type not derived from source type"); | 532 | 202k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 202k | return static_cast<To>(f); | 534 | 202k | } |
OGRCurve* cpl::down_cast<OGRCurve*, OGRGeometry>(OGRGeometry*) Line | Count | Source | 527 | 521k | { | 528 | 521k | static_assert( | 529 | 521k | (std::is_base_of<From, | 530 | 521k | typename std::remove_pointer<To>::type>::value), | 531 | 521k | "target type not derived from source type"); | 532 | 521k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 521k | return static_cast<To>(f); | 534 | 521k | } |
OGRCurve const* cpl::down_cast<OGRCurve const*, OGRGeometry const>(OGRGeometry const*) Line | Count | Source | 527 | 5 | { | 528 | 5 | static_assert( | 529 | 5 | (std::is_base_of<From, | 530 | 5 | typename std::remove_pointer<To>::type>::value), | 531 | 5 | "target type not derived from source type"); | 532 | 5 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 5 | return static_cast<To>(f); | 534 | 5 | } |
OGRSimpleCurve* cpl::down_cast<OGRSimpleCurve*, OGRGeometry>(OGRGeometry*) Line | Count | Source | 527 | 984k | { | 528 | 984k | static_assert( | 529 | 984k | (std::is_base_of<From, | 530 | 984k | typename std::remove_pointer<To>::type>::value), | 531 | 984k | "target type not derived from source type"); | 532 | 984k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 984k | return static_cast<To>(f); | 534 | 984k | } |
OGRSimpleCurve const* cpl::down_cast<OGRSimpleCurve const*, OGRGeometry const>(OGRGeometry const*) Line | Count | Source | 527 | 476k | { | 528 | 476k | static_assert( | 529 | 476k | (std::is_base_of<From, | 530 | 476k | typename std::remove_pointer<To>::type>::value), | 531 | 476k | "target type not derived from source type"); | 532 | 476k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 476k | return static_cast<To>(f); | 534 | 476k | } |
OGRLineString* cpl::down_cast<OGRLineString*, OGRGeometry>(OGRGeometry*) Line | Count | Source | 527 | 365k | { | 528 | 365k | static_assert( | 529 | 365k | (std::is_base_of<From, | 530 | 365k | typename std::remove_pointer<To>::type>::value), | 531 | 365k | "target type not derived from source type"); | 532 | 365k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 365k | return static_cast<To>(f); | 534 | 365k | } |
OGRLineString const* cpl::down_cast<OGRLineString const*, OGRGeometry const>(OGRGeometry const*) Line | Count | Source | 527 | 4.44M | { | 528 | 4.44M | static_assert( | 529 | 4.44M | (std::is_base_of<From, | 530 | 4.44M | typename std::remove_pointer<To>::type>::value), | 531 | 4.44M | "target type not derived from source type"); | 532 | 4.44M | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 4.44M | return static_cast<To>(f); | 534 | 4.44M | } |
OGRLinearRing* cpl::down_cast<OGRLinearRing*, OGRGeometry>(OGRGeometry*) Line | Count | Source | 527 | 3.99M | { | 528 | 3.99M | static_assert( | 529 | 3.99M | (std::is_base_of<From, | 530 | 3.99M | typename std::remove_pointer<To>::type>::value), | 531 | 3.99M | "target type not derived from source type"); | 532 | 3.99M | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 3.99M | return static_cast<To>(f); | 534 | 3.99M | } |
OGRLinearRing const* cpl::down_cast<OGRLinearRing const*, OGRGeometry const>(OGRGeometry const*) Line | Count | Source | 527 | 172M | { | 528 | 172M | static_assert( | 529 | 172M | (std::is_base_of<From, | 530 | 172M | typename std::remove_pointer<To>::type>::value), | 531 | 172M | "target type not derived from source type"); | 532 | 172M | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 172M | return static_cast<To>(f); | 534 | 172M | } |
Unexecuted instantiation: OGRCircularString* cpl::down_cast<OGRCircularString*, OGRGeometry>(OGRGeometry*) OGRCircularString const* cpl::down_cast<OGRCircularString const*, OGRGeometry const>(OGRGeometry const*) Line | Count | Source | 527 | 271k | { | 528 | 271k | static_assert( | 529 | 271k | (std::is_base_of<From, | 530 | 271k | typename std::remove_pointer<To>::type>::value), | 531 | 271k | "target type not derived from source type"); | 532 | 271k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 271k | return static_cast<To>(f); | 534 | 271k | } |
OGRCompoundCurve* cpl::down_cast<OGRCompoundCurve*, OGRGeometry>(OGRGeometry*) Line | Count | Source | 527 | 59.3k | { | 528 | 59.3k | static_assert( | 529 | 59.3k | (std::is_base_of<From, | 530 | 59.3k | typename std::remove_pointer<To>::type>::value), | 531 | 59.3k | "target type not derived from source type"); | 532 | 59.3k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 59.3k | return static_cast<To>(f); | 534 | 59.3k | } |
OGRCompoundCurve const* cpl::down_cast<OGRCompoundCurve const*, OGRGeometry const>(OGRGeometry const*) Line | Count | Source | 527 | 21.3k | { | 528 | 21.3k | static_assert( | 529 | 21.3k | (std::is_base_of<From, | 530 | 21.3k | typename std::remove_pointer<To>::type>::value), | 531 | 21.3k | "target type not derived from source type"); | 532 | 21.3k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 21.3k | return static_cast<To>(f); | 534 | 21.3k | } |
OGRSurface* cpl::down_cast<OGRSurface*, OGRGeometry>(OGRGeometry*) Line | Count | Source | 527 | 7.40k | { | 528 | 7.40k | static_assert( | 529 | 7.40k | (std::is_base_of<From, | 530 | 7.40k | typename std::remove_pointer<To>::type>::value), | 531 | 7.40k | "target type not derived from source type"); | 532 | 7.40k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 7.40k | return static_cast<To>(f); | 534 | 7.40k | } |
Unexecuted instantiation: OGRSurface const* cpl::down_cast<OGRSurface const*, OGRGeometry const>(OGRGeometry const*) OGRPolygon* cpl::down_cast<OGRPolygon*, OGRGeometry>(OGRGeometry*) Line | Count | Source | 527 | 151k | { | 528 | 151k | static_assert( | 529 | 151k | (std::is_base_of<From, | 530 | 151k | typename std::remove_pointer<To>::type>::value), | 531 | 151k | "target type not derived from source type"); | 532 | 151k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 151k | return static_cast<To>(f); | 534 | 151k | } |
OGRPolygon const* cpl::down_cast<OGRPolygon const*, OGRGeometry const>(OGRGeometry const*) Line | Count | Source | 527 | 101k | { | 528 | 101k | static_assert( | 529 | 101k | (std::is_base_of<From, | 530 | 101k | typename std::remove_pointer<To>::type>::value), | 531 | 101k | "target type not derived from source type"); | 532 | 101k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 101k | return static_cast<To>(f); | 534 | 101k | } |
OGRTriangle* cpl::down_cast<OGRTriangle*, OGRGeometry>(OGRGeometry*) Line | Count | Source | 527 | 434 | { | 528 | 434 | static_assert( | 529 | 434 | (std::is_base_of<From, | 530 | 434 | typename std::remove_pointer<To>::type>::value), | 531 | 434 | "target type not derived from source type"); | 532 | 434 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 434 | return static_cast<To>(f); | 534 | 434 | } |
Unexecuted instantiation: OGRTriangle const* cpl::down_cast<OGRTriangle const*, OGRGeometry const>(OGRGeometry const*) OGRCurvePolygon* cpl::down_cast<OGRCurvePolygon*, OGRGeometry>(OGRGeometry*) Line | Count | Source | 527 | 1.18M | { | 528 | 1.18M | static_assert( | 529 | 1.18M | (std::is_base_of<From, | 530 | 1.18M | typename std::remove_pointer<To>::type>::value), | 531 | 1.18M | "target type not derived from source type"); | 532 | 1.18M | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 1.18M | return static_cast<To>(f); | 534 | 1.18M | } |
OGRCurvePolygon const* cpl::down_cast<OGRCurvePolygon const*, OGRGeometry const>(OGRGeometry const*) Line | Count | Source | 527 | 77.1k | { | 528 | 77.1k | static_assert( | 529 | 77.1k | (std::is_base_of<From, | 530 | 77.1k | typename std::remove_pointer<To>::type>::value), | 531 | 77.1k | "target type not derived from source type"); | 532 | 77.1k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 77.1k | return static_cast<To>(f); | 534 | 77.1k | } |
OGRGeometryCollection* cpl::down_cast<OGRGeometryCollection*, OGRGeometry>(OGRGeometry*) Line | Count | Source | 527 | 674k | { | 528 | 674k | static_assert( | 529 | 674k | (std::is_base_of<From, | 530 | 674k | typename std::remove_pointer<To>::type>::value), | 531 | 674k | "target type not derived from source type"); | 532 | 674k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 674k | return static_cast<To>(f); | 534 | 674k | } |
OGRGeometryCollection const* cpl::down_cast<OGRGeometryCollection const*, OGRGeometry const>(OGRGeometry const*) Line | Count | Source | 527 | 386k | { | 528 | 386k | static_assert( | 529 | 386k | (std::is_base_of<From, | 530 | 386k | typename std::remove_pointer<To>::type>::value), | 531 | 386k | "target type not derived from source type"); | 532 | 386k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 386k | return static_cast<To>(f); | 534 | 386k | } |
Unexecuted instantiation: OGRMultiPoint* cpl::down_cast<OGRMultiPoint*, OGRGeometry>(OGRGeometry*) OGRMultiPoint const* cpl::down_cast<OGRMultiPoint const*, OGRGeometry const>(OGRGeometry const*) Line | Count | Source | 527 | 20.7k | { | 528 | 20.7k | static_assert( | 529 | 20.7k | (std::is_base_of<From, | 530 | 20.7k | typename std::remove_pointer<To>::type>::value), | 531 | 20.7k | "target type not derived from source type"); | 532 | 20.7k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 20.7k | return static_cast<To>(f); | 534 | 20.7k | } |
OGRMultiLineString* cpl::down_cast<OGRMultiLineString*, OGRGeometry>(OGRGeometry*) Line | Count | Source | 527 | 56.3k | { | 528 | 56.3k | static_assert( | 529 | 56.3k | (std::is_base_of<From, | 530 | 56.3k | typename std::remove_pointer<To>::type>::value), | 531 | 56.3k | "target type not derived from source type"); | 532 | 56.3k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 56.3k | return static_cast<To>(f); | 534 | 56.3k | } |
OGRMultiLineString const* cpl::down_cast<OGRMultiLineString const*, OGRGeometry const>(OGRGeometry const*) Line | Count | Source | 527 | 20.1k | { | 528 | 20.1k | static_assert( | 529 | 20.1k | (std::is_base_of<From, | 530 | 20.1k | typename std::remove_pointer<To>::type>::value), | 531 | 20.1k | "target type not derived from source type"); | 532 | 20.1k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 20.1k | return static_cast<To>(f); | 534 | 20.1k | } |
OGRMultiPolygon* cpl::down_cast<OGRMultiPolygon*, OGRGeometry>(OGRGeometry*) Line | Count | Source | 527 | 43.7k | { | 528 | 43.7k | static_assert( | 529 | 43.7k | (std::is_base_of<From, | 530 | 43.7k | typename std::remove_pointer<To>::type>::value), | 531 | 43.7k | "target type not derived from source type"); | 532 | 43.7k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 43.7k | return static_cast<To>(f); | 534 | 43.7k | } |
OGRMultiPolygon const* cpl::down_cast<OGRMultiPolygon const*, OGRGeometry const>(OGRGeometry const*) Line | Count | Source | 527 | 8.13k | { | 528 | 8.13k | static_assert( | 529 | 8.13k | (std::is_base_of<From, | 530 | 8.13k | typename std::remove_pointer<To>::type>::value), | 531 | 8.13k | "target type not derived from source type"); | 532 | 8.13k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 8.13k | return static_cast<To>(f); | 534 | 8.13k | } |
OGRMultiCurve* cpl::down_cast<OGRMultiCurve*, OGRGeometry>(OGRGeometry*) Line | Count | Source | 527 | 41.0k | { | 528 | 41.0k | static_assert( | 529 | 41.0k | (std::is_base_of<From, | 530 | 41.0k | typename std::remove_pointer<To>::type>::value), | 531 | 41.0k | "target type not derived from source type"); | 532 | 41.0k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 41.0k | return static_cast<To>(f); | 534 | 41.0k | } |
OGRMultiCurve const* cpl::down_cast<OGRMultiCurve const*, OGRGeometry const>(OGRGeometry const*) Line | Count | Source | 527 | 1.42k | { | 528 | 1.42k | static_assert( | 529 | 1.42k | (std::is_base_of<From, | 530 | 1.42k | typename std::remove_pointer<To>::type>::value), | 531 | 1.42k | "target type not derived from source type"); | 532 | 1.42k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 1.42k | return static_cast<To>(f); | 534 | 1.42k | } |
OGRMultiSurface* cpl::down_cast<OGRMultiSurface*, OGRGeometry>(OGRGeometry*) Line | Count | Source | 527 | 1.13k | { | 528 | 1.13k | static_assert( | 529 | 1.13k | (std::is_base_of<From, | 530 | 1.13k | typename std::remove_pointer<To>::type>::value), | 531 | 1.13k | "target type not derived from source type"); | 532 | 1.13k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 1.13k | return static_cast<To>(f); | 534 | 1.13k | } |
Unexecuted instantiation: OGRMultiSurface const* cpl::down_cast<OGRMultiSurface const*, OGRGeometry const>(OGRGeometry const*) OGRPolyhedralSurface* cpl::down_cast<OGRPolyhedralSurface*, OGRGeometry>(OGRGeometry*) Line | Count | Source | 527 | 954 | { | 528 | 954 | static_assert( | 529 | 954 | (std::is_base_of<From, | 530 | 954 | typename std::remove_pointer<To>::type>::value), | 531 | 954 | "target type not derived from source type"); | 532 | 954 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 954 | return static_cast<To>(f); | 534 | 954 | } |
OGRPolyhedralSurface const* cpl::down_cast<OGRPolyhedralSurface const*, OGRGeometry const>(OGRGeometry const*) Line | Count | Source | 527 | 8.38k | { | 528 | 8.38k | static_assert( | 529 | 8.38k | (std::is_base_of<From, | 530 | 8.38k | typename std::remove_pointer<To>::type>::value), | 531 | 8.38k | "target type not derived from source type"); | 532 | 8.38k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 8.38k | return static_cast<To>(f); | 534 | 8.38k | } |
Unexecuted instantiation: OGRTriangulatedSurface* cpl::down_cast<OGRTriangulatedSurface*, OGRGeometry>(OGRGeometry*) Unexecuted instantiation: OGRTriangulatedSurface const* cpl::down_cast<OGRTriangulatedSurface const*, OGRGeometry const>(OGRGeometry const*) OGRSimpleCurve* cpl::down_cast<OGRSimpleCurve*, OGRCurve>(OGRCurve*) Line | Count | Source | 527 | 332k | { | 528 | 332k | static_assert( | 529 | 332k | (std::is_base_of<From, | 530 | 332k | typename std::remove_pointer<To>::type>::value), | 531 | 332k | "target type not derived from source type"); | 532 | 332k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 332k | return static_cast<To>(f); | 534 | 332k | } |
Unexecuted instantiation: OGRSimpleCurve const* cpl::down_cast<OGRSimpleCurve const*, OGRCurve const>(OGRCurve const*) Unexecuted instantiation: cpl::VSIADLSFSHandler* cpl::down_cast<cpl::VSIADLSFSHandler*, cpl::VSICurlFilesystemHandlerBase>(cpl::VSICurlFilesystemHandlerBase*) Unexecuted instantiation: cpl::VSIAzureFSHandler* cpl::down_cast<cpl::VSIAzureFSHandler*, cpl::VSICurlFilesystemHandlerBase>(cpl::VSICurlFilesystemHandlerBase*) VSIGZipFilesystemHandler* cpl::down_cast<VSIGZipFilesystemHandler*, VSIFilesystemHandler>(VSIFilesystemHandler*) Line | Count | Source | 527 | 669 | { | 528 | 669 | static_assert( | 529 | 669 | (std::is_base_of<From, | 530 | 669 | typename std::remove_pointer<To>::type>::value), | 531 | 669 | "target type not derived from source type"); | 532 | 669 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 669 | return static_cast<To>(f); | 534 | 669 | } |
VSIZipReader* cpl::down_cast<VSIZipReader*, VSIArchiveReader>(VSIArchiveReader*) Line | Count | Source | 527 | 6.49k | { | 528 | 6.49k | static_assert( | 529 | 6.49k | (std::is_base_of<From, | 530 | 6.49k | typename std::remove_pointer<To>::type>::value), | 531 | 6.49k | "target type not derived from source type"); | 532 | 6.49k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 6.49k | return static_cast<To>(f); | 534 | 6.49k | } |
VSIZipWriteHandle* cpl::down_cast<VSIZipWriteHandle*, VSIVirtualHandle>(VSIVirtualHandle*) Line | Count | Source | 527 | 225 | { | 528 | 225 | static_assert( | 529 | 225 | (std::is_base_of<From, | 530 | 225 | typename std::remove_pointer<To>::type>::value), | 531 | 225 | "target type not derived from source type"); | 532 | 225 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 225 | return static_cast<To>(f); | 534 | 225 | } |
Unexecuted instantiation: OGRCodedFieldDomain* cpl::down_cast<OGRCodedFieldDomain*, OGRFieldDomain>(OGRFieldDomain*) Unexecuted instantiation: OGRStylePen* cpl::down_cast<OGRStylePen*, OGRStyleTool>(OGRStyleTool*) GMLReader* cpl::down_cast<GMLReader*, IGMLReader>(IGMLReader*) Line | Count | Source | 527 | 4.73k | { | 528 | 4.73k | static_assert( | 529 | 4.73k | (std::is_base_of<From, | 530 | 4.73k | typename std::remove_pointer<To>::type>::value), | 531 | 4.73k | "target type not derived from source type"); | 532 | 4.73k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 4.73k | return static_cast<To>(f); | 534 | 4.73k | } |
OGRPGDumpGeomFieldDefn const* cpl::down_cast<OGRPGDumpGeomFieldDefn const*, OGRGeomFieldDefn const>(OGRGeomFieldDefn const*) Line | Count | Source | 527 | 8.56k | { | 528 | 8.56k | static_assert( | 529 | 8.56k | (std::is_base_of<From, | 530 | 8.56k | typename std::remove_pointer<To>::type>::value), | 531 | 8.56k | "target type not derived from source type"); | 532 | 8.56k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 8.56k | return static_cast<To>(f); | 534 | 8.56k | } |
OpenFileGDB::FileGDBGeomField* cpl::down_cast<OpenFileGDB::FileGDBGeomField*, OpenFileGDB::FileGDBField>(OpenFileGDB::FileGDBField*) Line | Count | Source | 527 | 204k | { | 528 | 204k | static_assert( | 529 | 204k | (std::is_base_of<From, | 530 | 204k | typename std::remove_pointer<To>::type>::value), | 531 | 204k | "target type not derived from source type"); | 532 | 204k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 204k | return static_cast<To>(f); | 534 | 204k | } |
OGROpenFileGDBGeomFieldDefn* cpl::down_cast<OGROpenFileGDBGeomFieldDefn*, OGRGeomFieldDefn>(OGRGeomFieldDefn*) Line | Count | Source | 527 | 14.6k | { | 528 | 14.6k | static_assert( | 529 | 14.6k | (std::is_base_of<From, | 530 | 14.6k | typename std::remove_pointer<To>::type>::value), | 531 | 14.6k | "target type not derived from source type"); | 532 | 14.6k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 14.6k | return static_cast<To>(f); | 534 | 14.6k | } |
OpenFileGDB::FileGDBGeomField const* cpl::down_cast<OpenFileGDB::FileGDBGeomField const*, OpenFileGDB::FileGDBField>(OpenFileGDB::FileGDBField*) Line | Count | Source | 527 | 4.29k | { | 528 | 4.29k | static_assert( | 529 | 4.29k | (std::is_base_of<From, | 530 | 4.29k | typename std::remove_pointer<To>::type>::value), | 531 | 4.29k | "target type not derived from source type"); | 532 | 4.29k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 4.29k | return static_cast<To>(f); | 534 | 4.29k | } |
Unexecuted instantiation: OGRStyleBrush* cpl::down_cast<OGRStyleBrush*, OGRStyleTool>(OGRStyleTool*) OGRSQLiteGeomFieldDefn* cpl::down_cast<OGRSQLiteGeomFieldDefn*, OGRGeomFieldDefn>(OGRGeomFieldDefn*) Line | Count | Source | 527 | 1.08M | { | 528 | 1.08M | static_assert( | 529 | 1.08M | (std::is_base_of<From, | 530 | 1.08M | typename std::remove_pointer<To>::type>::value), | 531 | 1.08M | "target type not derived from source type"); | 532 | 1.08M | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 1.08M | return static_cast<To>(f); | 534 | 1.08M | } |
Unexecuted instantiation: OGRSQLiteGeomFieldDefn const* cpl::down_cast<OGRSQLiteGeomFieldDefn const*, OGRGeomFieldDefn const>(OGRGeomFieldDefn const*) Unexecuted instantiation: GDALGPKGMBTilesLikeRasterBand* cpl::down_cast<GDALGPKGMBTilesLikeRasterBand*, GDALRasterBand>(GDALRasterBand*) GDALGeoPackageDataset* cpl::down_cast<GDALGeoPackageDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 85 | { | 528 | 85 | static_assert( | 529 | 85 | (std::is_base_of<From, | 530 | 85 | typename std::remove_pointer<To>::type>::value), | 531 | 85 | "target type not derived from source type"); | 532 | 85 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 85 | return static_cast<To>(f); | 534 | 85 | } |
GDALGeoPackageRasterBand* cpl::down_cast<GDALGeoPackageRasterBand*, GDALRasterBand>(GDALRasterBand*) Line | Count | Source | 527 | 21 | { | 528 | 21 | static_assert( | 529 | 21 | (std::is_base_of<From, | 530 | 21 | typename std::remove_pointer<To>::type>::value), | 531 | 21 | "target type not derived from source type"); | 532 | 21 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 21 | return static_cast<To>(f); | 534 | 21 | } |
Unexecuted instantiation: OGRPMTilesDataset* cpl::down_cast<OGRPMTilesDataset*, GDALDataset>(GDALDataset*) OGRILI1Layer* cpl::down_cast<OGRILI1Layer*, OGRLayer>(OGRLayer*) Line | Count | Source | 527 | 1.36k | { | 528 | 1.36k | static_assert( | 529 | 1.36k | (std::is_base_of<From, | 530 | 1.36k | typename std::remove_pointer<To>::type>::value), | 531 | 1.36k | "target type not derived from source type"); | 532 | 1.36k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 1.36k | return static_cast<To>(f); | 534 | 1.36k | } |
Unexecuted instantiation: GDALInConstructionAlgorithmArg* cpl::down_cast<GDALInConstructionAlgorithmArg*, GDALAlgorithmArg>(GDALAlgorithmArg*) GDALPamRasterBand* cpl::down_cast<GDALPamRasterBand*, GDALRasterBand>(GDALRasterBand*) Line | Count | Source | 527 | 34.3M | { | 528 | 34.3M | static_assert( | 529 | 34.3M | (std::is_base_of<From, | 530 | 34.3M | typename std::remove_pointer<To>::type>::value), | 531 | 34.3M | "target type not derived from source type"); | 532 | 34.3M | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 34.3M | return static_cast<To>(f); | 534 | 34.3M | } |
GDALProxyPoolDataset* cpl::down_cast<GDALProxyPoolDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 197k | { | 528 | 197k | static_assert( | 529 | 197k | (std::is_base_of<From, | 530 | 197k | typename std::remove_pointer<To>::type>::value), | 531 | 197k | "target type not derived from source type"); | 532 | 197k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 197k | return static_cast<To>(f); | 534 | 197k | } |
Unexecuted instantiation: GDALOverviewBand* cpl::down_cast<GDALOverviewBand*, GDALRasterBand>(GDALRasterBand*) Unexecuted instantiation: GDALOverviewDataset* cpl::down_cast<GDALOverviewDataset*, GDALDataset>(GDALDataset*) VRTSourcedRasterBand* cpl::down_cast<VRTSourcedRasterBand*, GDALRasterBand>(GDALRasterBand*) Line | Count | Source | 527 | 353k | { | 528 | 353k | static_assert( | 529 | 353k | (std::is_base_of<From, | 530 | 353k | typename std::remove_pointer<To>::type>::value), | 531 | 353k | "target type not derived from source type"); | 532 | 353k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 353k | return static_cast<To>(f); | 534 | 353k | } |
Unexecuted instantiation: GDALDatasetFromArray* cpl::down_cast<GDALDatasetFromArray*, GDALDataset>(GDALDataset*) Unexecuted instantiation: GDALMDArrayResampledDataset* cpl::down_cast<GDALMDArrayResampledDataset*, GDALDataset>(GDALDataset*) Unexecuted instantiation: VRTDerivedRasterBand* cpl::down_cast<VRTDerivedRasterBand*, GDALRasterBand>(GDALRasterBand*) VRTComplexSource* cpl::down_cast<VRTComplexSource*, VRTSimpleSource>(VRTSimpleSource*) Line | Count | Source | 527 | 12.9k | { | 528 | 12.9k | static_assert( | 529 | 12.9k | (std::is_base_of<From, | 530 | 12.9k | typename std::remove_pointer<To>::type>::value), | 531 | 12.9k | "target type not derived from source type"); | 532 | 12.9k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 12.9k | return static_cast<To>(f); | 534 | 12.9k | } |
Unexecuted instantiation: gdalalg_raster_tile.cpp:(anonymous namespace)::MosaicDataset* cpl::down_cast<(anonymous namespace)::MosaicDataset*, GDALDataset>(GDALDataset*) Unexecuted instantiation: OGRLineString const* cpl::down_cast<OGRLineString const*, OGRCurve>(OGRCurve*) OGRCurvePolygon const* cpl::down_cast<OGRCurvePolygon const*, OGRCurvePolygon>(OGRCurvePolygon*) Line | Count | Source | 527 | 43.1k | { | 528 | 43.1k | static_assert( | 529 | 43.1k | (std::is_base_of<From, | 530 | 43.1k | typename std::remove_pointer<To>::type>::value), | 531 | 43.1k | "target type not derived from source type"); | 532 | 43.1k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 43.1k | return static_cast<To>(f); | 534 | 43.1k | } |
Unexecuted instantiation: OGRPolygon const* cpl::down_cast<OGRPolygon const*, OGRCurvePolygon>(OGRCurvePolygon*) Unexecuted instantiation: OGRLinearRing* cpl::down_cast<OGRLinearRing*, OGRCurve>(OGRCurve*) GTiffDataset* cpl::down_cast<GTiffDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 116 | { | 528 | 116 | static_assert( | 529 | 116 | (std::is_base_of<From, | 530 | 116 | typename std::remove_pointer<To>::type>::value), | 531 | 116 | "target type not derived from source type"); | 532 | 116 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 116 | return static_cast<To>(f); | 534 | 116 | } |
GTiffRasterBand* cpl::down_cast<GTiffRasterBand*, GDALRasterBand>(GDALRasterBand*) Line | Count | Source | 527 | 123M | { | 528 | 123M | static_assert( | 529 | 123M | (std::is_base_of<From, | 530 | 123M | typename std::remove_pointer<To>::type>::value), | 531 | 123M | "target type not derived from source type"); | 532 | 123M | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 123M | return static_cast<To>(f); | 534 | 123M | } |
GTiffJPEGOverviewDS* cpl::down_cast<GTiffJPEGOverviewDS*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 398 | { | 528 | 398 | static_assert( | 529 | 398 | (std::is_base_of<From, | 530 | 398 | typename std::remove_pointer<To>::type>::value), | 531 | 398 | "target type not derived from source type"); | 532 | 398 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 398 | return static_cast<To>(f); | 534 | 398 | } |
GTiffOddBitsBand* cpl::down_cast<GTiffOddBitsBand*, GDALRasterBand>(GDALRasterBand*) Line | Count | Source | 527 | 40.4k | { | 528 | 40.4k | static_assert( | 529 | 40.4k | (std::is_base_of<From, | 530 | 40.4k | typename std::remove_pointer<To>::type>::value), | 531 | 40.4k | "target type not derived from source type"); | 532 | 40.4k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 40.4k | return static_cast<To>(f); | 534 | 40.4k | } |
MEMRasterBand* cpl::down_cast<MEMRasterBand*, GDALRasterBand>(GDALRasterBand*) Line | Count | Source | 527 | 1.15k | { | 528 | 1.15k | static_assert( | 529 | 1.15k | (std::is_base_of<From, | 530 | 1.15k | typename std::remove_pointer<To>::type>::value), | 531 | 1.15k | "target type not derived from source type"); | 532 | 1.15k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 1.15k | return static_cast<To>(f); | 534 | 1.15k | } |
VRTDataset* cpl::down_cast<VRTDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 1.98M | { | 528 | 1.98M | static_assert( | 529 | 1.98M | (std::is_base_of<From, | 530 | 1.98M | typename std::remove_pointer<To>::type>::value), | 531 | 1.98M | "target type not derived from source type"); | 532 | 1.98M | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 1.98M | return static_cast<To>(f); | 534 | 1.98M | } |
VRTSimpleSource* cpl::down_cast<VRTSimpleSource*, VRTSource>(VRTSource*) Line | Count | Source | 527 | 395k | { | 528 | 395k | static_assert( | 529 | 395k | (std::is_base_of<From, | 530 | 395k | typename std::remove_pointer<To>::type>::value), | 531 | 395k | "target type not derived from source type"); | 532 | 395k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 395k | return static_cast<To>(f); | 534 | 395k | } |
Unexecuted instantiation: GDALProxyPoolRasterBand* cpl::down_cast<GDALProxyPoolRasterBand*, GDALRasterBand>(GDALRasterBand*) VRTRasterBand* cpl::down_cast<VRTRasterBand*, GDALRasterBand>(GDALRasterBand*) Line | Count | Source | 527 | 350k | { | 528 | 350k | static_assert( | 529 | 350k | (std::is_base_of<From, | 530 | 350k | typename std::remove_pointer<To>::type>::value), | 531 | 350k | "target type not derived from source type"); | 532 | 350k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 350k | return static_cast<To>(f); | 534 | 350k | } |
VRTSourcedRasterBand* cpl::down_cast<VRTSourcedRasterBand*, VRTRasterBand>(VRTRasterBand*) Line | Count | Source | 527 | 1 | { | 528 | 1 | static_assert( | 529 | 1 | (std::is_base_of<From, | 530 | 1 | typename std::remove_pointer<To>::type>::value), | 531 | 1 | "target type not derived from source type"); | 532 | 1 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 1 | return static_cast<To>(f); | 534 | 1 | } |
Unexecuted instantiation: VRTProcessedDataset* cpl::down_cast<VRTProcessedDataset*, GDALDataset>(GDALDataset*) Unexecuted instantiation: GDALTileIndexBand* cpl::down_cast<GDALTileIndexBand*, GDALRasterBand>(GDALRasterBand*) TABText* cpl::down_cast<TABText*, TABFeature>(TABFeature*) Line | Count | Source | 527 | 79.3k | { | 528 | 79.3k | static_assert( | 529 | 79.3k | (std::is_base_of<From, | 530 | 79.3k | typename std::remove_pointer<To>::type>::value), | 531 | 79.3k | "target type not derived from source type"); | 532 | 79.3k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 79.3k | return static_cast<To>(f); | 534 | 79.3k | } |
Unexecuted instantiation: TABPoint* cpl::down_cast<TABPoint*, TABFeature>(TABFeature*) Unexecuted instantiation: TABRegion* cpl::down_cast<TABRegion*, TABFeature>(TABFeature*) TABPolyline* cpl::down_cast<TABPolyline*, TABFeature>(TABFeature*) Line | Count | Source | 527 | 1 | { | 528 | 1 | static_assert( | 529 | 1 | (std::is_base_of<From, | 530 | 1 | typename std::remove_pointer<To>::type>::value), | 531 | 1 | "target type not derived from source type"); | 532 | 1 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 1 | return static_cast<To>(f); | 534 | 1 | } |
Unexecuted instantiation: TABFeature* cpl::down_cast<TABFeature*, OGRFeature>(OGRFeature*) Unexecuted instantiation: OGRShapeLayer* cpl::down_cast<OGRShapeLayer*, OGRLayer>(OGRLayer*) Unexecuted instantiation: OGRShapeGeomFieldDefn* cpl::down_cast<OGRShapeGeomFieldDefn*, OGRGeomFieldDefn>(OGRGeomFieldDefn*) Unexecuted instantiation: OGRShapeGeomFieldDefn const* cpl::down_cast<OGRShapeGeomFieldDefn const*, OGRGeomFieldDefn>(OGRGeomFieldDefn*) Unexecuted instantiation: OGRProxiedLayer* cpl::down_cast<OGRProxiedLayer*, OGRLayer>(OGRLayer*) Unexecuted instantiation: OGRVRTLayer* cpl::down_cast<OGRVRTLayer*, OGRLayer>(OGRLayer*) Unexecuted instantiation: OGRVRTDataSource* cpl::down_cast<OGRVRTDataSource*, GDALDataset>(GDALDataset*) Unexecuted instantiation: OGRCSVEditableLayerSynchronizer* cpl::down_cast<OGRCSVEditableLayerSynchronizer*, IOGREditableLayerSynchronizer>(IOGREditableLayerSynchronizer*) Unexecuted instantiation: OGRDXFLayer* cpl::down_cast<OGRDXFLayer*, OGRLayer>(OGRLayer*) Unexecuted instantiation: OGRStyleSymbol* cpl::down_cast<OGRStyleSymbol*, OGRStyleTool>(OGRStyleTool*) Unexecuted instantiation: OGRStyleLabel* cpl::down_cast<OGRStyleLabel*, OGRStyleTool>(OGRStyleTool*) OpenFileGDB::FileGDBRasterField const* cpl::down_cast<OpenFileGDB::FileGDBRasterField const*, OpenFileGDB::FileGDBField>(OpenFileGDB::FileGDBField*) Line | Count | Source | 527 | 639k | { | 528 | 639k | static_assert( | 529 | 639k | (std::is_base_of<From, | 530 | 639k | typename std::remove_pointer<To>::type>::value), | 531 | 639k | "target type not derived from source type"); | 532 | 639k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 639k | return static_cast<To>(f); | 534 | 639k | } |
OpenFileGDB::FileGDBOGRLineString* cpl::down_cast<OpenFileGDB::FileGDBOGRLineString*, OGRLineString>(OGRLineString*) Line | Count | Source | 527 | 18.3k | { | 528 | 18.3k | static_assert( | 529 | 18.3k | (std::is_base_of<From, | 530 | 18.3k | typename std::remove_pointer<To>::type>::value), | 531 | 18.3k | "target type not derived from source type"); | 532 | 18.3k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 18.3k | return static_cast<To>(f); | 534 | 18.3k | } |
OpenFileGDB::FileGDBGeomField const* cpl::down_cast<OpenFileGDB::FileGDBGeomField const*, OpenFileGDB::FileGDBField const>(OpenFileGDB::FileGDBField const*) Line | Count | Source | 527 | 4.99k | { | 528 | 4.99k | static_assert( | 529 | 4.99k | (std::is_base_of<From, | 530 | 4.99k | typename std::remove_pointer<To>::type>::value), | 531 | 4.99k | "target type not derived from source type"); | 532 | 4.99k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 4.99k | return static_cast<To>(f); | 534 | 4.99k | } |
OGROpenFileGDBGroup* cpl::down_cast<OGROpenFileGDBGroup*, GDALGroup>(GDALGroup*) Line | Count | Source | 527 | 10.0k | { | 528 | 10.0k | static_assert( | 529 | 10.0k | (std::is_base_of<From, | 530 | 10.0k | typename std::remove_pointer<To>::type>::value), | 531 | 10.0k | "target type not derived from source type"); | 532 | 10.0k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 10.0k | return static_cast<To>(f); | 534 | 10.0k | } |
Unexecuted instantiation: OGRCodedFieldDomain const* cpl::down_cast<OGRCodedFieldDomain const*, OGRFieldDomain const>(OGRFieldDomain const*) Unexecuted instantiation: OGRRangeFieldDomain const* cpl::down_cast<OGRRangeFieldDomain const*, OGRFieldDomain const>(OGRFieldDomain const*) Unexecuted instantiation: GDALOpenFileGDBRasterBand* cpl::down_cast<GDALOpenFileGDBRasterBand*, GDALRasterBand>(GDALRasterBand*) Unexecuted instantiation: OGROpenFileGDBDataSource* cpl::down_cast<OGROpenFileGDBDataSource*, GDALDataset>(GDALDataset*) OGRJSONFGStreamedLayer* cpl::down_cast<OGRJSONFGStreamedLayer*, OGRLayer>(OGRLayer*) Line | Count | Source | 527 | 15 | { | 528 | 15 | static_assert( | 529 | 15 | (std::is_base_of<From, | 530 | 15 | typename std::remove_pointer<To>::type>::value), | 531 | 15 | "target type not derived from source type"); | 532 | 15 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 15 | return static_cast<To>(f); | 534 | 15 | } |
Unexecuted instantiation: OGRWFSLayer* cpl::down_cast<OGRWFSLayer*, OGRLayer>(OGRLayer*) OGRSQLiteTableLayer* cpl::down_cast<OGRSQLiteTableLayer*, OGRSQLiteLayer>(OGRSQLiteLayer*) Line | Count | Source | 527 | 2.17M | { | 528 | 2.17M | static_assert( | 529 | 2.17M | (std::is_base_of<From, | 530 | 2.17M | typename std::remove_pointer<To>::type>::value), | 531 | 2.17M | "target type not derived from source type"); | 532 | 2.17M | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 2.17M | return static_cast<To>(f); | 534 | 2.17M | } |
OGRSQLiteLayer* cpl::down_cast<OGRSQLiteLayer*, OGRLayer>(OGRLayer*) Line | Count | Source | 527 | 19 | { | 528 | 19 | static_assert( | 529 | 19 | (std::is_base_of<From, | 530 | 19 | typename std::remove_pointer<To>::type>::value), | 531 | 19 | "target type not derived from source type"); | 532 | 19 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 19 | return static_cast<To>(f); | 534 | 19 | } |
Unexecuted instantiation: OGRGeoPackageLayer* cpl::down_cast<OGRGeoPackageLayer*, OGRLayer>(OGRLayer*) Unexecuted instantiation: OGRGeoPackageTableLayer* cpl::down_cast<OGRGeoPackageTableLayer*, OGRLayer>(OGRLayer*) Unexecuted instantiation: OGRCodedFieldDomain const* cpl::down_cast<OGRCodedFieldDomain const*, OGRFieldDomain>(OGRFieldDomain*) Unexecuted instantiation: OGRRangeFieldDomain const* cpl::down_cast<OGRRangeFieldDomain const*, OGRFieldDomain>(OGRFieldDomain*) Unexecuted instantiation: OGRGlobFieldDomain const* cpl::down_cast<OGRGlobFieldDomain const*, OGRFieldDomain>(OGRFieldDomain*) Unexecuted instantiation: VFKFeature* cpl::down_cast<VFKFeature*, IVFKFeature>(IVFKFeature*) Unexecuted instantiation: VFKDataBlock* cpl::down_cast<VFKDataBlock*, IVFKDataBlock>(IVFKDataBlock*) VFKDataBlockSQLite* cpl::down_cast<VFKDataBlockSQLite*, IVFKDataBlock>(IVFKDataBlock*) Line | Count | Source | 527 | 16.4k | { | 528 | 16.4k | static_assert( | 529 | 16.4k | (std::is_base_of<From, | 530 | 16.4k | typename std::remove_pointer<To>::type>::value), | 531 | 16.4k | "target type not derived from source type"); | 532 | 16.4k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 16.4k | return static_cast<To>(f); | 534 | 16.4k | } |
VFKDataBlockSQLite* cpl::down_cast<VFKDataBlockSQLite*, VFKDataBlockSQLite>(VFKDataBlockSQLite*) Line | Count | Source | 527 | 927 | { | 528 | 927 | static_assert( | 529 | 927 | (std::is_base_of<From, | 530 | 927 | typename std::remove_pointer<To>::type>::value), | 531 | 927 | "target type not derived from source type"); | 532 | 927 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 927 | return static_cast<To>(f); | 534 | 927 | } |
VFKReaderSQLite* cpl::down_cast<VFKReaderSQLite*, IVFKReader>(IVFKReader*) Line | Count | Source | 527 | 54.8k | { | 528 | 54.8k | static_assert( | 529 | 54.8k | (std::is_base_of<From, | 530 | 54.8k | typename std::remove_pointer<To>::type>::value), | 531 | 54.8k | "target type not derived from source type"); | 532 | 54.8k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 54.8k | return static_cast<To>(f); | 534 | 54.8k | } |
Unexecuted instantiation: OGRAmigoCloudGeomFieldDefn* cpl::down_cast<OGRAmigoCloudGeomFieldDefn*, OGRGeomFieldDefn>(OGRGeomFieldDefn*) Unexecuted instantiation: OGRCartoGeomFieldDefn* cpl::down_cast<OGRCartoGeomFieldDefn*, OGRGeomFieldDefn>(OGRGeomFieldDefn*) OGRILI2Layer* cpl::down_cast<OGRILI2Layer*, OGRLayer>(OGRLayer*) Line | Count | Source | 527 | 18.0k | { | 528 | 18.0k | static_assert( | 529 | 18.0k | (std::is_base_of<From, | 530 | 18.0k | typename std::remove_pointer<To>::type>::value), | 531 | 18.0k | "target type not derived from source type"); | 532 | 18.0k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 18.0k | return static_cast<To>(f); | 534 | 18.0k | } |
Unexecuted instantiation: CADPoint3D* cpl::down_cast<CADPoint3D*, CADGeometry>(CADGeometry*) Unexecuted instantiation: CADLine* cpl::down_cast<CADLine*, CADGeometry>(CADGeometry*) Unexecuted instantiation: CADSolid* cpl::down_cast<CADSolid*, CADGeometry>(CADGeometry*) Unexecuted instantiation: CADCircle* cpl::down_cast<CADCircle*, CADGeometry>(CADGeometry*) Unexecuted instantiation: CADArc* cpl::down_cast<CADArc*, CADGeometry>(CADGeometry*) Unexecuted instantiation: CADFace3D* cpl::down_cast<CADFace3D*, CADGeometry>(CADGeometry*) Unexecuted instantiation: CADLWPolyline* cpl::down_cast<CADLWPolyline*, CADGeometry>(CADGeometry*) Unexecuted instantiation: CADPolyline3D* cpl::down_cast<CADPolyline3D*, CADGeometry>(CADGeometry*) Unexecuted instantiation: CADText* cpl::down_cast<CADText*, CADGeometry>(CADGeometry*) Unexecuted instantiation: CADMText* cpl::down_cast<CADMText*, CADGeometry>(CADGeometry*) Unexecuted instantiation: CADSpline* cpl::down_cast<CADSpline*, CADGeometry>(CADGeometry*) Unexecuted instantiation: CADEllipse* cpl::down_cast<CADEllipse*, CADGeometry>(CADGeometry*) Unexecuted instantiation: CADAttdef* cpl::down_cast<CADAttdef*, CADGeometry>(CADGeometry*) Unexecuted instantiation: OGRGenSQLGeomFieldDefn const* cpl::down_cast<OGRGenSQLGeomFieldDefn const*, OGRGeomFieldDefn const>(OGRGeomFieldDefn const*) Unexecuted instantiation: OGRUnionLayerGeomFieldDefn* cpl::down_cast<OGRUnionLayerGeomFieldDefn*, OGRGeomFieldDefn>(OGRGeomFieldDefn*) Unexecuted instantiation: GDALComputedDataset* cpl::down_cast<GDALComputedDataset*, GDALDataset>(GDALDataset*) RawRasterBand* cpl::down_cast<RawRasterBand*, GDALRasterBand>(GDALRasterBand*) Line | Count | Source | 527 | 2.46M | { | 528 | 2.46M | static_assert( | 529 | 2.46M | (std::is_base_of<From, | 530 | 2.46M | typename std::remove_pointer<To>::type>::value), | 531 | 2.46M | "target type not derived from source type"); | 532 | 2.46M | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 2.46M | return static_cast<To>(f); | 534 | 2.46M | } |
Unexecuted instantiation: OGRGlobFieldDomain const* cpl::down_cast<OGRGlobFieldDomain const*, OGRFieldDomain const>(OGRFieldDomain const*) Unexecuted instantiation: GDALColorReliefDataset* cpl::down_cast<GDALColorReliefDataset*, GDALDataset>(GDALDataset*) Unexecuted instantiation: GDALGeneric3x3Dataset<int>* cpl::down_cast<GDALGeneric3x3Dataset<int>*, GDALDataset>(GDALDataset*) Unexecuted instantiation: GDALGeneric3x3Dataset<float>* cpl::down_cast<GDALGeneric3x3Dataset<float>*, GDALDataset>(GDALDataset*) Unexecuted instantiation: GDALPipelineStepAlgorithm* cpl::down_cast<GDALPipelineStepAlgorithm*, GDALAlgorithm>(GDALAlgorithm*) Unexecuted instantiation: GDALApplyVSGRasterBand* cpl::down_cast<GDALApplyVSGRasterBand*, GDALRasterBand>(GDALRasterBand*) Unexecuted instantiation: GDALApplyVSGDataset* cpl::down_cast<GDALApplyVSGDataset*, GDALDataset>(GDALDataset*) JPGDatasetCommon* cpl::down_cast<JPGDatasetCommon*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 512 | { | 528 | 512 | static_assert( | 529 | 512 | (std::is_base_of<From, | 530 | 512 | typename std::remove_pointer<To>::type>::value), | 531 | 512 | "target type not derived from source type"); | 532 | 512 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 512 | return static_cast<To>(f); | 534 | 512 | } |
LIBERTIFFDataset* cpl::down_cast<LIBERTIFFDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 385k | { | 528 | 385k | static_assert( | 529 | 385k | (std::is_base_of<From, | 530 | 385k | typename std::remove_pointer<To>::type>::value), | 531 | 385k | "target type not derived from source type"); | 532 | 385k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 385k | return static_cast<To>(f); | 534 | 385k | } |
LIBERTIFFBand* cpl::down_cast<LIBERTIFFBand*, GDALRasterBand>(GDALRasterBand*) Line | Count | Source | 527 | 377k | { | 528 | 377k | static_assert( | 529 | 377k | (std::is_base_of<From, | 530 | 377k | typename std::remove_pointer<To>::type>::value), | 531 | 377k | "target type not derived from source type"); | 532 | 377k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 377k | return static_cast<To>(f); | 534 | 377k | } |
HFADataset* cpl::down_cast<HFADataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 9.76k | { | 528 | 9.76k | static_assert( | 529 | 9.76k | (std::is_base_of<From, | 530 | 9.76k | typename std::remove_pointer<To>::type>::value), | 531 | 9.76k | "target type not derived from source type"); | 532 | 9.76k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 9.76k | return static_cast<To>(f); | 534 | 9.76k | } |
GDALPamDataset* cpl::down_cast<GDALPamDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 60 | { | 528 | 60 | static_assert( | 529 | 60 | (std::is_base_of<From, | 530 | 60 | typename std::remove_pointer<To>::type>::value), | 531 | 60 | "target type not derived from source type"); | 532 | 60 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 60 | return static_cast<To>(f); | 534 | 60 | } |
Unexecuted instantiation: RPFTOCProxyRasterDataSet* cpl::down_cast<RPFTOCProxyRasterDataSet*, GDALDataset>(GDALDataset*) Unexecuted instantiation: RPFTOCSubDataset* cpl::down_cast<RPFTOCSubDataset*, RPFTOCSubDataset>(RPFTOCSubDataset*) NITFDataset* cpl::down_cast<NITFDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 2.09k | { | 528 | 2.09k | static_assert( | 529 | 2.09k | (std::is_base_of<From, | 530 | 2.09k | typename std::remove_pointer<To>::type>::value), | 531 | 2.09k | "target type not derived from source type"); | 532 | 2.09k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 2.09k | return static_cast<To>(f); | 534 | 2.09k | } |
GXFDataset* cpl::down_cast<GXFDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 28 | { | 528 | 28 | static_assert( | 529 | 28 | (std::is_base_of<From, | 530 | 28 | typename std::remove_pointer<To>::type>::value), | 531 | 28 | "target type not derived from source type"); | 532 | 28 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 28 | return static_cast<To>(f); | 534 | 28 | } |
CEOSDataset* cpl::down_cast<CEOSDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 20 | { | 528 | 20 | static_assert( | 529 | 20 | (std::is_base_of<From, | 530 | 20 | typename std::remove_pointer<To>::type>::value), | 531 | 20 | "target type not derived from source type"); | 532 | 20 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 20 | return static_cast<To>(f); | 534 | 20 | } |
Unexecuted instantiation: SAR_CEOSDataset* cpl::down_cast<SAR_CEOSDataset*, GDALDataset>(GDALDataset*) DTEDDataset* cpl::down_cast<DTEDDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 3.47k | { | 528 | 3.47k | static_assert( | 529 | 3.47k | (std::is_base_of<From, | 530 | 3.47k | typename std::remove_pointer<To>::type>::value), | 531 | 3.47k | "target type not derived from source type"); | 532 | 3.47k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 3.47k | return static_cast<To>(f); | 534 | 3.47k | } |
JDEMDataset* cpl::down_cast<JDEMDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 1 | { | 528 | 1 | static_assert( | 529 | 1 | (std::is_base_of<From, | 530 | 1 | typename std::remove_pointer<To>::type>::value), | 531 | 1 | "target type not derived from source type"); | 532 | 1 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 1 | return static_cast<To>(f); | 534 | 1 | } |
L1BDataset* cpl::down_cast<L1BDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 44.3k | { | 528 | 44.3k | static_assert( | 529 | 44.3k | (std::is_base_of<From, | 530 | 44.3k | typename std::remove_pointer<To>::type>::value), | 531 | 44.3k | "target type not derived from source type"); | 532 | 44.3k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 44.3k | return static_cast<To>(f); | 534 | 44.3k | } |
Unexecuted instantiation: L1BGeolocDataset* cpl::down_cast<L1BGeolocDataset*, GDALDataset>(GDALDataset*) Unexecuted instantiation: L1BSolarZenithAnglesDataset* cpl::down_cast<L1BSolarZenithAnglesDataset*, GDALDataset>(GDALDataset*) Unexecuted instantiation: L1BNOAA15AnglesDataset* cpl::down_cast<L1BNOAA15AnglesDataset*, GDALDataset>(GDALDataset*) Unexecuted instantiation: L1BCloudsDataset* cpl::down_cast<L1BCloudsDataset*, GDALDataset>(GDALDataset*) GDAL::ILWISDataset* cpl::down_cast<GDAL::ILWISDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 5.45k | { | 528 | 5.45k | static_assert( | 529 | 5.45k | (std::is_base_of<From, | 530 | 5.45k | typename std::remove_pointer<To>::type>::value), | 531 | 5.45k | "target type not derived from source type"); | 532 | 5.45k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 5.45k | return static_cast<To>(f); | 534 | 5.45k | } |
GDAL::ILWISRasterBand* cpl::down_cast<GDAL::ILWISRasterBand*, GDALRasterBand>(GDALRasterBand*) Line | Count | Source | 527 | 5.37k | { | 528 | 5.37k | static_assert( | 529 | 5.37k | (std::is_base_of<From, | 530 | 5.37k | typename std::remove_pointer<To>::type>::value), | 531 | 5.37k | "target type not derived from source type"); | 532 | 5.37k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 5.37k | return static_cast<To>(f); | 534 | 5.37k | } |
RMFDataset* cpl::down_cast<RMFDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 154k | { | 528 | 154k | static_assert( | 529 | 154k | (std::is_base_of<From, | 530 | 154k | typename std::remove_pointer<To>::type>::value), | 531 | 154k | "target type not derived from source type"); | 532 | 154k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 154k | return static_cast<To>(f); | 534 | 154k | } |
LevellerDataset* cpl::down_cast<LevellerDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 130 | { | 528 | 130 | static_assert( | 529 | 130 | (std::is_base_of<From, | 530 | 130 | typename std::remove_pointer<To>::type>::value), | 531 | 130 | "target type not derived from source type"); | 532 | 130 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 130 | return static_cast<To>(f); | 534 | 130 | } |
Unexecuted instantiation: SRTMHGTDataset* cpl::down_cast<SRTMHGTDataset*, GDALDataset>(GDALDataset*) Unexecuted instantiation: IdrisiRasterBand* cpl::down_cast<IdrisiRasterBand*, GDALRasterBand>(GDALRasterBand*) Unexecuted instantiation: IdrisiDataset* cpl::down_cast<IdrisiDataset*, GDALDataset>(GDALDataset*) GS7BGDataset* cpl::down_cast<GS7BGDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 24 | { | 528 | 24 | static_assert( | 529 | 24 | (std::is_base_of<From, | 530 | 24 | typename std::remove_pointer<To>::type>::value), | 531 | 24 | "target type not derived from source type"); | 532 | 24 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 24 | return static_cast<To>(f); | 534 | 24 | } |
GS7BGRasterBand const* cpl::down_cast<GS7BGRasterBand const*, GDALRasterBand const>(GDALRasterBand const*) Line | Count | Source | 527 | 1 | { | 528 | 1 | static_assert( | 529 | 1 | (std::is_base_of<From, | 530 | 1 | typename std::remove_pointer<To>::type>::value), | 531 | 1 | "target type not derived from source type"); | 532 | 1 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 1 | return static_cast<To>(f); | 534 | 1 | } |
Unexecuted instantiation: GS7BGRasterBand* cpl::down_cast<GS7BGRasterBand*, GDALRasterBand>(GDALRasterBand*) GSAGDataset* cpl::down_cast<GSAGDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 84.8k | { | 528 | 84.8k | static_assert( | 529 | 84.8k | (std::is_base_of<From, | 530 | 84.8k | typename std::remove_pointer<To>::type>::value), | 531 | 84.8k | "target type not derived from source type"); | 532 | 84.8k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 84.8k | return static_cast<To>(f); | 534 | 84.8k | } |
GSAGRasterBand const* cpl::down_cast<GSAGRasterBand const*, GDALRasterBand const>(GDALRasterBand const*) Line | Count | Source | 527 | 541 | { | 528 | 541 | static_assert( | 529 | 541 | (std::is_base_of<From, | 530 | 541 | typename std::remove_pointer<To>::type>::value), | 531 | 541 | "target type not derived from source type"); | 532 | 541 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 541 | return static_cast<To>(f); | 534 | 541 | } |
Unexecuted instantiation: GSAGRasterBand* cpl::down_cast<GSAGRasterBand*, GDALRasterBand>(GDALRasterBand*) GSBGDataset* cpl::down_cast<GSBGDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 14 | { | 528 | 14 | static_assert( | 529 | 14 | (std::is_base_of<From, | 530 | 14 | typename std::remove_pointer<To>::type>::value), | 531 | 14 | "target type not derived from source type"); | 532 | 14 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 14 | return static_cast<To>(f); | 534 | 14 | } |
GSBGRasterBand const* cpl::down_cast<GSBGRasterBand const*, GDALRasterBand const>(GDALRasterBand const*) Line | Count | Source | 527 | 24 | { | 528 | 24 | static_assert( | 529 | 24 | (std::is_base_of<From, | 530 | 24 | typename std::remove_pointer<To>::type>::value), | 531 | 24 | "target type not derived from source type"); | 532 | 24 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 24 | return static_cast<To>(f); | 534 | 24 | } |
Unexecuted instantiation: GSBGRasterBand* cpl::down_cast<GSBGRasterBand*, GDALRasterBand>(GDALRasterBand*) ERSDataset* cpl::down_cast<ERSDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 4 | { | 528 | 4 | static_assert( | 529 | 4 | (std::is_base_of<From, | 530 | 4 | typename std::remove_pointer<To>::type>::value), | 531 | 4 | "target type not derived from source type"); | 532 | 4 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 4 | return static_cast<To>(f); | 534 | 4 | } |
Unexecuted instantiation: DIMAPRasterBand* cpl::down_cast<DIMAPRasterBand*, GDALRasterBand>(GDALRasterBand*) GFFDataset* cpl::down_cast<GFFDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 2.75k | { | 528 | 2.75k | static_assert( | 529 | 2.75k | (std::is_base_of<From, | 530 | 2.75k | typename std::remove_pointer<To>::type>::value), | 531 | 2.75k | "target type not derived from source type"); | 532 | 2.75k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 2.75k | return static_cast<To>(f); | 534 | 2.75k | } |
Unexecuted instantiation: COSARDataset* cpl::down_cast<COSARDataset*, COSARDataset>(COSARDataset*) Unexecuted instantiation: COSARDataset* cpl::down_cast<COSARDataset*, GDALDataset>(GDALDataset*) ISIS3Dataset* cpl::down_cast<ISIS3Dataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 31 | { | 528 | 31 | static_assert( | 529 | 31 | (std::is_base_of<From, | 530 | 31 | typename std::remove_pointer<To>::type>::value), | 531 | 31 | "target type not derived from source type"); | 532 | 31 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 31 | return static_cast<To>(f); | 534 | 31 | } |
Unexecuted instantiation: ISIS3WrapperRasterBand* cpl::down_cast<ISIS3WrapperRasterBand*, GDALRasterBand>(GDALRasterBand*) PDS4Dataset* cpl::down_cast<PDS4Dataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 873 | { | 528 | 873 | static_assert( | 529 | 873 | (std::is_base_of<From, | 530 | 873 | typename std::remove_pointer<To>::type>::value), | 531 | 873 | "target type not derived from source type"); | 532 | 873 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 873 | return static_cast<To>(f); | 534 | 873 | } |
Unexecuted instantiation: PDS4FixedWidthTable* cpl::down_cast<PDS4FixedWidthTable*, OGRLayer>(OGRLayer*) PDS4DelimitedTable* cpl::down_cast<PDS4DelimitedTable*, OGRLayer>(OGRLayer*) Line | Count | Source | 527 | 279 | { | 528 | 279 | static_assert( | 529 | 279 | (std::is_base_of<From, | 530 | 279 | typename std::remove_pointer<To>::type>::value), | 531 | 279 | "target type not derived from source type"); | 532 | 279 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 279 | return static_cast<To>(f); | 534 | 279 | } |
PDS4TableBaseLayer* cpl::down_cast<PDS4TableBaseLayer*, OGRLayer>(OGRLayer*) Line | Count | Source | 527 | 13.9k | { | 528 | 13.9k | static_assert( | 529 | 13.9k | (std::is_base_of<From, | 530 | 13.9k | typename std::remove_pointer<To>::type>::value), | 531 | 13.9k | "target type not derived from source type"); | 532 | 13.9k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 13.9k | return static_cast<To>(f); | 534 | 13.9k | } |
VICARDataset* cpl::down_cast<VICARDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 531 | { | 528 | 531 | static_assert( | 529 | 531 | (std::is_base_of<From, | 530 | 531 | typename std::remove_pointer<To>::type>::value), | 531 | 531 | "target type not derived from source type"); | 532 | 531 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 531 | return static_cast<To>(f); | 534 | 531 | } |
ADRGDataset* cpl::down_cast<ADRGDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 45 | { | 528 | 45 | static_assert( | 529 | 45 | (std::is_base_of<From, | 530 | 45 | typename std::remove_pointer<To>::type>::value), | 531 | 45 | "target type not derived from source type"); | 532 | 45 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 45 | return static_cast<To>(f); | 534 | 45 | } |
SRPDataset* cpl::down_cast<SRPDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 10.0k | { | 528 | 10.0k | static_assert( | 529 | 10.0k | (std::is_base_of<From, | 530 | 10.0k | typename std::remove_pointer<To>::type>::value), | 531 | 10.0k | "target type not derived from source type"); | 532 | 10.0k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 10.0k | return static_cast<To>(f); | 534 | 10.0k | } |
Unexecuted instantiation: TerragenDataset* cpl::down_cast<TerragenDataset*, GDALDataset>(GDALDataset*) Unexecuted instantiation: MSGNDataset* cpl::down_cast<MSGNDataset*, GDALDataset>(GDALDataset*) NWT_GRDDataset* cpl::down_cast<NWT_GRDDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 706 | { | 528 | 706 | static_assert( | 529 | 706 | (std::is_base_of<From, | 530 | 706 | typename std::remove_pointer<To>::type>::value), | 531 | 706 | "target type not derived from source type"); | 532 | 706 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 706 | return static_cast<To>(f); | 534 | 706 | } |
NWT_GRCDataset* cpl::down_cast<NWT_GRCDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 364 | { | 528 | 364 | static_assert( | 529 | 364 | (std::is_base_of<From, | 530 | 364 | typename std::remove_pointer<To>::type>::value), | 531 | 364 | "target type not derived from source type"); | 532 | 364 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 364 | return static_cast<To>(f); | 534 | 364 | } |
Unexecuted instantiation: SAGARasterBand const* cpl::down_cast<SAGARasterBand const*, GDALRasterBand const>(GDALRasterBand const*) XYZDataset* cpl::down_cast<XYZDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 94 | { | 528 | 94 | static_assert( | 529 | 94 | (std::is_base_of<From, | 530 | 94 | typename std::remove_pointer<To>::type>::value), | 531 | 94 | "target type not derived from source type"); | 532 | 94 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 94 | return static_cast<To>(f); | 534 | 94 | } |
ESRIC::ECDataset* cpl::down_cast<ESRIC::ECDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 209 | { | 528 | 209 | static_assert( | 529 | 209 | (std::is_base_of<From, | 530 | 209 | typename std::remove_pointer<To>::type>::value), | 531 | 209 | "target type not derived from source type"); | 532 | 209 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 209 | return static_cast<To>(f); | 534 | 209 | } |
HF2Dataset* cpl::down_cast<HF2Dataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 113 | { | 528 | 113 | static_assert( | 529 | 113 | (std::is_base_of<From, | 530 | 113 | typename std::remove_pointer<To>::type>::value), | 531 | 113 | "target type not derived from source type"); | 532 | 113 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 113 | return static_cast<To>(f); | 534 | 113 | } |
Unexecuted instantiation: KmlSuperOverlayReadDataset* cpl::down_cast<KmlSuperOverlayReadDataset*, GDALDataset>(GDALDataset*) Unexecuted instantiation: KmlSingleDocRasterDataset* cpl::down_cast<KmlSingleDocRasterDataset*, GDALDataset>(GDALDataset*) CTGDataset* cpl::down_cast<CTGDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 96 | { | 528 | 96 | static_assert( | 529 | 96 | (std::is_base_of<From, | 530 | 96 | typename std::remove_pointer<To>::type>::value), | 531 | 96 | "target type not derived from source type"); | 532 | 96 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 96 | return static_cast<To>(f); | 534 | 96 | } |
Unexecuted instantiation: ZMapDataset* cpl::down_cast<ZMapDataset*, GDALDataset>(GDALDataset*) Unexecuted instantiation: NGSGEOIDDataset* cpl::down_cast<NGSGEOIDDataset*, GDALDataset>(GDALDataset*) WMTSDataset* cpl::down_cast<WMTSDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 948 | { | 528 | 948 | static_assert( | 529 | 948 | (std::is_base_of<From, | 530 | 948 | typename std::remove_pointer<To>::type>::value), | 531 | 948 | "target type not derived from source type"); | 532 | 948 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 948 | return static_cast<To>(f); | 534 | 948 | } |
BMPDataset* cpl::down_cast<BMPDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 20.2k | { | 528 | 20.2k | static_assert( | 529 | 20.2k | (std::is_base_of<From, | 530 | 20.2k | typename std::remove_pointer<To>::type>::value), | 531 | 20.2k | "target type not derived from source type"); | 532 | 20.2k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 20.2k | return static_cast<To>(f); | 534 | 20.2k | } |
Unexecuted instantiation: GDALTGADataset* cpl::down_cast<GDALTGADataset*, GDALDataset>(GDALDataset*) STACTADataset* cpl::down_cast<STACTADataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 88 | { | 528 | 88 | static_assert( | 529 | 88 | (std::is_base_of<From, | 530 | 88 | typename std::remove_pointer<To>::type>::value), | 531 | 88 | "target type not derived from source type"); | 532 | 88 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 88 | return static_cast<To>(f); | 534 | 88 | } |
STACTARawDataset* cpl::down_cast<STACTARawDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 48 | { | 528 | 48 | static_assert( | 529 | 48 | (std::is_base_of<From, | 530 | 48 | typename std::remove_pointer<To>::type>::value), | 531 | 48 | "target type not derived from source type"); | 532 | 48 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 48 | return static_cast<To>(f); | 534 | 48 | } |
BSBDataset* cpl::down_cast<BSBDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 2.53k | { | 528 | 2.53k | static_assert( | 529 | 2.53k | (std::is_base_of<From, | 530 | 2.53k | typename std::remove_pointer<To>::type>::value), | 531 | 2.53k | "target type not derived from source type"); | 532 | 2.53k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 2.53k | return static_cast<To>(f); | 534 | 2.53k | } |
AIGDataset* cpl::down_cast<AIGDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 675k | { | 528 | 675k | static_assert( | 529 | 675k | (std::is_base_of<From, | 530 | 675k | typename std::remove_pointer<To>::type>::value), | 531 | 675k | "target type not derived from source type"); | 532 | 675k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 675k | return static_cast<To>(f); | 534 | 675k | } |
USGSDEMDataset* cpl::down_cast<USGSDEMDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 1.92k | { | 528 | 1.92k | static_assert( | 529 | 1.92k | (std::is_base_of<From, | 530 | 1.92k | typename std::remove_pointer<To>::type>::value), | 531 | 1.92k | "target type not derived from source type"); | 532 | 1.92k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 1.92k | return static_cast<To>(f); | 534 | 1.92k | } |
Unexecuted instantiation: AirSARDataset* cpl::down_cast<AirSARDataset*, GDALDataset>(GDALDataset*) PCIDSK2Dataset* cpl::down_cast<PCIDSK2Dataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 648 | { | 528 | 648 | static_assert( | 529 | 648 | (std::is_base_of<From, | 530 | 648 | typename std::remove_pointer<To>::type>::value), | 531 | 648 | "target type not derived from source type"); | 532 | 648 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 648 | return static_cast<To>(f); | 534 | 648 | } |
RIKDataset* cpl::down_cast<RIKDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 18.2k | { | 528 | 18.2k | static_assert( | 529 | 18.2k | (std::is_base_of<From, | 530 | 18.2k | typename std::remove_pointer<To>::type>::value), | 531 | 18.2k | "target type not derived from source type"); | 532 | 18.2k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 18.2k | return static_cast<To>(f); | 534 | 18.2k | } |
PDFDataset const* cpl::down_cast<PDFDataset const*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 113k | { | 528 | 113k | static_assert( | 529 | 113k | (std::is_base_of<From, | 530 | 113k | typename std::remove_pointer<To>::type>::value), | 531 | 113k | "target type not derived from source type"); | 532 | 113k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 113k | return static_cast<To>(f); | 534 | 113k | } |
PDFDataset* cpl::down_cast<PDFDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 20.3M | { | 528 | 20.3M | static_assert( | 529 | 20.3M | (std::is_base_of<From, | 530 | 20.3M | typename std::remove_pointer<To>::type>::value), | 531 | 20.3M | "target type not derived from source type"); | 532 | 20.3M | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 20.3M | return static_cast<To>(f); | 534 | 20.3M | } |
PDFRasterBand* cpl::down_cast<PDFRasterBand*, GDALRasterBand>(GDALRasterBand*) Line | Count | Source | 527 | 114k | { | 528 | 114k | static_assert( | 529 | 114k | (std::is_base_of<From, | 530 | 114k | typename std::remove_pointer<To>::type>::value), | 531 | 114k | "target type not derived from source type"); | 532 | 114k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 114k | return static_cast<To>(f); | 534 | 114k | } |
GDALPDFObjectPoppler* cpl::down_cast<GDALPDFObjectPoppler*, GDALPDFObject>(GDALPDFObject*) Line | Count | Source | 527 | 38.0k | { | 528 | 38.0k | static_assert( | 529 | 38.0k | (std::is_base_of<From, | 530 | 38.0k | typename std::remove_pointer<To>::type>::value), | 531 | 38.0k | "target type not derived from source type"); | 532 | 38.0k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 38.0k | return static_cast<To>(f); | 534 | 38.0k | } |
e57driver.cpp:(anonymous namespace)::GDAL_E57Dataset* cpl::down_cast<(anonymous namespace)::GDAL_E57Dataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 2 | { | 528 | 2 | static_assert( | 529 | 2 | (std::is_base_of<From, | 530 | 2 | typename std::remove_pointer<To>::type>::value), | 531 | 2 | "target type not derived from source type"); | 532 | 2 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 2 | return static_cast<To>(f); | 534 | 2 | } |
PNGDataset* cpl::down_cast<PNGDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 26.7k | { | 528 | 26.7k | static_assert( | 529 | 26.7k | (std::is_base_of<From, | 530 | 26.7k | typename std::remove_pointer<To>::type>::value), | 531 | 26.7k | "target type not derived from source type"); | 532 | 26.7k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 26.7k | return static_cast<To>(f); | 534 | 26.7k | } |
Unexecuted instantiation: PNGRasterBand* cpl::down_cast<PNGRasterBand*, GDALRasterBand>(GDALRasterBand*) BIGGIFDataset* cpl::down_cast<BIGGIFDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 10.5k | { | 528 | 10.5k | static_assert( | 529 | 10.5k | (std::is_base_of<From, | 530 | 10.5k | typename std::remove_pointer<To>::type>::value), | 531 | 10.5k | "target type not derived from source type"); | 532 | 10.5k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 10.5k | return static_cast<To>(f); | 534 | 10.5k | } |
gdal::LERCDataset* cpl::down_cast<gdal::LERCDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 115k | { | 528 | 115k | static_assert( | 529 | 115k | (std::is_base_of<From, | 530 | 115k | typename std::remove_pointer<To>::type>::value), | 531 | 115k | "target type not derived from source type"); | 532 | 115k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 115k | return static_cast<To>(f); | 534 | 115k | } |
netCDFDataset* cpl::down_cast<netCDFDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 24.2k | { | 528 | 24.2k | static_assert( | 529 | 24.2k | (std::is_base_of<From, | 530 | 24.2k | typename std::remove_pointer<To>::type>::value), | 531 | 24.2k | "target type not derived from source type"); | 532 | 24.2k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 24.2k | return static_cast<To>(f); | 534 | 24.2k | } |
Unexecuted instantiation: netCDFRasterBand* cpl::down_cast<netCDFRasterBand*, GDALRasterBand>(GDALRasterBand*) Unexecuted instantiation: nccfdriver::OGR_SGFS_NC_Transaction_Generic<signed char, 1>* cpl::down_cast<nccfdriver::OGR_SGFS_NC_Transaction_Generic<signed char, 1>*, nccfdriver::OGR_SGFS_Transaction>(nccfdriver::OGR_SGFS_Transaction*) Unexecuted instantiation: nccfdriver::OGR_SGFS_NC_Transaction_Generic<short, 3>* cpl::down_cast<nccfdriver::OGR_SGFS_NC_Transaction_Generic<short, 3>*, nccfdriver::OGR_SGFS_Transaction>(nccfdriver::OGR_SGFS_Transaction*) Unexecuted instantiation: nccfdriver::OGR_SGFS_NC_Transaction_Generic<int, 4>* cpl::down_cast<nccfdriver::OGR_SGFS_NC_Transaction_Generic<int, 4>*, nccfdriver::OGR_SGFS_Transaction>(nccfdriver::OGR_SGFS_Transaction*) Unexecuted instantiation: nccfdriver::OGR_SGFS_NC_Transaction_Generic<float, 5>* cpl::down_cast<nccfdriver::OGR_SGFS_NC_Transaction_Generic<float, 5>*, nccfdriver::OGR_SGFS_Transaction>(nccfdriver::OGR_SGFS_Transaction*) Unexecuted instantiation: nccfdriver::OGR_SGFS_NC_Transaction_Generic<double, 6>* cpl::down_cast<nccfdriver::OGR_SGFS_NC_Transaction_Generic<double, 6>*, nccfdriver::OGR_SGFS_Transaction>(nccfdriver::OGR_SGFS_Transaction*) Unexecuted instantiation: nccfdriver::OGR_SGFS_NC_Transaction_Generic<unsigned int, 9>* cpl::down_cast<nccfdriver::OGR_SGFS_NC_Transaction_Generic<unsigned int, 9>*, nccfdriver::OGR_SGFS_Transaction>(nccfdriver::OGR_SGFS_Transaction*) Unexecuted instantiation: nccfdriver::OGR_SGFS_NC_Transaction_Generic<unsigned long long, 11>* cpl::down_cast<nccfdriver::OGR_SGFS_NC_Transaction_Generic<unsigned long long, 11>*, nccfdriver::OGR_SGFS_Transaction>(nccfdriver::OGR_SGFS_Transaction*) Unexecuted instantiation: nccfdriver::OGR_SGFS_NC_Transaction_Generic<long long, 10>* cpl::down_cast<nccfdriver::OGR_SGFS_NC_Transaction_Generic<long long, 10>*, nccfdriver::OGR_SGFS_Transaction>(nccfdriver::OGR_SGFS_Transaction*) Unexecuted instantiation: nccfdriver::OGR_SGFS_NC_Transaction_Generic<unsigned char, 7>* cpl::down_cast<nccfdriver::OGR_SGFS_NC_Transaction_Generic<unsigned char, 7>*, nccfdriver::OGR_SGFS_Transaction>(nccfdriver::OGR_SGFS_Transaction*) Unexecuted instantiation: nccfdriver::OGR_SGFS_NC_Transaction_Generic<unsigned short, 8>* cpl::down_cast<nccfdriver::OGR_SGFS_NC_Transaction_Generic<unsigned short, 8>*, nccfdriver::OGR_SGFS_Transaction>(nccfdriver::OGR_SGFS_Transaction*) ZarrRasterBand* cpl::down_cast<ZarrRasterBand*, GDALRasterBand>(GDALRasterBand*) Line | Count | Source | 527 | 6.68k | { | 528 | 6.68k | static_assert( | 529 | 6.68k | (std::is_base_of<From, | 530 | 6.68k | typename std::remove_pointer<To>::type>::value), | 531 | 6.68k | "target type not derived from source type"); | 532 | 6.68k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 6.68k | return static_cast<To>(f); | 534 | 6.68k | } |
ZarrDataset* cpl::down_cast<ZarrDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 17.5k | { | 528 | 17.5k | static_assert( | 529 | 17.5k | (std::is_base_of<From, | 530 | 17.5k | typename std::remove_pointer<To>::type>::value), | 531 | 17.5k | "target type not derived from source type"); | 532 | 17.5k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 17.5k | return static_cast<To>(f); | 534 | 17.5k | } |
Unexecuted instantiation: VSIKerchunkJSONRefFileSystem* cpl::down_cast<VSIKerchunkJSONRefFileSystem*, VSIFilesystemHandler>(VSIFilesystemHandler*) Unexecuted instantiation: GDALDAASDataset* cpl::down_cast<GDALDAASDataset*, GDALDataset>(GDALDataset*) Unexecuted instantiation: GDALDAASRasterBand* cpl::down_cast<GDALDAASRasterBand*, GDALRasterBand>(GDALRasterBand*) Unexecuted instantiation: GDALEEDAIDataset* cpl::down_cast<GDALEEDAIDataset*, GDALDataset>(GDALDataset*) Unexecuted instantiation: GDALEEDAIRasterBand* cpl::down_cast<GDALEEDAIRasterBand*, GDALRasterBand>(GDALRasterBand*) Unexecuted instantiation: PLMosaicDataset* cpl::down_cast<PLMosaicDataset*, GDALDataset>(GDALDataset*) Unexecuted instantiation: OGCAPIDataset* cpl::down_cast<OGCAPIDataset*, GDALDataset>(GDALDataset*) Unexecuted instantiation: WEBPDataset* cpl::down_cast<WEBPDataset*, GDALDataset>(GDALDataset*) TABMAPIndexBlock* cpl::down_cast<TABMAPIndexBlock*, TABRawBinBlock>(TABRawBinBlock*) Line | Count | Source | 527 | 1 | { | 528 | 1 | static_assert( | 529 | 1 | (std::is_base_of<From, | 530 | 1 | typename std::remove_pointer<To>::type>::value), | 531 | 1 | "target type not derived from source type"); | 532 | 1 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 1 | return static_cast<To>(f); | 534 | 1 | } |
TABMAPObjPoint* cpl::down_cast<TABMAPObjPoint*, TABMAPObjHdr>(TABMAPObjHdr*) Line | Count | Source | 527 | 5.27k | { | 528 | 5.27k | static_assert( | 529 | 5.27k | (std::is_base_of<From, | 530 | 5.27k | typename std::remove_pointer<To>::type>::value), | 531 | 5.27k | "target type not derived from source type"); | 532 | 5.27k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 5.27k | return static_cast<To>(f); | 534 | 5.27k | } |
Unexecuted instantiation: TABFontPoint* cpl::down_cast<TABFontPoint*, TABPoint>(TABPoint*) Unexecuted instantiation: TABCustomPoint* cpl::down_cast<TABCustomPoint*, TABPoint>(TABPoint*) TABMAPObjFontPoint* cpl::down_cast<TABMAPObjFontPoint*, TABMAPObjHdr>(TABMAPObjHdr*) Line | Count | Source | 527 | 75 | { | 528 | 75 | static_assert( | 529 | 75 | (std::is_base_of<From, | 530 | 75 | typename std::remove_pointer<To>::type>::value), | 531 | 75 | "target type not derived from source type"); | 532 | 75 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 75 | return static_cast<To>(f); | 534 | 75 | } |
TABMAPObjCustomPoint* cpl::down_cast<TABMAPObjCustomPoint*, TABMAPObjHdr>(TABMAPObjHdr*) Line | Count | Source | 527 | 70 | { | 528 | 70 | static_assert( | 529 | 70 | (std::is_base_of<From, | 530 | 70 | typename std::remove_pointer<To>::type>::value), | 531 | 70 | "target type not derived from source type"); | 532 | 70 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 70 | return static_cast<To>(f); | 534 | 70 | } |
TABMAPObjLine* cpl::down_cast<TABMAPObjLine*, TABMAPObjHdr>(TABMAPObjHdr*) Line | Count | Source | 527 | 515 | { | 528 | 515 | static_assert( | 529 | 515 | (std::is_base_of<From, | 530 | 515 | typename std::remove_pointer<To>::type>::value), | 531 | 515 | "target type not derived from source type"); | 532 | 515 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 515 | return static_cast<To>(f); | 534 | 515 | } |
TABMAPObjPLine* cpl::down_cast<TABMAPObjPLine*, TABMAPObjHdr>(TABMAPObjHdr*) Line | Count | Source | 527 | 10.0k | { | 528 | 10.0k | static_assert( | 529 | 10.0k | (std::is_base_of<From, | 530 | 10.0k | typename std::remove_pointer<To>::type>::value), | 531 | 10.0k | "target type not derived from source type"); | 532 | 10.0k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 10.0k | return static_cast<To>(f); | 534 | 10.0k | } |
TABMAPObjRectEllipse* cpl::down_cast<TABMAPObjRectEllipse*, TABMAPObjHdr>(TABMAPObjHdr*) Line | Count | Source | 527 | 120 | { | 528 | 120 | static_assert( | 529 | 120 | (std::is_base_of<From, | 530 | 120 | typename std::remove_pointer<To>::type>::value), | 531 | 120 | "target type not derived from source type"); | 532 | 120 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 120 | return static_cast<To>(f); | 534 | 120 | } |
TABMAPObjArc* cpl::down_cast<TABMAPObjArc*, TABMAPObjHdr>(TABMAPObjHdr*) Line | Count | Source | 527 | 74 | { | 528 | 74 | static_assert( | 529 | 74 | (std::is_base_of<From, | 530 | 74 | typename std::remove_pointer<To>::type>::value), | 531 | 74 | "target type not derived from source type"); | 532 | 74 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 74 | return static_cast<To>(f); | 534 | 74 | } |
TABMAPObjText* cpl::down_cast<TABMAPObjText*, TABMAPObjHdr>(TABMAPObjHdr*) Line | Count | Source | 527 | 33 | { | 528 | 33 | static_assert( | 529 | 33 | (std::is_base_of<From, | 530 | 33 | typename std::remove_pointer<To>::type>::value), | 531 | 33 | "target type not derived from source type"); | 532 | 33 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 33 | return static_cast<To>(f); | 534 | 33 | } |
TABMAPObjMultiPoint* cpl::down_cast<TABMAPObjMultiPoint*, TABMAPObjHdr>(TABMAPObjHdr*) Line | Count | Source | 527 | 33 | { | 528 | 33 | static_assert( | 529 | 33 | (std::is_base_of<From, | 530 | 33 | typename std::remove_pointer<To>::type>::value), | 531 | 33 | "target type not derived from source type"); | 532 | 33 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 33 | return static_cast<To>(f); | 534 | 33 | } |
Unexecuted instantiation: TABMultiPoint* cpl::down_cast<TABMultiPoint*, TABFeature>(TABFeature*) TABMAPObjCollection* cpl::down_cast<TABMAPObjCollection*, TABMAPObjHdr>(TABMAPObjHdr*) Line | Count | Source | 527 | 20 | { | 528 | 20 | static_assert( | 529 | 20 | (std::is_base_of<From, | 530 | 20 | typename std::remove_pointer<To>::type>::value), | 531 | 20 | "target type not derived from source type"); | 532 | 20 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 20 | return static_cast<To>(f); | 534 | 20 | } |
TABMAPHeaderBlock* cpl::down_cast<TABMAPHeaderBlock*, TABRawBinBlock>(TABRawBinBlock*) Line | Count | Source | 527 | 6.03k | { | 528 | 6.03k | static_assert( | 529 | 6.03k | (std::is_base_of<From, | 530 | 6.03k | typename std::remove_pointer<To>::type>::value), | 531 | 6.03k | "target type not derived from source type"); | 532 | 6.03k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 6.03k | return static_cast<To>(f); | 534 | 6.03k | } |
Unexecuted instantiation: TABMAPObjectBlock* cpl::down_cast<TABMAPObjectBlock*, TABRawBinBlock>(TABRawBinBlock*) Unexecuted instantiation: TABMAPCoordBlock* cpl::down_cast<TABMAPCoordBlock*, TABRawBinBlock>(TABRawBinBlock*) Unexecuted instantiation: TABMAPObjHdrWithCoord* cpl::down_cast<TABMAPObjHdrWithCoord*, TABMAPObjHdr>(TABMAPObjHdr*) VFKFeatureSQLite* cpl::down_cast<VFKFeatureSQLite*, IVFKFeature>(IVFKFeature*) Line | Count | Source | 527 | 13.7k | { | 528 | 13.7k | static_assert( | 529 | 13.7k | (std::is_base_of<From, | 530 | 13.7k | typename std::remove_pointer<To>::type>::value), | 531 | 13.7k | "target type not derived from source type"); | 532 | 13.7k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 13.7k | return static_cast<To>(f); | 534 | 13.7k | } |
VFKFeatureSQLite* cpl::down_cast<VFKFeatureSQLite*, VFKFeatureSQLite>(VFKFeatureSQLite*) Line | Count | Source | 527 | 10.2k | { | 528 | 10.2k | static_assert( | 529 | 10.2k | (std::is_base_of<From, | 530 | 10.2k | typename std::remove_pointer<To>::type>::value), | 531 | 10.2k | "target type not derived from source type"); | 532 | 10.2k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 10.2k | return static_cast<To>(f); | 534 | 10.2k | } |
Unexecuted instantiation: GDALOrientedDataset* cpl::down_cast<GDALOrientedDataset*, GDALDataset>(GDALDataset*) BTDataset const* cpl::down_cast<BTDataset const*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 16 | { | 528 | 16 | static_assert( | 529 | 16 | (std::is_base_of<From, | 530 | 16 | typename std::remove_pointer<To>::type>::value), | 531 | 16 | "target type not derived from source type"); | 532 | 16 | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 16 | return static_cast<To>(f); | 534 | 16 | } |
Unexecuted instantiation: BTDataset* cpl::down_cast<BTDataset*, GDALDataset>(GDALDataset*) Unexecuted instantiation: CPGDataset* cpl::down_cast<CPGDataset*, GDALDataset>(GDALDataset*) EHdrDataset* cpl::down_cast<EHdrDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 122k | { | 528 | 122k | static_assert( | 529 | 122k | (std::is_base_of<From, | 530 | 122k | typename std::remove_pointer<To>::type>::value), | 531 | 122k | "target type not derived from source type"); | 532 | 122k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 122k | return static_cast<To>(f); | 534 | 122k | } |
EHdrRasterBand* cpl::down_cast<EHdrRasterBand*, GDALRasterBand>(GDALRasterBand*) Line | Count | Source | 527 | 14.8k | { | 528 | 14.8k | static_assert( | 529 | 14.8k | (std::is_base_of<From, | 530 | 14.8k | typename std::remove_pointer<To>::type>::value), | 531 | 14.8k | "target type not derived from source type"); | 532 | 14.8k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 14.8k | return static_cast<To>(f); | 534 | 14.8k | } |
ENVIDataset* cpl::down_cast<ENVIDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 22.6k | { | 528 | 22.6k | static_assert( | 529 | 22.6k | (std::is_base_of<From, | 530 | 22.6k | typename std::remove_pointer<To>::type>::value), | 531 | 22.6k | "target type not derived from source type"); | 532 | 22.6k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 22.6k | return static_cast<To>(f); | 534 | 22.6k | } |
GenBinDataset* cpl::down_cast<GenBinDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 41.9k | { | 528 | 41.9k | static_assert( | 529 | 41.9k | (std::is_base_of<From, | 530 | 41.9k | typename std::remove_pointer<To>::type>::value), | 531 | 41.9k | "target type not derived from source type"); | 532 | 41.9k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 41.9k | return static_cast<To>(f); | 534 | 41.9k | } |
LANDataset* cpl::down_cast<LANDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 8.28k | { | 528 | 8.28k | static_assert( | 529 | 8.28k | (std::is_base_of<From, | 530 | 8.28k | typename std::remove_pointer<To>::type>::value), | 531 | 8.28k | "target type not derived from source type"); | 532 | 8.28k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 8.28k | return static_cast<To>(f); | 534 | 8.28k | } |
Unexecuted instantiation: PAuxDataset* cpl::down_cast<PAuxDataset*, GDALDataset>(GDALDataset*) Unexecuted instantiation: SNODASDataset* cpl::down_cast<SNODASDataset*, GDALDataset>(GDALDataset*) BYNDataset* cpl::down_cast<BYNDataset*, GDALDataset>(GDALDataset*) Line | Count | Source | 527 | 44.5k | { | 528 | 44.5k | static_assert( | 529 | 44.5k | (std::is_base_of<From, | 530 | 44.5k | typename std::remove_pointer<To>::type>::value), | 531 | 44.5k | "target type not derived from source type"); | 532 | 44.5k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 44.5k | return static_cast<To>(f); | 534 | 44.5k | } |
GDAL_MRF::MRFRasterBand* cpl::down_cast<GDAL_MRF::MRFRasterBand*, GDALRasterBand>(GDALRasterBand*) Line | Count | Source | 527 | 20.8k | { | 528 | 20.8k | static_assert( | 529 | 20.8k | (std::is_base_of<From, | 530 | 20.8k | typename std::remove_pointer<To>::type>::value), | 531 | 20.8k | "target type not derived from source type"); | 532 | 20.8k | CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr); | 533 | 20.8k | return static_cast<To>(f); | 534 | 20.8k | } |
|
535 | | |
536 | | /** Computes ceil(a/b) where a and b are integers */ |
537 | | template <class T, class U> inline T div_round_up(T a, U b) |
538 | 609k | { |
539 | 609k | return a / b + (((a % b) == 0) ? 0 : 1); |
540 | 609k | } int cpl::div_round_up<int, int>(int, int) Line | Count | Source | 538 | 489k | { | 539 | 489k | return a / b + (((a % b) == 0) ? 0 : 1); | 540 | 489k | } |
unsigned long cpl::div_round_up<unsigned long, unsigned long>(unsigned long, unsigned long) Line | Count | Source | 538 | 94 | { | 539 | 94 | return a / b + (((a % b) == 0) ? 0 : 1); | 540 | 94 | } |
Unexecuted instantiation: long cpl::div_round_up<long, int>(long, int) Unexecuted instantiation: long cpl::div_round_up<long, unsigned long>(long, unsigned long) Unexecuted instantiation: unsigned long long cpl::div_round_up<unsigned long long, unsigned long>(unsigned long long, unsigned long) unsigned long long cpl::div_round_up<unsigned long long, unsigned long long>(unsigned long long, unsigned long long) Line | Count | Source | 538 | 301 | { | 539 | 301 | return a / b + (((a % b) == 0) ? 0 : 1); | 540 | 301 | } |
unsigned long long cpl::div_round_up<unsigned long long, long long>(unsigned long long, long long) Line | Count | Source | 538 | 90.7k | { | 539 | 90.7k | return a / b + (((a % b) == 0) ? 0 : 1); | 540 | 90.7k | } |
unsigned int cpl::div_round_up<unsigned int, int>(unsigned int, int) Line | Count | Source | 538 | 700 | { | 539 | 700 | return a / b + (((a % b) == 0) ? 0 : 1); | 540 | 700 | } |
unsigned long cpl::div_round_up<unsigned long, unsigned long long>(unsigned long, unsigned long long) Line | Count | Source | 538 | 28.1k | { | 539 | 28.1k | return a / b + (((a % b) == 0) ? 0 : 1); | 540 | 28.1k | } |
|
541 | | |
542 | | #ifdef HAVE_STRING_VIEW |
543 | | template <typename T> |
544 | | std::optional<T> CPL_DLL strict_parse(std::string_view str); |
545 | | #endif |
546 | | |
547 | | } // namespace cpl |
548 | | } // extern "C++" |
549 | | |
550 | | #ifdef HAVE_STRING_VIEW |
551 | | #undef HAVE_STRING_VIEW |
552 | | #endif |
553 | | |
554 | | #endif /* def __cplusplus */ |
555 | | |
556 | | #endif /* ndef CPL_CONV_H_INCLUDED */ |