secureswitools/swisistools/source/xmlparser/xerces/include/xercesc/util/regx/ConcatToken.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: ConcatToken.hpp 568078 2007-08-21 11:43:25Z amassari $
       
    36  */
       
    37 
       
    38 #if !defined(CONCATTOKEN_HPP)
       
    39 #define CONCATTOKEN_HPP
       
    40 
       
    41 // ---------------------------------------------------------------------------
       
    42 //  Includes
       
    43 // ---------------------------------------------------------------------------
       
    44 #include <xercesc/util/regx/Token.hpp>
       
    45 
       
    46 XERCES_CPP_NAMESPACE_BEGIN
       
    47 
       
    48 class XMLUTIL_EXPORT ConcatToken : public Token {
       
    49 public:
       
    50 	// -----------------------------------------------------------------------
       
    51     //  Public Constructors and Destructor
       
    52     // -----------------------------------------------------------------------
       
    53 	ConcatToken(Token* const tok1, Token* const tok2
       
    54         , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
       
    55 	~ConcatToken();
       
    56 
       
    57 	// -----------------------------------------------------------------------
       
    58     //  Getter methods
       
    59     // -----------------------------------------------------------------------
       
    60 	Token* getChild(const int index) const;
       
    61 	int    size() const;
       
    62 
       
    63 private:
       
    64 	// -----------------------------------------------------------------------
       
    65     //  Unimplemented constructors and operators
       
    66     // -----------------------------------------------------------------------
       
    67     ConcatToken(const ConcatToken&);
       
    68     ConcatToken& operator=(const ConcatToken&);
       
    69 
       
    70 	// -----------------------------------------------------------------------
       
    71     //  Private data members
       
    72 	// -----------------------------------------------------------------------
       
    73 	Token* fChild1;
       
    74 	Token* fChild2;
       
    75 };
       
    76 
       
    77 
       
    78 // ---------------------------------------------------------------------------
       
    79 //  StringToken: getter methods
       
    80 // ---------------------------------------------------------------------------
       
    81 inline int ConcatToken::size() const {
       
    82 
       
    83 	return 2;
       
    84 }
       
    85 
       
    86 inline Token* ConcatToken::getChild(const int index) const {
       
    87 
       
    88 	return index == 0 ? fChild1 : fChild2;
       
    89 }
       
    90 
       
    91 XERCES_CPP_NAMESPACE_END
       
    92 
       
    93 #endif
       
    94 
       
    95 /**
       
    96   * End of file ConcatToken.hpp
       
    97   */