00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one or more 00003 * contributor license agreements. See the NOTICE file distributed with 00004 * this work for additional information regarding copyright ownership. 00005 * The ASF licenses this file to You under the Apache License, Version 2.0 00006 * (the "License"); you may not use this file except in compliance with 00007 * the License. You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 00018 /* 00019 * $Id: DOMLSSerializer.hpp 605828 2007-12-20 08:05:47Z amassari $ 00020 */ 00021 00022 #if !defined(XERCESC_INCLUDE_GUARD_DOMLSSERIALIZER_HPP) 00023 #define XERCESC_INCLUDE_GUARD_DOMLSSERIALIZER_HPP 00024 00266 #include <xercesc/dom/DOMNode.hpp> 00267 #include <xercesc/dom/DOMLSSerializerFilter.hpp> 00268 #include <xercesc/dom/DOMErrorHandler.hpp> 00269 #include <xercesc/dom/DOMConfiguration.hpp> 00270 00271 XERCES_CPP_NAMESPACE_BEGIN 00272 00273 class DOMLSOutput; 00274 00275 class CDOM_EXPORT DOMLSSerializer 00276 { 00277 protected : 00278 // ----------------------------------------------------------------------- 00279 // Hidden constructors 00280 // ----------------------------------------------------------------------- 00283 DOMLSSerializer() {}; 00285 private: 00286 // ----------------------------------------------------------------------- 00287 // Unimplemented constructors and operators 00288 // ----------------------------------------------------------------------- 00291 DOMLSSerializer(const DOMLSSerializer &); 00292 DOMLSSerializer & operator = (const DOMLSSerializer &); 00294 00295 00296 public: 00297 // ----------------------------------------------------------------------- 00298 // All constructors are hidden, just the destructor is available 00299 // ----------------------------------------------------------------------- 00306 virtual ~DOMLSSerializer() {}; 00308 00309 // ----------------------------------------------------------------------- 00310 // Virtual DOMLSSerializer interface 00311 // ----------------------------------------------------------------------- 00314 // ----------------------------------------------------------------------- 00315 // Feature methods 00316 // ----------------------------------------------------------------------- 00391 virtual DOMConfiguration* getDomConfig() = 0; 00392 00393 // ----------------------------------------------------------------------- 00394 // Setter methods 00395 // ----------------------------------------------------------------------- 00422 virtual void setNewLine(const XMLCh* const newLine) = 0; 00423 00434 virtual void setFilter(DOMLSSerializerFilter *filter) = 0; 00435 00436 // ----------------------------------------------------------------------- 00437 // Getter methods 00438 // ----------------------------------------------------------------------- 00447 virtual const XMLCh* getNewLine() const = 0; 00448 00456 virtual DOMLSSerializerFilter* getFilter() const = 0; 00457 00458 // ----------------------------------------------------------------------- 00459 // Write methods 00460 // ----------------------------------------------------------------------- 00478 virtual bool write(const DOMNode* nodeToWrite, 00479 DOMLSOutput* const destination) = 0; 00480 00498 virtual bool writeToURI(const DOMNode* nodeToWrite, 00499 const XMLCh* uri) = 0; 00519 virtual XMLCh* writeToString(const DOMNode* nodeToWrite, MemoryManager* manager = NULL) = 0; 00520 00522 00523 // ----------------------------------------------------------------------- 00524 // Non-standard Extension 00525 // ----------------------------------------------------------------------- 00534 virtual void release() = 0; 00536 00537 00538 }; 00539 00540 XERCES_CPP_NAMESPACE_END 00541 00542 #endif