GDAL
ogr_xerces.h
1/******************************************************************************
2 * Project: OGR
3 * Purpose: Convenience functions for parsing with Xerces-C library
4 * Author: Even Rouault, <even.rouault at spatialys.com>
5 *
6 ******************************************************************************
7 * Copyright (c) 2016, Even Rouault <even.rouault at spatialys.com>
8 *
9 * SPDX-License-Identifier: MIT
10 ****************************************************************************/
11
12#ifndef OGR_XERCES_INCLUDED
13#define OGR_XERCES_INCLUDED
14
15#ifdef HAVE_XERCES
16#include "ogr_xerces_headers.h"
17#endif
18
19#include "cpl_port.h"
20#include "cpl_string.h"
21#include "cpl_vsi.h"
22
23#ifdef HAVE_XERCES
24
25/* All those functions are for in-tree drivers use only ! */
26
27/* Thread-safe initialization/de-initialization. Calls should be paired */
28bool CPL_DLL OGRInitializeXerces(void);
29void CPL_DLL OGRDeinitializeXerces(void);
30
31InputSource CPL_DLL *OGRCreateXercesInputSource(VSILFILE *fp);
32void CPL_DLL OGRDestroyXercesInputSource(InputSource *is);
33
34void CPL_DLL OGRStartXercesLimitsForThisThread(size_t nMaxMemAlloc,
35 const char *pszMsgMaxMemAlloc,
36 double dfTimeoutSecond,
37 const char *pszMsgTimeout);
38void CPL_DLL OGRStopXercesLimitsForThisThread();
39
40namespace OGR
41{
42CPLString CPL_DLL transcode(const XMLCh *panXMLString, int nLimitingChars = -1);
43CPLString CPL_DLL &transcode(const XMLCh *panXMLString, CPLString &osRet,
44 int nLimitingChars = -1);
45} // namespace OGR
46
47#ifndef OGR_USING
48using OGR::transcode;
49#endif
50
51void OGRCleanupXercesMutex(void);
52
53#endif /* HAVE_XERCES */
54
55#endif /* OGR_XERCES_INCLUDED */
Convenient string class based on std::string.
Definition cpl_string.h:307
Core portability definitions for CPL.
Various convenience functions for working with strings and string lists.
Standard C Covers.
Virtual file handle.
Definition cpl_vsi_virtual.h:47