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 883665 2009-11-24 11:41:38Z borisk $ 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 // ----------------------------------------------------------------------- 00427 virtual void setNewLine(const XMLCh* const newLine) = 0; 00428 00439 virtual void setFilter(DOMLSSerializerFilter *filter) = 0; 00440 00441 // ----------------------------------------------------------------------- 00442 // Getter methods 00443 // ----------------------------------------------------------------------- 00452 virtual const XMLCh* getNewLine() const = 0; 00453 00461 virtual DOMLSSerializerFilter* getFilter() const = 0; 00462 00463 // ----------------------------------------------------------------------- 00464 // Write methods 00465 // ----------------------------------------------------------------------- 00483 virtual bool write(const DOMNode* nodeToWrite, 00484 DOMLSOutput* const destination) = 0; 00485 00503 virtual bool writeToURI(const DOMNode* nodeToWrite, 00504 const XMLCh* uri) = 0; 00524 virtual XMLCh* writeToString(const DOMNode* nodeToWrite, MemoryManager* manager = NULL) = 0; 00525 00527 00528 // ----------------------------------------------------------------------- 00529 // Non-standard Extension 00530 // ----------------------------------------------------------------------- 00539 virtual void release() = 0; 00541 00542 00543 }; 00544 00545 XERCES_CPP_NAMESPACE_END 00546 00547 #endif