source: icXML/icXML-devel/src/icxercesc/util/regx/UnionToken.hpp @ 2721

Last change on this file since 2721 was 2721, checked in by cameron, 6 years ago

Fix imports in icXML modified Xerces files

File size: 3.4 KB
Line 
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements.  See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License.  You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/*
19 * $Id: UnionToken.hpp 678879 2008-07-22 20:05:05Z amassari $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_UNIONTOKEN_HPP)
23#define XERCESC_INCLUDE_GUARD_UNIONTOKEN_HPP
24
25// ---------------------------------------------------------------------------
26//  Includes
27// ---------------------------------------------------------------------------
28#include <xercesc/util/regx/Token.hpp>
29#include <xercesc/util/RefVectorOf.hpp>
30#include <icxercesc/framework/XMLBuffer.hpp>
31
32XERCES_CPP_NAMESPACE_BEGIN
33
34class XMLUTIL_EXPORT UnionToken : public Token {
35public:
36    // -----------------------------------------------------------------------
37    //  Public Constructors and Destructor
38    // -----------------------------------------------------------------------
39    UnionToken(const tokType tkType
40        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
41    ~UnionToken();
42
43    // -----------------------------------------------------------------------
44    //  Getter methods
45    // -----------------------------------------------------------------------
46    XMLSize_t size() const;
47    Token* getChild(const XMLSize_t index) const;
48
49    // -----------------------------------------------------------------------
50    //  Children manipulation methods
51    // -----------------------------------------------------------------------
52    void addChild(Token* const child, TokenFactory* const tokFactory);
53
54private:
55    // -----------------------------------------------------------------------
56    //  Unimplemented constructors and operators
57    // -----------------------------------------------------------------------
58    UnionToken(const UnionToken&);
59    UnionToken& operator=(const UnionToken&);
60
61    // -----------------------------------------------------------------------
62    //  Private Constants
63    // -----------------------------------------------------------------------
64    static const unsigned short INITIALSIZE;
65
66    // -----------------------------------------------------------------------
67    //  Private data members
68    // -----------------------------------------------------------------------
69    RefVectorOf<Token>* fChildren;
70};
71
72
73// ---------------------------------------------------------------------------
74//  UnionToken: getter methods
75// ---------------------------------------------------------------------------
76inline XMLSize_t UnionToken::size() const {
77
78    return fChildren == 0 ? 0 : fChildren->size();
79}
80
81inline Token* UnionToken::getChild(const XMLSize_t index) const {
82
83    return fChildren->elementAt(index);
84}
85
86XERCES_CPP_NAMESPACE_END
87
88#endif
89
90/**
91  * End of file UnionToken.hpp
92  */
Note: See TracBrowser for help on using the repository browser.