149 lines
15 KiB
HTML
149 lines
15 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.5.1 -->
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li><a href="classes.html"><span>Classes</span></a></li>
|
|
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
|
</ul></div>
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>File Members</span></a></li>
|
|
</ul></div>
|
|
<h1>EventHandler.hpp</h1><a href="EventHandler_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
|
|
<a name="l00002"></a>00002 <span class="comment"> * Copyright (c) 2001-2006</span>
|
|
<a name="l00003"></a>00003 <span class="comment"> * DecisionSoft Limited. All rights reserved.</span>
|
|
<a name="l00004"></a>00004 <span class="comment"> * Copyright (c) 2004-2006</span>
|
|
<a name="l00005"></a>00005 <span class="comment"> * Progress Software Corporation. All rights reserved.</span>
|
|
<a name="l00006"></a>00006 <span class="comment"> * Copyright (c) 2004-2006</span>
|
|
<a name="l00007"></a>00007 <span class="comment"> * Oracle. All rights reserved.</span>
|
|
<a name="l00008"></a>00008 <span class="comment"> *</span>
|
|
<a name="l00009"></a>00009 <span class="comment"> * See the file LICENSE for redistribution information.</span>
|
|
<a name="l00010"></a>00010 <span class="comment"> *</span>
|
|
<a name="l00011"></a>00011 <span class="comment"> * $Id: EventHandler.hpp,v 1.2 2007/02/08 13:17:10 jpcs Exp $</span>
|
|
<a name="l00012"></a>00012 <span class="comment"> */</span>
|
|
<a name="l00013"></a>00013
|
|
<a name="l00014"></a>00014 <span class="preprocessor">#ifndef _EVENTHANDLER_HPP</span>
|
|
<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#define _EVENTHANDLER_HPP</span>
|
|
<a name="l00016"></a>00016 <span class="preprocessor"></span>
|
|
<a name="l00017"></a>00017 <span class="preprocessor">#include <xqilla/framework/XQillaExport.hpp></span>
|
|
<a name="l00018"></a>00018 <span class="preprocessor">#include <<a class="code" href="AnyAtomicType_8hpp.html">xqilla/items/AnyAtomicType.hpp</a>></span>
|
|
<a name="l00019"></a>00019
|
|
<a name="l00020"></a>00020 <span class="preprocessor">#include <xercesc/util/XercesDefs.hpp></span>
|
|
<a name="l00021"></a>00021
|
|
<a name="l00022"></a><a class="code" href="classEventHandler.html">00022</a> <span class="keyword">class </span>XQILLA_API <a class="code" href="classEventHandler.html">EventHandler</a>
|
|
<a name="l00023"></a>00023 {
|
|
<a name="l00024"></a>00024 <span class="keyword">public</span>:
|
|
<a name="l00025"></a><a class="code" href="classEventHandler.html#9578358998a3221402df5404ca2776d6">00025</a> <span class="keyword">virtual</span> ~<a class="code" href="classEventHandler.html">EventHandler</a>() {};
|
|
<a name="l00026"></a>00026
|
|
<a name="l00028"></a>00028 <span class="keyword">virtual</span> <span class="keywordtype">void</span> startDocumentEvent(<span class="keyword">const</span> XMLCh *documentURI, <span class="keyword">const</span> XMLCh *encoding) = 0;
|
|
<a name="l00030"></a>00030 <span class="keyword">virtual</span> <span class="keywordtype">void</span> endDocumentEvent() = 0;
|
|
<a name="l00032"></a>00032 <span class="keyword">virtual</span> <span class="keywordtype">void</span> startElementEvent(<span class="keyword">const</span> XMLCh *prefix, <span class="keyword">const</span> XMLCh *uri, <span class="keyword">const</span> XMLCh *localname) = 0;
|
|
<a name="l00034"></a>00034 <span class="keyword">virtual</span> <span class="keywordtype">void</span> endElementEvent(<span class="keyword">const</span> XMLCh *prefix, <span class="keyword">const</span> XMLCh *uri, <span class="keyword">const</span> XMLCh *localname,
|
|
<a name="l00035"></a>00035 <span class="keyword">const</span> XMLCh *typeURI, <span class="keyword">const</span> XMLCh *typeName) = 0;
|
|
<a name="l00037"></a>00037 <span class="keyword">virtual</span> <span class="keywordtype">void</span> piEvent(<span class="keyword">const</span> XMLCh *target, <span class="keyword">const</span> XMLCh *value) = 0;
|
|
<a name="l00039"></a>00039 <span class="keyword">virtual</span> <span class="keywordtype">void</span> textEvent(<span class="keyword">const</span> XMLCh *value) = 0;
|
|
<a name="l00041"></a>00041 <span class="keyword">virtual</span> <span class="keywordtype">void</span> textEvent(<span class="keyword">const</span> XMLCh *chars, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> length) = 0;
|
|
<a name="l00043"></a>00043 <span class="keyword">virtual</span> <span class="keywordtype">void</span> commentEvent(<span class="keyword">const</span> XMLCh *value) = 0;
|
|
<a name="l00045"></a>00045 <span class="keyword">virtual</span> <span class="keywordtype">void</span> attributeEvent(<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,
|
|
<a name="l00046"></a>00046 <span class="keyword">const</span> XMLCh *typeURI, <span class="keyword">const</span> XMLCh *typeName) = 0;
|
|
<a name="l00048"></a>00048 <span class="keyword">virtual</span> <span class="keywordtype">void</span> namespaceEvent(<span class="keyword">const</span> XMLCh *prefix, <span class="keyword">const</span> XMLCh *uri) = 0;
|
|
<a name="l00050"></a><a class="code" href="classEventHandler.html#990d0c9ab92dd7ed3a3fde63d9e647aa">00050</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> atomicItemEvent(<a class="code" href="classAnyAtomicType.html#289c5db5e82b40c2f3e53af7d472f14c">AnyAtomicType::AtomicObjectType</a> type, <span class="keyword">const</span> XMLCh *value,
|
|
<a name="l00051"></a>00051 <span class="keyword">const</span> XMLCh *typeURI, <span class="keyword">const</span> XMLCh *typeName) {}
|
|
<a name="l00053"></a>00053 <span class="keyword">virtual</span> <span class="keywordtype">void</span> endEvent() = 0;
|
|
<a name="l00054"></a>00054 };
|
|
<a name="l00055"></a>00055
|
|
<a name="l00056"></a><a class="code" href="classEventFilter.html">00056</a> <span class="keyword">class </span>XQILLA_API EventFilter : <span class="keyword">public</span> <a class="code" href="classEventHandler.html">EventHandler</a>
|
|
<a name="l00057"></a>00057 {
|
|
<a name="l00058"></a>00058 <span class="keyword">public</span>:
|
|
<a name="l00059"></a><a class="code" href="classEventFilter.html#af2bc8a1705498ee3f13cdccf8f4b7ea">00059</a> EventFilter(<a class="code" href="classEventHandler.html">EventHandler</a> *next)
|
|
<a name="l00060"></a>00060 : next_(next)
|
|
<a name="l00061"></a>00061 {
|
|
<a name="l00062"></a>00062 }
|
|
<a name="l00063"></a>00063
|
|
<a name="l00064"></a><a class="code" href="classEventFilter.html#c6c48bf05f8c78225b7d3d8e5fefd478">00064</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#ec3e374a8a1aa966eb9fb480271415f2">startDocumentEvent</a>(<span class="keyword">const</span> XMLCh *documentURI, <span class="keyword">const</span> XMLCh *encoding)
|
|
<a name="l00065"></a>00065 {
|
|
<a name="l00066"></a>00066 next_->startDocumentEvent(documentURI, encoding);
|
|
<a name="l00067"></a>00067 }
|
|
<a name="l00068"></a>00068
|
|
<a name="l00069"></a><a class="code" href="classEventFilter.html#85b1a402bde6e2cebc504c88cc48f70f">00069</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#10240b417fb26f78d008da114a4f472a">endDocumentEvent</a>()
|
|
<a name="l00070"></a>00070 {
|
|
<a name="l00071"></a>00071 next_->endDocumentEvent();
|
|
<a name="l00072"></a>00072 }
|
|
<a name="l00073"></a>00073
|
|
<a name="l00074"></a><a class="code" href="classEventFilter.html#c893445bfe22063f2fc3ca5cd9b9925c">00074</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#664a9e60254f14aba283406ac20a428f">startElementEvent</a>(<span class="keyword">const</span> XMLCh *prefix, <span class="keyword">const</span> XMLCh *uri, <span class="keyword">const</span> XMLCh *localname)
|
|
<a name="l00075"></a>00075 {
|
|
<a name="l00076"></a>00076 next_->startElementEvent(prefix, uri, localname);
|
|
<a name="l00077"></a>00077 }
|
|
<a name="l00078"></a>00078
|
|
<a name="l00079"></a><a class="code" href="classEventFilter.html#e9797751bfd4587decafacc32ce345d0">00079</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#2d10b48fa9170958a36fee3f18936335">endElementEvent</a>(<span class="keyword">const</span> XMLCh *prefix, <span class="keyword">const</span> XMLCh *uri, <span class="keyword">const</span> XMLCh *localname,
|
|
<a name="l00080"></a>00080 <span class="keyword">const</span> XMLCh *typeURI, <span class="keyword">const</span> XMLCh *typeName)
|
|
<a name="l00081"></a>00081 {
|
|
<a name="l00082"></a>00082 next_->endElementEvent(prefix, uri, localname, typeURI, typeName);
|
|
<a name="l00083"></a>00083 }
|
|
<a name="l00084"></a>00084
|
|
<a name="l00085"></a><a class="code" href="classEventFilter.html#b5ba6162b69d1800d9cf2bf94eef6132">00085</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#e38f73ad14599de7f9c07fab31d9efa2">piEvent</a>(<span class="keyword">const</span> XMLCh *target, <span class="keyword">const</span> XMLCh *value)
|
|
<a name="l00086"></a>00086 {
|
|
<a name="l00087"></a>00087 next_->piEvent(target, value);
|
|
<a name="l00088"></a>00088 }
|
|
<a name="l00089"></a>00089
|
|
<a name="l00090"></a><a class="code" href="classEventFilter.html#63edc38c8a7a42bee18081680b648b9b">00090</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#103e9faa172d398373c58548bea39744">textEvent</a>(<span class="keyword">const</span> XMLCh *value)
|
|
<a name="l00091"></a>00091 {
|
|
<a name="l00092"></a>00092 next_->textEvent(value);
|
|
<a name="l00093"></a>00093 }
|
|
<a name="l00094"></a>00094
|
|
<a name="l00095"></a><a class="code" href="classEventFilter.html#82d4f002673995fdc5da2f7237fe3d5a">00095</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#103e9faa172d398373c58548bea39744">textEvent</a>(<span class="keyword">const</span> XMLCh *chars, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> length)
|
|
<a name="l00096"></a>00096 {
|
|
<a name="l00097"></a>00097 next_->textEvent(chars, length);
|
|
<a name="l00098"></a>00098 }
|
|
<a name="l00099"></a>00099
|
|
<a name="l00100"></a><a class="code" href="classEventFilter.html#db88be94442fc15da6fec403b4b5acb6">00100</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#013b0f881802980a3e8c3dd9c8981616">commentEvent</a>(<span class="keyword">const</span> XMLCh *value)
|
|
<a name="l00101"></a>00101 {
|
|
<a name="l00102"></a>00102 next_->commentEvent(value);
|
|
<a name="l00103"></a>00103 }
|
|
<a name="l00104"></a>00104
|
|
<a name="l00105"></a><a class="code" href="classEventFilter.html#b3d3d998f1b01a6a1c69c0d32a75c9ec">00105</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#622f3bfae965b26fe8371db1dd9c72f9">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,
|
|
<a name="l00106"></a>00106 <span class="keyword">const</span> XMLCh *typeURI, <span class="keyword">const</span> XMLCh *typeName)
|
|
<a name="l00107"></a>00107 {
|
|
<a name="l00108"></a>00108 next_->attributeEvent(prefix, uri, localname, value, typeURI, typeName);
|
|
<a name="l00109"></a>00109 }
|
|
<a name="l00110"></a>00110
|
|
<a name="l00111"></a><a class="code" href="classEventFilter.html#cecb6654cbfabaa33a342810f0ad3774">00111</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#15dcb7774662ee54bd121c3317862367">namespaceEvent</a>(<span class="keyword">const</span> XMLCh *prefix, <span class="keyword">const</span> XMLCh *uri)
|
|
<a name="l00112"></a>00112 {
|
|
<a name="l00113"></a>00113 next_->namespaceEvent(prefix, uri);
|
|
<a name="l00114"></a>00114 }
|
|
<a name="l00115"></a>00115
|
|
<a name="l00116"></a><a class="code" href="classEventFilter.html#bad51702c694838147c32e075e09d783">00116</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#990d0c9ab92dd7ed3a3fde63d9e647aa">atomicItemEvent</a>(<a class="code" href="classAnyAtomicType.html#289c5db5e82b40c2f3e53af7d472f14c">AnyAtomicType::AtomicObjectType</a> type, <span class="keyword">const</span> XMLCh *value, <span class="keyword">const</span> XMLCh *typeURI,
|
|
<a name="l00117"></a>00117 <span class="keyword">const</span> XMLCh *typeName)
|
|
<a name="l00118"></a>00118 {
|
|
<a name="l00119"></a>00119 next_->atomicItemEvent(type, value, typeURI, typeName);
|
|
<a name="l00120"></a>00120 }
|
|
<a name="l00121"></a>00121
|
|
<a name="l00122"></a><a class="code" href="classEventFilter.html#e2e68d37a7b44eb43c15bebfa00d98f4">00122</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classEventHandler.html#bb55f1ead2e9a36ca161c6943ed6e8af">endEvent</a>()
|
|
<a name="l00123"></a>00123 {
|
|
<a name="l00124"></a>00124 next_->endEvent();
|
|
<a name="l00125"></a>00125 }
|
|
<a name="l00126"></a>00126
|
|
<a name="l00127"></a>00127 <span class="keyword">protected</span>:
|
|
<a name="l00128"></a><a class="code" href="classEventFilter.html#54109f890c168bdf1e437a25b74563ef">00128</a> <a class="code" href="classEventHandler.html">EventHandler</a> *next_;
|
|
<a name="l00129"></a>00129 };
|
|
<a name="l00130"></a>00130
|
|
<a name="l00131"></a><a class="code" href="EventHandler_8hpp.html#d281bc239cb522f34ec83e6e8272160c">00131</a> <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">const</span> XMLCh *<a class="code" href="EventHandler_8hpp.html#d281bc239cb522f34ec83e6e8272160c">emptyToNull</a>(<span class="keyword">const</span> XMLCh * <span class="keyword">const</span> in)
|
|
<a name="l00132"></a>00132 {
|
|
<a name="l00133"></a>00133 <span class="keywordflow">return</span> (in == 0 || *in == 0) ? 0 : in;
|
|
<a name="l00134"></a>00134 }
|
|
<a name="l00135"></a>00135
|
|
<a name="l00136"></a>00136 <span class="preprocessor">#endif</span>
|
|
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Aug 31 14:37:35 2007 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.5.1 </small></address>
|
|
</body>
|
|
</html>
|