source: NonGTP/Xerces/xerces/include/xercesc/util/regx/ParenToken.hpp @ 358

Revision 358, 2.7 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
1/*
2 * Copyright 2001,2004 The Apache Software Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 * $Id: ParenToken.hpp,v 1.6 2004/09/08 13:56:47 peiyongz Exp $
19 */
20
21#if !defined(PARENTOKEN_HPP)
22#define PARENTOKEN_HPP
23
24// ---------------------------------------------------------------------------
25//  Includes
26// ---------------------------------------------------------------------------
27#include <xercesc/util/regx/Token.hpp>
28
29XERCES_CPP_NAMESPACE_BEGIN
30
31class XMLUTIL_EXPORT ParenToken : public Token {
32public:
33        // -----------------------------------------------------------------------
34    //  Public Constructors and Destructor
35    // -----------------------------------------------------------------------
36        ParenToken(const unsigned short tokType, Token* const tok,
37               const int noParen, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
38    ~ParenToken();
39
40        // -----------------------------------------------------------------------
41    //  Getter methods
42    // -----------------------------------------------------------------------
43    int size() const;
44        int getNoParen() const;
45    Token* getChild(const int index) const;
46
47private:
48        // -----------------------------------------------------------------------
49    //  Unimplemented constructors and operators
50    // -----------------------------------------------------------------------
51    ParenToken(const ParenToken&);
52    ParenToken& operator=(const ParenToken&);
53
54        // -----------------------------------------------------------------------
55    //  Private data members
56        // -----------------------------------------------------------------------
57        int    fNoParen;
58        Token* fChild;
59};
60
61
62// ---------------------------------------------------------------------------
63//  ParenToken: getter methods
64// ---------------------------------------------------------------------------
65inline int ParenToken::size() const {
66
67    return 1;
68}
69
70inline int ParenToken::getNoParen() const {
71
72    return fNoParen;
73}
74
75inline Token* ParenToken::getChild(const int) const {
76
77    return fChild;
78}
79
80XERCES_CPP_NAMESPACE_END
81
82#endif
83
84/**
85  * End of file ParenToken.hpp
86  */
Note: See TracBrowser for help on using the repository browser.