Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XalanHTMLElementsProperties.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 1999-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 #if !defined(XALANHTMLELEMENTSPROPERTIES_HEADER_GUARD_1357924680)
17 #define XALANHTMLELEMENTSPROPERTIES_HEADER_GUARD_1357924680
18 
19 
20 
21 // Base include file. Must be first.
23 
24 
25 
27 
28 
29 
30 XALAN_CPP_NAMESPACE_BEGIN
31 
32 
33 
35 {
36 public:
37 
38  enum { eMaxAttributes = 6, eMaxAttributeName = 8, eMaxElementName = 10 };
39 
40  enum eFlags
41  {
42  EMPTY = (1 << 1),
43  FLOW = (1 << 2),
44  BLOCK = (1 << 3),
45  BLOCKFORM = (1 << 4),
46  BLOCKFORMFIELDSET = (1 << 5),
47  CDATA = (1 << 6),
48  PCDATA = (1 << 7),
49  RAW = (1 << 8),
50  INLINE = (1 << 9),
51  INLINEA = (1 << 10),
52  INLINELABEL = (1 << 11),
53  FONTSTYLE = (1 << 12),
54  PHRASE = (1 << 13),
55  FORMCTRL = (1 << 14),
56  SPECIAL = (1 << 15),
57  ASPECIAL = (1 << 16),
58  HEADMISC = (1 << 17),
59  HEAD = (1 << 18),
60  LIST = (1 << 19),
61  PREFORMATTED = (1 << 20),
62  WHITESPACESENSITIVE = (1 << 21),
63  HEADELEM = (1 << 22),
64  STYLEELEM = (1 << 23),
65  SCRIPTELEM = (1 << 24),
66 
67  ATTRURL = (1 << 1),
68  ATTREMPTY = (1 << 2)
69  };
70 
72  {
73  typedef unsigned char FlagsType;
74 
75  XalanDOMChar m_name[eMaxAttributeName + 1];
76 
78 
87  bool
88  is(FlagsType theFlags) const
89  {
90  return m_flags & theFlags ? true : false;
91  }
92  };
93 
95  {
97  typedef unsigned int FlagsType;
98 
108  bool
109  isAttribute(
110  const XalanDOMChar* theAttributeName,
111  AttributeFlagsType theFlags) const;
112 
121  bool
122  is(FlagsType theFlags) const
123  {
124  return m_flags & theFlags ? true : false;
125  }
126 
127  // Data members...
128  XalanDOMChar m_name[eMaxElementName + 1];
129 
131 
132  InternalAttributeProperties m_attributes[eMaxAttributes + 1];
133 
141  findProperties(const XalanDOMChar* theAttributeName) const;
142 
144  };
145 
151  {
152  public:
153 
156 
161  ElementProperties(const InternalElementProperties* theProperties = 0) :
162  m_properties(theProperties)
163  {
164  }
165 
171  m_properties(theSource.m_properties)
172  {
173  }
174 
182  bool
183  null() const
184  {
185  return m_properties == 0 ? true : false;
186  }
187 
196  bool
197  is(FlagsType theFlags) const
198  {
199  return m_properties->is(theFlags);
200  }
201 
211  bool
213  const XalanDOMChar* theAttributeName,
214  AttributeFlagsType theFlags) const
215  {
216  return m_properties->isAttribute(theAttributeName, theFlags);
217  }
218 
219  private:
220 
221  const InternalElementProperties* m_properties;
222  };
223 
230  static ElementProperties
231  find(const XalanDOMChar* theElementName);
232 
233 private:
234 
241  static const InternalElementProperties&
242  findProperties(const XalanDOMChar* theElementName);
243 
244  // The order of these is significant!!!
245 
246  // The array of properties...
247  static const InternalElementProperties s_elementProperties[];
248 
249  // This point to the last of the real propeties in the array.
250  static const InternalElementProperties* const s_lastProperties;
251 
252  // This point to the last of the properties in the array, which is
253  // a dummy instance we return when an instance that matches the
254  // element name cannot be found.
255  static const InternalElementProperties* const s_dummyProperties;
256 
257 
258  // These are undefined...
260 
262 
264  operator=(const XalanHTMLElementsProperties&);
265 
266 };
267 
268 
269 
270 XALAN_CPP_NAMESPACE_END
271 
272 
273 
274 #endif // XALANHTMLELEMENTSPROPERTIES_HEADER_GUARD_1357924680
eFlags
Definition: XalanHTMLElementsProperties.hpp:40
static const InternalAttributeProperties s_dummyProperties
Definition: XalanHTMLElementsProperties.hpp:143
bool isAttribute(const XalanDOMChar *theAttributeName, AttributeFlagsType theFlags) const
Check if particular attribute properties are set for this instance.
Definition: XalanHTMLElementsProperties.hpp:212
FlagsType m_flags
Definition: XalanHTMLElementsProperties.hpp:77
Definition: XalanHTMLElementsProperties.hpp:71
bool is(FlagsType theFlags) const
Check if particular properties are set for this instance.
Definition: XalanHTMLElementsProperties.hpp:122
unsigned int FlagsType
Definition: XalanHTMLElementsProperties.hpp:97
bool null() const
Determine if this is a non-null instance.
Definition: XalanHTMLElementsProperties.hpp:183
unsigned char FlagsType
Definition: XalanHTMLElementsProperties.hpp:73
InternalElementProperties::FlagsType FlagsType
Definition: XalanHTMLElementsProperties.hpp:155
InternalElementProperties::AttributeFlagsType AttributeFlagsType
Definition: XalanHTMLElementsProperties.hpp:154
Definition: XalanHTMLElementsProperties.hpp:34
FlagsType m_flags
Definition: XalanHTMLElementsProperties.hpp:130
#define XALAN_XMLSUPPORT_EXPORT
Definition: XMLSupportDefinitions.hpp:33
This class acts as a proxy for and InternalElementProperties instance.
Definition: XalanHTMLElementsProperties.hpp:150
bool is(FlagsType theFlags) const
Check if particular properties are set for this instance.
Definition: XalanHTMLElementsProperties.hpp:88
bool is(FlagsType theFlags) const
Check if particular properties are set for this instance.
Definition: XalanHTMLElementsProperties.hpp:197
InternalAttributeProperties::FlagsType AttributeFlagsType
Definition: XalanHTMLElementsProperties.hpp:96
Definition: XalanHTMLElementsProperties.hpp:94
ElementProperties(const ElementProperties &theSource)
Copy constructor.
Definition: XalanHTMLElementsProperties.hpp:170
ElementProperties(const InternalElementProperties *theProperties=0)
Constructor.
Definition: XalanHTMLElementsProperties.hpp:161

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

dot

Xalan-C++ XSLT Processor Version 1.10
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.

Apache Logo