|
||||
File indexing completed on 2025-01-30 10:27:04
0001 /* 0002 * Licensed to the Apache Software Foundation (ASF) under one or more 0003 * contributor license agreements. See the NOTICE file distributed with 0004 * this work for additional information regarding copyright ownership. 0005 * The ASF licenses this file to You under the Apache License, Version 2.0 0006 * (the "License"); you may not use this file except in compliance with 0007 * the License. You may obtain a copy of the License at 0008 * 0009 * http://www.apache.org/licenses/LICENSE-2.0 0010 * 0011 * Unless required by applicable law or agreed to in writing, software 0012 * distributed under the License is distributed on an "AS IS" BASIS, 0013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0014 * See the License for the specific language governing permissions and 0015 * limitations under the License. 0016 */ 0017 0018 /* 0019 * $Id$ 0020 */ 0021 0022 0023 #if !defined(XERCESC_INCLUDE_GUARD_STDININPUTSOURCE_HPP) 0024 #define XERCESC_INCLUDE_GUARD_STDININPUTSOURCE_HPP 0025 0026 #include <xercesc/sax/InputSource.hpp> 0027 0028 XERCES_CPP_NAMESPACE_BEGIN 0029 0030 class BinInputStream; 0031 0032 0033 /** 0034 * This class is a derivative of the standard InputSource class. It provides 0035 * for the parser access to data via the standard input. This input source 0036 * is not commonly used, but can be useful when implementing such things 0037 * as pipe based tools which exchange XML data. 0038 * 0039 * As with all InputSource derivatives. The primary objective of an input 0040 * source is to create an input stream via which the parser can spool in 0041 * data from the referenced source. 0042 */ 0043 class XMLPARSER_EXPORT StdInInputSource : public InputSource 0044 { 0045 public : 0046 // ----------------------------------------------------------------------- 0047 // Constructors and Destructor 0048 // ----------------------------------------------------------------------- 0049 0050 /** @name Constructor */ 0051 //@{ 0052 0053 /** 0054 * Since the standard input is a canned source, the constructor is very 0055 * simple. It just uses local platform services to open up the standard 0056 * input source as file, a new handleof which it gives to each new stream 0057 * it creates. 0058 */ 0059 StdInInputSource(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); 0060 //@} 0061 0062 /** @name Destructor */ 0063 //@{ 0064 ~StdInInputSource(); 0065 //@} 0066 0067 0068 // ----------------------------------------------------------------------- 0069 // Virtual input source interface 0070 // ----------------------------------------------------------------------- 0071 0072 0073 /** @name Virtual methods */ 0074 //@{ 0075 0076 /** 0077 * This method will return a binary input stream derivative that will 0078 * parse from the standard input of the local host. 0079 * 0080 * @return A dynamically allocated binary input stream derivative that 0081 * can parse from the standardinput. 0082 */ 0083 BinInputStream* makeStream() const; 0084 0085 //@} 0086 0087 private: 0088 // ----------------------------------------------------------------------- 0089 // Unimplemented constructors and operators 0090 // ----------------------------------------------------------------------- 0091 StdInInputSource(const StdInInputSource&); 0092 StdInInputSource& operator=(const StdInInputSource&); 0093 0094 }; 0095 0096 inline StdInInputSource::StdInInputSource(MemoryManager* const manager) : 0097 0098 InputSource("stdin", manager) 0099 { 0100 } 0101 0102 inline StdInInputSource::~StdInInputSource() 0103 { 0104 } 0105 0106 XERCES_CPP_NAMESPACE_END 0107 0108 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |