secureswitools/swisistools/source/xmlparser/xerces/include/xercesc/framework/StdInInputSource.hpp
changeset 0 ba25891c3a9e
child 1 c42dffbd5b4f
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 /*
       
    18  * Licensed to the Apache Software Foundation (ASF) under one or more
       
    19  * contributor license agreements.  See the NOTICE file distributed with
       
    20  * this work for additional information regarding copyright ownership.
       
    21  * The ASF licenses this file to You under the Apache License, Version 2.0
       
    22  * (the "License"); you may not use this file except in compliance with
       
    23  * the License.  You may obtain a copy of the License at
       
    24  * 
       
    25  *      http://www.apache.org/licenses/LICENSE-2.0
       
    26  * 
       
    27  * Unless required by applicable law or agreed to in writing, software
       
    28  * distributed under the License is distributed on an "AS IS" BASIS,
       
    29  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
    30  * See the License for the specific language governing permissions and
       
    31  * limitations under the License.
       
    32  */
       
    33 
       
    34 /*
       
    35  * $Id: StdInInputSource.hpp 568078 2007-08-21 11:43:25Z amassari $
       
    36  */
       
    37 
       
    38 
       
    39 #if !defined(STDININPUTSOURCE_HPP)
       
    40 #define STDININPUTSOURCE_HPP
       
    41 
       
    42 #include <xercesc/sax/InputSource.hpp>
       
    43 
       
    44 XERCES_CPP_NAMESPACE_BEGIN
       
    45 
       
    46 class BinInputStream;
       
    47 
       
    48 
       
    49 /**
       
    50  *  This class is a derivative of the standard InputSource class. It provides
       
    51  *  for the parser access to data via the standard input. This input source
       
    52  *  is not commonly used, but can be useful when implementing such things
       
    53  *  as pipe based tools which exchange XML data.
       
    54  *
       
    55  *  As with all InputSource derivatives. The primary objective of an input
       
    56  *  source is to create an input stream via which the parser can spool in
       
    57  *  data from the referenced source.
       
    58  */
       
    59 class XMLPARSER_EXPORT StdInInputSource : public InputSource
       
    60 {
       
    61 public :
       
    62     // -----------------------------------------------------------------------
       
    63     //  Constructors and Destructor
       
    64     // -----------------------------------------------------------------------
       
    65 
       
    66     /** @name Constructor */
       
    67     //@{
       
    68 
       
    69     /**
       
    70       * Since the standard input is a canned source, the constructor is very
       
    71       * simple. It just uses local platform services to open up the standard
       
    72       * input source as file, a new handleof which it gives to each new stream
       
    73       * it creates.
       
    74       */
       
    75     StdInInputSource(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
       
    76     //@}
       
    77 
       
    78     /** @name Destructor */
       
    79     //@{
       
    80     ~StdInInputSource();
       
    81     //@}
       
    82 
       
    83 
       
    84     // -----------------------------------------------------------------------
       
    85     //  Virtual input source interface
       
    86     // -----------------------------------------------------------------------
       
    87 
       
    88 
       
    89     /** @name Virtual methods */
       
    90     //@{
       
    91 
       
    92     /**
       
    93      * This method will return a binary input stream derivative that will
       
    94      * parse from the standard input of the local host.
       
    95      *
       
    96      * @return A dynamically allocated binary input stream derivative that
       
    97      *         can parse from the standardinput.
       
    98      */
       
    99     BinInputStream* makeStream() const;
       
   100 
       
   101     //@}
       
   102 
       
   103 private:
       
   104     // -----------------------------------------------------------------------
       
   105     //  Unimplemented constructors and operators
       
   106     // -----------------------------------------------------------------------
       
   107     StdInInputSource(const StdInInputSource&);
       
   108     StdInInputSource& operator=(const StdInInputSource&);
       
   109 
       
   110 };
       
   111 
       
   112 inline StdInInputSource::StdInInputSource(MemoryManager* const manager) :
       
   113 
       
   114     InputSource("stdin", manager)
       
   115 {
       
   116 }
       
   117 
       
   118 inline StdInInputSource::~StdInInputSource()
       
   119 {
       
   120 }
       
   121 
       
   122 XERCES_CPP_NAMESPACE_END
       
   123 
       
   124 #endif