Xerces-C++ 3.3.0

DOMLSSerializer.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/*
19 * $Id$
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_DOMLSSERIALIZER_HPP)
23#define XERCESC_INCLUDE_GUARD_DOMLSSERIALIZER_HPP
24
266#include <xercesc/dom/DOMNode.hpp>
267#include <xercesc/dom/DOMLSSerializerFilter.hpp>
268#include <xercesc/dom/DOMErrorHandler.hpp>
269#include <xercesc/dom/DOMConfiguration.hpp>
270
271 XERCES_CPP_NAMESPACE_BEGIN
272
273 class DOMLSOutput;
274
275 class CDOM_EXPORT DOMLSSerializer
276{
277protected :
278 // -----------------------------------------------------------------------
279 // Hidden constructors
280 // -----------------------------------------------------------------------
283 DOMLSSerializer() {};
285 private:
286 // -----------------------------------------------------------------------
287 // Unimplemented constructors and operators
288 // -----------------------------------------------------------------------
291 DOMLSSerializer(const DOMLSSerializer &);
292 DOMLSSerializer & operator = (const DOMLSSerializer &);
294
295
296 public:
297 // -----------------------------------------------------------------------
298 // All constructors are hidden, just the destructor is available
299 // -----------------------------------------------------------------------
306 virtual ~DOMLSSerializer() {};
308
309 // -----------------------------------------------------------------------
310 // Virtual DOMLSSerializer interface
311 // -----------------------------------------------------------------------
314 // -----------------------------------------------------------------------
315 // Feature methods
316 // -----------------------------------------------------------------------
391 virtual DOMConfiguration* getDomConfig() = 0;
392
393 // -----------------------------------------------------------------------
394 // Setter methods
395 // -----------------------------------------------------------------------
427 virtual void setNewLine(const XMLCh* const newLine) = 0;
428
439 virtual void setFilter(DOMLSSerializerFilter *filter) = 0;
440
441 // -----------------------------------------------------------------------
442 // Getter methods
443 // -----------------------------------------------------------------------
452 virtual const XMLCh* getNewLine() const = 0;
453
461 virtual DOMLSSerializerFilter* getFilter() const = 0;
462
463 // -----------------------------------------------------------------------
464 // Write methods
465 // -----------------------------------------------------------------------
483 virtual bool write(const DOMNode* nodeToWrite,
484 DOMLSOutput* const destination) = 0;
485
503 virtual bool writeToURI(const DOMNode* nodeToWrite,
504 const XMLCh* uri) = 0;
524 virtual XMLCh* writeToString(const DOMNode* nodeToWrite, MemoryManager* manager = NULL) = 0;
525
527
528 // -----------------------------------------------------------------------
529 // Non-standard Extension
530 // -----------------------------------------------------------------------
539 virtual void release() = 0;
541
542
543};
544
545 XERCES_CPP_NAMESPACE_END
546
547#endif
DOMConfiguration.hpp
DOMErrorHandler.hpp
DOMLSSerializerFilter.hpp
DOMNode.hpp
CDOM_EXPORT
#define CDOM_EXPORT
Definition XercesDefs.hpp:166
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
XMLCh
char16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
DOMConfiguration
The DOMConfiguration interface represents the configuration of a document and maintains a table of re...
Definition DOMConfiguration.hpp:351
DOMLSOutput
This interface represents an output destination for data.
Definition DOMLSOutput.hpp:40
DOMLSSerializerFilter
DOMLSSerializerFilter.hpp: interface for the DOMLSSerializerFilter class.
Definition DOMLSSerializerFilter.hpp:47
DOMLSSerializer
Definition DOMLSSerializer.hpp:276
DOMLSSerializer::getFilter
virtual DOMLSSerializerFilter * getFilter() const =0
Return the WriterFilter used.
DOMLSSerializer::DOMLSSerializer
DOMLSSerializer()
Definition DOMLSSerializer.hpp:283
DOMLSSerializer::~DOMLSSerializer
virtual ~DOMLSSerializer()
Destructor.
Definition DOMLSSerializer.hpp:306
DOMLSSerializer::setNewLine
virtual void setNewLine(const XMLCh *const newLine)=0
The end-of-line sequence of characters to be used in the XML being written out.
DOMLSSerializer::write
virtual bool write(const DOMNode *nodeToWrite, DOMLSOutput *const destination)=0
Write out the specified node as described above in the description of DOMLSSerializer.
DOMLSSerializer::setFilter
virtual void setFilter(DOMLSSerializerFilter *filter)=0
When the application provides a filter, the serializer will call out to the filter before serializing...
DOMLSSerializer::writeToURI
virtual bool writeToURI(const DOMNode *nodeToWrite, const XMLCh *uri)=0
Write out the specified node as described above in the description of DOMLSSerializer.
DOMLSSerializer::getNewLine
virtual const XMLCh * getNewLine() const =0
Return the end-of-line sequence of characters to be used in the XML being written out.
DOMLSSerializer::getDomConfig
virtual DOMConfiguration * getDomConfig()=0
The DOMConfiguration object used by the LSSerializer when serializing a DOM node.
DOMLSSerializer::release
virtual void release()=0
Called to indicate that this Writer is no longer in use and that the implementation may relinquish an...
DOMLSSerializer::writeToString
virtual XMLCh * writeToString(const DOMNode *nodeToWrite, MemoryManager *manager=NULL)=0
Serialize the specified node as described above in the description of DOMLSSerializer.
DOMNode
The DOMNode interface is the primary datatype for the entire Document Object Model.
Definition DOMNode.hpp:139
MemoryManager
Configurable memory manager.
Definition MemoryManager.hpp:40