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: ModifierToken.hpp,v 1.6 2004/09/08 13:56:47 peiyongz Exp $
|
---|
19 | */
|
---|
20 |
|
---|
21 | #if !defined(MODIFIERTOKEN_HPP)
|
---|
22 | #define MODIFIERTOKEN_HPP
|
---|
23 |
|
---|
24 | // ---------------------------------------------------------------------------
|
---|
25 | // Includes
|
---|
26 | // ---------------------------------------------------------------------------
|
---|
27 | #include <xercesc/util/regx/Token.hpp>
|
---|
28 |
|
---|
29 | XERCES_CPP_NAMESPACE_BEGIN
|
---|
30 |
|
---|
31 | class XMLUTIL_EXPORT ModifierToken : public Token {
|
---|
32 | public:
|
---|
33 | // -----------------------------------------------------------------------
|
---|
34 | // Public Constructors and Destructor
|
---|
35 | // -----------------------------------------------------------------------
|
---|
36 | ModifierToken(Token* const child, const int options, const int mask
|
---|
37 | , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
|
---|
38 | ~ModifierToken();
|
---|
39 |
|
---|
40 | // -----------------------------------------------------------------------
|
---|
41 | // Getter methods
|
---|
42 | // -----------------------------------------------------------------------
|
---|
43 | int size() const;
|
---|
44 | int getOptions() const;
|
---|
45 | int getOptionsMask() const;
|
---|
46 | Token* getChild(const int index) const;
|
---|
47 |
|
---|
48 | private:
|
---|
49 | // -----------------------------------------------------------------------
|
---|
50 | // Unimplemented constructors and operators
|
---|
51 | // -----------------------------------------------------------------------
|
---|
52 | ModifierToken(const ModifierToken&);
|
---|
53 | ModifierToken& operator=(const ModifierToken&);
|
---|
54 |
|
---|
55 | // -----------------------------------------------------------------------
|
---|
56 | // Private data members
|
---|
57 | // -----------------------------------------------------------------------
|
---|
58 | int fOptions;
|
---|
59 | int fOptionsMask;
|
---|
60 | Token* fChild;
|
---|
61 | };
|
---|
62 |
|
---|
63 |
|
---|
64 | // ---------------------------------------------------------------------------
|
---|
65 | // ModifierToken: getter methods
|
---|
66 | // ---------------------------------------------------------------------------
|
---|
67 | inline int ModifierToken::size() const {
|
---|
68 |
|
---|
69 | return 1;
|
---|
70 | }
|
---|
71 |
|
---|
72 | inline int ModifierToken::getOptions() const {
|
---|
73 |
|
---|
74 | return fOptions;
|
---|
75 | }
|
---|
76 |
|
---|
77 | inline int ModifierToken::getOptionsMask() const {
|
---|
78 |
|
---|
79 | return fOptionsMask;
|
---|
80 | }
|
---|
81 |
|
---|
82 | inline Token* ModifierToken::getChild(const int) const {
|
---|
83 |
|
---|
84 | return fChild;
|
---|
85 | }
|
---|
86 |
|
---|
87 | XERCES_CPP_NAMESPACE_END
|
---|
88 |
|
---|
89 | #endif
|
---|
90 |
|
---|
91 | /**
|
---|
92 | * End of file ModifierToken.hpp
|
---|
93 | */
|
---|