161 lines
16 KiB
HTML
161 lines
16 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
|
<title>XQilla Simple API Documentation</title>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
|
</head><body>
|
|
<a style="float:right;" href="http://sourceforge.net/projects/xqilla"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=152021&type=2" border="0" alt="SourceForge.net Logo" /></a>
|
|
<!-- Generated by Doxygen 1.3.9.1 -->
|
|
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="examples.html">Examples</a></div>
|
|
<div class="nav">
|
|
<a class="el" href="dir_000000.html">include</a> / <a class="el" href="dir_000001.html">xqilla</a> / <a class="el" href="dir_000004.html">events</a></div>
|
|
<h1>EventHandler.hpp</h1><a href="EventHandler_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
|
|
00002 <span class="comment"> * Copyright (c) 2001-2008</span>
|
|
00003 <span class="comment"> * DecisionSoft Limited. All rights reserved.</span>
|
|
00004 <span class="comment"> * Copyright (c) 2004-2008</span>
|
|
00005 <span class="comment"> * Oracle. All rights reserved.</span>
|
|
00006 <span class="comment"> *</span>
|
|
00007 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span>
|
|
00008 <span class="comment"> * you may not use this file except in compliance with the License.</span>
|
|
00009 <span class="comment"> * You may obtain a copy of the License at</span>
|
|
00010 <span class="comment"> *</span>
|
|
00011 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span>
|
|
00012 <span class="comment"> *</span>
|
|
00013 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
|
|
00014 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
|
|
00015 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
|
|
00016 <span class="comment"> * See the License for the specific language governing permissions and</span>
|
|
00017 <span class="comment"> * limitations under the License.</span>
|
|
00018 <span class="comment"> *</span>
|
|
00019 <span class="comment"> * $Id: EventHandler.hpp 531 2008-04-10 23:23:07Z jpcs $</span>
|
|
00020 <span class="comment"> */</span>
|
|
00021
|
|
00022 <span class="preprocessor">#ifndef _EVENTHANDLER_HPP</span>
|
|
00023 <span class="preprocessor"></span><span class="preprocessor">#define _EVENTHANDLER_HPP</span>
|
|
00024 <span class="preprocessor"></span>
|
|
00025 <span class="preprocessor">#include <xqilla/framework/XQillaExport.hpp></span>
|
|
00026 <span class="preprocessor">#include <<a class="code" href="AnyAtomicType_8hpp.html">xqilla/items/AnyAtomicType.hpp</a>></span>
|
|
00027 <span class="preprocessor">#include <<a class="code" href="LocationInfo_8hpp.html">xqilla/ast/LocationInfo.hpp</a>></span>
|
|
00028
|
|
00029 <span class="preprocessor">#include <xercesc/util/XercesDefs.hpp></span>
|
|
00030
|
|
<a name="l00031"></a><a class="code" href="classEventHandler.html">00031</a> <span class="keyword">class </span>XQILLA_API EventHandler
|
|
00032 {
|
|
00033 <span class="keyword">public</span>:
|
|
<a name="l00034"></a><a class="code" href="classEventHandler.html#a0">00034</a> <span class="keyword">virtual</span> <a class="code" href="classEventHandler.html#a0">~EventHandler</a>() {};
|
|
00035
|
|
<a name="l00038"></a><a class="code" href="classEventHandler.html#a1">00038</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a1">setLocationInfo</a>(<span class="keyword">const</span> <a class="code" href="classLocationInfo.html">LocationInfo</a> *location) {}
|
|
00039
|
|
00041 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a2">startDocumentEvent</a>(<span class="keyword">const</span> XMLCh *documentURI, <span class="keyword">const</span> XMLCh *encoding) = 0;
|
|
00043 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a3">endDocumentEvent</a>() = 0;
|
|
00045 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a4">startElementEvent</a>(<span class="keyword">const</span> XMLCh *prefix, <span class="keyword">const</span> XMLCh *uri, <span class="keyword">const</span> XMLCh *localname) = 0;
|
|
00047 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a5">endElementEvent</a>(<span class="keyword">const</span> XMLCh *prefix, <span class="keyword">const</span> XMLCh *uri, <span class="keyword">const</span> XMLCh *localname,
|
|
00048 <span class="keyword">const</span> XMLCh *typeURI, <span class="keyword">const</span> XMLCh *typeName) = 0;
|
|
00050 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a6">piEvent</a>(<span class="keyword">const</span> XMLCh *target, <span class="keyword">const</span> XMLCh *value) = 0;
|
|
00052 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a7">textEvent</a>(<span class="keyword">const</span> XMLCh *value) = 0;
|
|
00054 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a7">textEvent</a>(<span class="keyword">const</span> XMLCh *chars, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> length) = 0;
|
|
00056 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a9">commentEvent</a>(<span class="keyword">const</span> XMLCh *value) = 0;
|
|
00058 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a10">attributeEvent</a>(<span class="keyword">const</span> XMLCh *prefix, <span class="keyword">const</span> XMLCh *uri, <span class="keyword">const</span> XMLCh *localname, <span class="keyword">const</span> XMLCh *value,
|
|
00059 <span class="keyword">const</span> XMLCh *typeURI, <span class="keyword">const</span> XMLCh *typeName) = 0;
|
|
00061 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a11">namespaceEvent</a>(<span class="keyword">const</span> XMLCh *prefix, <span class="keyword">const</span> XMLCh *uri) = 0;
|
|
<a name="l00063"></a><a class="code" href="classEventHandler.html#a12">00063</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a12">atomicItemEvent</a>(AnyAtomicType::AtomicObjectType type, <span class="keyword">const</span> XMLCh *value,
|
|
00064 <span class="keyword">const</span> XMLCh *typeURI, <span class="keyword">const</span> XMLCh *typeName) {}
|
|
00066 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a13">endEvent</a>() = 0;
|
|
00067 };
|
|
00068
|
|
<a name="l00069"></a><a class="code" href="classEventFilter.html">00069</a> <span class="keyword">class </span>XQILLA_API EventFilter : <span class="keyword">public</span> EventHandler
|
|
00070 {
|
|
00071 <span class="keyword">public</span>:
|
|
<a name="l00072"></a><a class="code" href="classEventFilter.html#a0">00072</a> EventFilter(EventHandler *next)
|
|
00073 : next_(next)
|
|
00074 {
|
|
00075 }
|
|
00076
|
|
<a name="l00077"></a><a class="code" href="classEventFilter.html#a1">00077</a> <span class="keywordtype">void</span> setNextEventHandler(EventHandler *next)
|
|
00078 {
|
|
00079 next_ = next;
|
|
00080 }
|
|
00081
|
|
<a name="l00082"></a><a class="code" href="classEventFilter.html#a2">00082</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a1">setLocationInfo</a>(<span class="keyword">const</span> <a class="code" href="classLocationInfo.html">LocationInfo</a> *location)
|
|
00083 {
|
|
00084 next_-><a class="code" href="classEventHandler.html#a1">setLocationInfo</a>(location);
|
|
00085 }
|
|
00086
|
|
<a name="l00087"></a><a class="code" href="classEventFilter.html#a3">00087</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a2">startDocumentEvent</a>(<span class="keyword">const</span> XMLCh *documentURI, <span class="keyword">const</span> XMLCh *encoding)
|
|
00088 {
|
|
00089 next_-><a class="code" href="classEventHandler.html#a2">startDocumentEvent</a>(documentURI, encoding);
|
|
00090 }
|
|
00091
|
|
<a name="l00092"></a><a class="code" href="classEventFilter.html#a4">00092</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a3">endDocumentEvent</a>()
|
|
00093 {
|
|
00094 next_-><a class="code" href="classEventHandler.html#a3">endDocumentEvent</a>();
|
|
00095 }
|
|
00096
|
|
<a name="l00097"></a><a class="code" href="classEventFilter.html#a5">00097</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a4">startElementEvent</a>(<span class="keyword">const</span> XMLCh *prefix, <span class="keyword">const</span> XMLCh *uri, <span class="keyword">const</span> XMLCh *localname)
|
|
00098 {
|
|
00099 next_-><a class="code" href="classEventHandler.html#a4">startElementEvent</a>(prefix, uri, localname);
|
|
00100 }
|
|
00101
|
|
<a name="l00102"></a><a class="code" href="classEventFilter.html#a6">00102</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a5">endElementEvent</a>(<span class="keyword">const</span> XMLCh *prefix, <span class="keyword">const</span> XMLCh *uri, <span class="keyword">const</span> XMLCh *localname,
|
|
00103 <span class="keyword">const</span> XMLCh *typeURI, <span class="keyword">const</span> XMLCh *typeName)
|
|
00104 {
|
|
00105 next_-><a class="code" href="classEventHandler.html#a5">endElementEvent</a>(prefix, uri, localname, typeURI, typeName);
|
|
00106 }
|
|
00107
|
|
<a name="l00108"></a><a class="code" href="classEventFilter.html#a7">00108</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a6">piEvent</a>(<span class="keyword">const</span> XMLCh *target, <span class="keyword">const</span> XMLCh *value)
|
|
00109 {
|
|
00110 next_-><a class="code" href="classEventHandler.html#a6">piEvent</a>(target, value);
|
|
00111 }
|
|
00112
|
|
<a name="l00113"></a><a class="code" href="classEventFilter.html#a8">00113</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a7">textEvent</a>(<span class="keyword">const</span> XMLCh *value)
|
|
00114 {
|
|
00115 next_-><a class="code" href="classEventHandler.html#a7">textEvent</a>(value);
|
|
00116 }
|
|
00117
|
|
<a name="l00118"></a><a class="code" href="classEventFilter.html#a9">00118</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a7">textEvent</a>(<span class="keyword">const</span> XMLCh *chars, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> length)
|
|
00119 {
|
|
00120 next_-><a class="code" href="classEventHandler.html#a7">textEvent</a>(chars, length);
|
|
00121 }
|
|
00122
|
|
<a name="l00123"></a><a class="code" href="classEventFilter.html#a10">00123</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a9">commentEvent</a>(<span class="keyword">const</span> XMLCh *value)
|
|
00124 {
|
|
00125 next_-><a class="code" href="classEventHandler.html#a9">commentEvent</a>(value);
|
|
00126 }
|
|
00127
|
|
<a name="l00128"></a><a class="code" href="classEventFilter.html#a11">00128</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a10">attributeEvent</a>(<span class="keyword">const</span> XMLCh *prefix, <span class="keyword">const</span> XMLCh *uri, <span class="keyword">const</span> XMLCh *localname, <span class="keyword">const</span> XMLCh *value,
|
|
00129 <span class="keyword">const</span> XMLCh *typeURI, <span class="keyword">const</span> XMLCh *typeName)
|
|
00130 {
|
|
00131 next_-><a class="code" href="classEventHandler.html#a10">attributeEvent</a>(prefix, uri, localname, value, typeURI, typeName);
|
|
00132 }
|
|
00133
|
|
<a name="l00134"></a><a class="code" href="classEventFilter.html#a12">00134</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a11">namespaceEvent</a>(<span class="keyword">const</span> XMLCh *prefix, <span class="keyword">const</span> XMLCh *uri)
|
|
00135 {
|
|
00136 next_-><a class="code" href="classEventHandler.html#a11">namespaceEvent</a>(prefix, uri);
|
|
00137 }
|
|
00138
|
|
<a name="l00139"></a><a class="code" href="classEventFilter.html#a13">00139</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a12">atomicItemEvent</a>(AnyAtomicType::AtomicObjectType type, <span class="keyword">const</span> XMLCh *value, <span class="keyword">const</span> XMLCh *typeURI,
|
|
00140 <span class="keyword">const</span> XMLCh *typeName)
|
|
00141 {
|
|
00142 next_-><a class="code" href="classEventHandler.html#a12">atomicItemEvent</a>(type, value, typeURI, typeName);
|
|
00143 }
|
|
00144
|
|
<a name="l00145"></a><a class="code" href="classEventFilter.html#a14">00145</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#a13">endEvent</a>()
|
|
00146 {
|
|
00147 next_-><a class="code" href="classEventHandler.html#a13">endEvent</a>();
|
|
00148 }
|
|
00149
|
|
00150 <span class="keyword">protected</span>:
|
|
<a name="l00151"></a><a class="code" href="classEventFilter.html#p0">00151</a> EventHandler *next_;
|
|
00152 };
|
|
00153
|
|
<a name="l00154"></a><a class="code" href="EventHandler_8hpp.html#a0">00154</a> <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">const</span> XMLCh *<a class="code" href="EventHandler_8hpp.html#a0">emptyToNull</a>(<span class="keyword">const</span> XMLCh * <span class="keyword">const</span> in)
|
|
00155 {
|
|
00156 <span class="keywordflow">return</span> (in == 0 || *in == 0) ? 0 : in;
|
|
00157 }
|
|
00158
|
|
00159 <span class="preprocessor">#endif</span>
|
|
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Sep 25 06:55:26 2009 for XQilla Simple API by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address>
|
|
</body>
|
|
</html>
|