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 */
28 bool CPL_DLL OGRInitializeXerces(void);
29 void CPL_DLL OGRDeinitializeXerces(void);
30
31InputSource CPL_DLL *OGRCreateXercesInputSource(VSILFILE *fp);
32 void CPL_DLL OGRDestroyXercesInputSource(InputSource *is);
33
34 void CPL_DLL OGRStartXercesLimitsForThisThread(size_t nMaxMemAlloc,
35 const char *pszMsgMaxMemAlloc,
36 double dfTimeoutSecond,
37 const char *pszMsgTimeout);
38 void CPL_DLL OGRStopXercesLimitsForThisThread();
39
40 namespace OGR
41{
42 CPLString CPL_DLL transcode(const XMLCh *panXMLString, int nLimitingChars = -1);
43 CPLString CPL_DLL &transcode(const XMLCh *panXMLString, CPLString &osRet,
44 int nLimitingChars = -1);
45} // namespace OGR
46
47#ifndef OGR_USING
48 using OGR::transcode;
49#endif
50
51 void OGRCleanupXercesMutex(void);
52
53#endif /* HAVE_XERCES */
54
55#endif /* OGR_XERCES_INCLUDED */
CPLString
Convenient string class based on std::string.
Definition: cpl_string.h:307
cpl_port.h
Core portability definitions for CPL.
cpl_string.h
Various convenience functions for working with strings and string lists.
cpl_vsi.h
Standard C Covers.
VSIVirtualHandle
Virtual file handle.
Definition: cpl_vsi_virtual.h:47