1 | /*
|
---|
2 | * Copyright 1999-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 | * $Log: CMBinaryOp.hpp,v $
|
---|
19 | * Revision 1.6 2004/09/08 13:56:51 peiyongz
|
---|
20 | * Apache License Version 2.0
|
---|
21 | *
|
---|
22 | * Revision 1.5 2004/01/29 11:51:21 cargilld
|
---|
23 | * Code cleanup changes to get rid of various compiler diagnostic messages.
|
---|
24 | *
|
---|
25 | * Revision 1.4 2003/05/16 21:43:20 knoaman
|
---|
26 | * Memory manager implementation: Modify constructors to pass in the memory manager.
|
---|
27 | *
|
---|
28 | * Revision 1.3 2003/05/15 18:48:27 knoaman
|
---|
29 | * Partial implementation of the configurable memory manager.
|
---|
30 | *
|
---|
31 | * Revision 1.2 2002/11/04 14:54:58 tng
|
---|
32 | * C++ Namespace Support.
|
---|
33 | *
|
---|
34 | * Revision 1.1.1.1 2002/02/01 22:22:37 peiyongz
|
---|
35 | * sane_include
|
---|
36 | *
|
---|
37 | * Revision 1.3 2001/05/11 13:27:16 tng
|
---|
38 | * Copyright update.
|
---|
39 | *
|
---|
40 | * Revision 1.2 2001/02/16 14:58:57 tng
|
---|
41 | * Schema: Update Makefile, configure files, project files, and include path in
|
---|
42 | * certain cpp files because of the move of the common Content Model files. By Pei Yong Zhang.
|
---|
43 | *
|
---|
44 | * Revision 1.1 2001/02/16 14:17:29 tng
|
---|
45 | * Schema: Move the common Content Model files that are shared by DTD
|
---|
46 | * and schema from 'DTD' folder to 'common' folder. By Pei Yong Zhang.
|
---|
47 | *
|
---|
48 | * Revision 1.4 2000/03/02 19:55:37 roddey
|
---|
49 | * This checkin includes many changes done while waiting for the
|
---|
50 | * 1.1.0 code to be finished. I can't list them all here, but a list is
|
---|
51 | * available elsewhere.
|
---|
52 | *
|
---|
53 | * Revision 1.3 2000/02/24 20:16:47 abagchi
|
---|
54 | * Swat for removing Log from API docs
|
---|
55 | *
|
---|
56 | * Revision 1.2 2000/02/09 21:42:36 abagchi
|
---|
57 | * Copyright swat
|
---|
58 | *
|
---|
59 | * Revision 1.1.1.1 1999/11/09 01:03:02 twl
|
---|
60 | * Initial checkin
|
---|
61 | *
|
---|
62 | * Revision 1.2 1999/11/08 20:45:35 rahul
|
---|
63 | * Swat for adding in Product name and CVS comment log variable.
|
---|
64 | *
|
---|
65 | */
|
---|
66 |
|
---|
67 | #if !defined(CMBINARYOP_HPP)
|
---|
68 | #define CMBINARYOP_HPP
|
---|
69 |
|
---|
70 | #include <xercesc/validators/common/CMNode.hpp>
|
---|
71 |
|
---|
72 | XERCES_CPP_NAMESPACE_BEGIN
|
---|
73 |
|
---|
74 | class CMStateSet;
|
---|
75 |
|
---|
76 | class CMBinaryOp : public CMNode
|
---|
77 | {
|
---|
78 | public :
|
---|
79 | // -----------------------------------------------------------------------
|
---|
80 | // Constructors
|
---|
81 | // -----------------------------------------------------------------------
|
---|
82 | CMBinaryOp
|
---|
83 | (
|
---|
84 | const ContentSpecNode::NodeTypes type
|
---|
85 | , CMNode* const leftToAdopt
|
---|
86 | , CMNode* const rightToAdopt
|
---|
87 | , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
|
---|
88 | );
|
---|
89 | ~CMBinaryOp();
|
---|
90 |
|
---|
91 |
|
---|
92 | // -----------------------------------------------------------------------
|
---|
93 | // Getter methods
|
---|
94 | // -----------------------------------------------------------------------
|
---|
95 | const CMNode* getLeft() const;
|
---|
96 | CMNode* getLeft();
|
---|
97 | const CMNode* getRight() const;
|
---|
98 | CMNode* getRight();
|
---|
99 |
|
---|
100 |
|
---|
101 | // -----------------------------------------------------------------------
|
---|
102 | // Implementation of the public CMNode virtual interface
|
---|
103 | // -----------------------------------------------------------------------
|
---|
104 | bool isNullable() const;
|
---|
105 |
|
---|
106 |
|
---|
107 | protected :
|
---|
108 | // -----------------------------------------------------------------------
|
---|
109 | // Implementation of the protected CMNode virtual interface
|
---|
110 | // -----------------------------------------------------------------------
|
---|
111 | void calcFirstPos(CMStateSet& toSet) const;
|
---|
112 | void calcLastPos(CMStateSet& toSet) const;
|
---|
113 |
|
---|
114 |
|
---|
115 | private :
|
---|
116 | // -----------------------------------------------------------------------
|
---|
117 | // Private data members
|
---|
118 | //
|
---|
119 | // fLeftChild
|
---|
120 | // fRightChild
|
---|
121 | // These are the references to the two nodes that are on either side
|
---|
122 | // of this binary operation. We own them both.
|
---|
123 | // -----------------------------------------------------------------------
|
---|
124 | CMNode* fLeftChild;
|
---|
125 | CMNode* fRightChild;
|
---|
126 |
|
---|
127 | // -----------------------------------------------------------------------
|
---|
128 | // Unimplemented constructors and operators
|
---|
129 | // -----------------------------------------------------------------------
|
---|
130 | CMBinaryOp(const CMBinaryOp&);
|
---|
131 | CMBinaryOp& operator=(const CMBinaryOp&);
|
---|
132 | };
|
---|
133 |
|
---|
134 | XERCES_CPP_NAMESPACE_END
|
---|
135 |
|
---|
136 | #endif
|
---|