Stroika Library 3.0d25
 
Loading...
Searching...
No Matches
SAXReader.h
Go to the documentation of this file.
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2026. All rights reserved
3 */
4#ifndef _Stroika_Foundation_DataExchange_XML_SAXReader_h_
5#define _Stroika_Foundation_DataExchange_XML_SAXReader_h_ 1
6
7#include "Stroika/Foundation/StroikaPreComp.h"
8
14#include "Stroika/Foundation/Execution/ProgressMonitor.h"
16
17/**
18 * \file
19 */
20
21namespace Stroika::Foundation::DataExchange::XML::Providers {
22 struct ISAXProvider;
23};
24namespace Stroika::Foundation::DataExchange::XML {
25
26 /**
27 * Parse will throw an exception if it encounters any errors parsing.
28 *
29 * @see ObjectReaderRegistry for examples of one way to use this
30 *
31 * \note though we support using incompatible schema/saxProvider pairs, doing so incurs a significant performance penalty.
32 */
33 void SAXParse (const Providers::ISAXProvider& saxProvider, const Streams::InputStream::Ptr<byte>& in,
34 StructuredStreamEvents::IConsumer* callback = nullptr, const Schema::Ptr& schema = nullptr,
35 Execution::ProgressMonitor::Updater progress = nullptr);
36#if qStroika_Foundation_DataExchange_XML_SupportParsing
37 void SAXParse (const Streams::InputStream::Ptr<byte>& in, StructuredStreamEvents::IConsumer* callback = nullptr, const Schema::Ptr& schema = nullptr,
38 Execution::ProgressMonitor::Updater progress = nullptr, const Options& o = {}); ///< \brief Parse with the provider o names
39#endif
40
41#if qStroika_Foundation_DataExchange_XML_SupportParsing
42 [[deprecated ("Since Stroika v3.0d5 use address of callback")]] inline void
43 SAXParse (const Streams::InputStream::Ptr<byte>& in, StructuredStreamEvents::IConsumer& callback, const Schema::Ptr& schema = nullptr)
44 {
45 SAXParse (in, &callback, schema);
46 }
47#endif
48
49}
50
51/*
52 ********************************************************************************
53 ***************************** Implementation Details ***************************
54 ********************************************************************************
55 */
56#include "SAXReader.inl"
57
58#endif /*_Stroika_Foundation_DataExchange_XML_SAXReader_h_*/
void SAXParse(const Providers::ISAXProvider &saxProvider, const Streams::InputStream::Ptr< byte > &in, StructuredStreamEvents::IConsumer *callback=nullptr, const Schema::Ptr &schema=nullptr, Execution::ProgressMonitor::Updater progress=nullptr)
Definition SAXReader.cpp:45