source: NonGTP/Xerces/xerces-c_2_8_0/include/xercesc/validators/common/CMAny.hpp @ 2674

Revision 2674, 3.5 KB checked in by mattausch, 16 years ago (diff)
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: CMAny.hpp 568078 2007-08-21 11:43:25Z amassari $
20 */
21
22#if !defined(CMANY_HPP)
23#define CMANY_HPP
24
25#include <xercesc/validators/common/CMNode.hpp>
26
27XERCES_CPP_NAMESPACE_BEGIN
28
29class CMStateSet;
30
31class CMAny : public CMNode
32{
33public :
34    // -----------------------------------------------------------------------
35    //  Constructors
36    // -----------------------------------------------------------------------
37    CMAny
38    (
39        const   ContentSpecNode::NodeTypes type
40        , const unsigned int               URI
41        , const unsigned int               position
42        ,       MemoryManager* const       manager = XMLPlatformUtils::fgMemoryManager
43    );
44    ~CMAny();
45
46    // -----------------------------------------------------------------------
47    //  Getter methods
48    // -----------------------------------------------------------------------
49    unsigned int getURI() const;
50
51    unsigned int getPosition() const;
52
53    // -----------------------------------------------------------------------
54    //  Setter methods
55    // -----------------------------------------------------------------------
56    void setPosition(const unsigned int newPosition);
57
58    // -----------------------------------------------------------------------
59    //  Implementation of the public CMNode virtual interface
60    // -----------------------------------------------------------------------
61    bool isNullable() const;
62
63
64protected :
65    // -----------------------------------------------------------------------
66    //  Implementation of the protected CMNode virtual interface
67    // -----------------------------------------------------------------------
68    void calcFirstPos(CMStateSet& toSet) const;
69    void calcLastPos(CMStateSet& toSet) const;
70
71private :
72    // -----------------------------------------------------------------------
73    //  Private data members
74    //
75    //  fURI;
76    //  URI of the any content model. This value is set if the type is
77    //  of the following:
78    //  XMLContentSpec.CONTENTSPECNODE_ANY,
79    //  XMLContentSpec.CONTENTSPECNODE_ANY_OTHER.
80    //
81        //  fPosition
82    //  Part of the algorithm to convert a regex directly to a DFA
83    //  numbers each leaf sequentially. If its -1, that means its an
84    //  epsilon node. Zero and greater are non-epsilon positions.
85    // -----------------------------------------------------------------------
86    unsigned int fURI;
87    unsigned int fPosition;
88
89    // -----------------------------------------------------------------------
90    //  Unimplemented constructors and operators
91    // -----------------------------------------------------------------------
92    CMAny(const CMAny&);
93    CMAny& operator=(const CMAny&);
94};
95
96XERCES_CPP_NAMESPACE_END
97
98#endif
Note: See TracBrowser for help on using the repository browser.