1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Filter.cc Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.15 -->
<center>
<a class="qindex" href="main.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="annotated.html">Compound List</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">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center>
<hr><h1>Filter.cc</h1><a href="a00100.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">// Package : omniEvents</font>
00002 <font class="comment">// Filter.cc Created : 2004/04/30</font>
00003 <font class="comment">// Author : Alex Tingle</font>
00004 <font class="comment">//</font>
00005 <font class="comment">// Copyright (C) 2004 Alex Tingle.</font>
00006 <font class="comment">//</font>
00007 <font class="comment">// This file is part of the omniEvents application.</font>
00008 <font class="comment">//</font>
00009 <font class="comment">// omniEvents is free software; you can redistribute it and/or</font>
00010 <font class="comment">// modify it under the terms of the GNU Lesser General Public</font>
00011 <font class="comment">// License as published by the Free Software Foundation; either</font>
00012 <font class="comment">// version 2.1 of the License, or (at your option) any later version.</font>
00013 <font class="comment">//</font>
00014 <font class="comment">// omniEvents is distributed in the hope that it will be useful,</font>
00015 <font class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</font>
00016 <font class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font>
00017 <font class="comment">// Lesser General Public License for more details.</font>
00018 <font class="comment">//</font>
00019 <font class="comment">// You should have received a copy of the GNU Lesser General Public</font>
00020 <font class="comment">// License along with this library; if not, write to the Free Software</font>
00021 <font class="comment">// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</font>
00022 <font class="comment">//</font>
00023
00024 <font class="preprocessor">#include "<a class="code" href="a00101.html">Filter.h</a>"</font>
00025
00026 <font class="preprocessor">#include <assert.h></font>
00027
00028 <font class="preprocessor">#ifdef HAVE_OMNIORB4</font>
00029 <font class="preprocessor"></font><font class="preprocessor"># define STR_MATCH(s1,s2) omni::strMatch((s1),(s2))</font>
00030 <font class="preprocessor"></font><font class="preprocessor">#else</font>
<a name="l00031"></a><a class="code" href="a00100.html#a0">00031</a> <font class="preprocessor"></font><font class="preprocessor"># define STR_MATCH(s1,s2) (0==::strcmp((s1),(s2)))</font>
00032 <font class="preprocessor"></font><font class="preprocessor">#endif</font>
00033 <font class="preprocessor"></font>
00034 <font class="keyword">namespace </font>OmniEvents {
00035
<a name="l00036"></a><a class="code" href="a00052.html#a2">00036</a> <font class="keywordtype">bool</font> FilterByRepositoryId::keep(<font class="keyword">const</font> CORBA::Any& event)<font class="keyword"> const</font>
00037 <font class="keyword"></font>{
00038 <font class="keyword">using</font> <font class="keyword">namespace </font>CORBA;
00039 CORBA::TypeCode_var tc=event.type();
00040 <font class="keywordflow">switch</font>( tc->kind() )
00041 {
00042 <font class="preprocessor">#ifdef HAVE_OMNIORB4</font>
00043 <font class="preprocessor"></font> <font class="keywordflow">case</font> _np_tk_indirect: <font class="comment">// Internal to omniORB. We should never get this.</font>
00044 assert(0);
00045 <font class="preprocessor">#endif</font>
00046 <font class="preprocessor"></font>
00047 <font class="comment">// TCs with Repository ID:</font>
00048 <font class="keywordflow">case</font> tk_objref:
00049 <font class="keywordflow">case</font> tk_struct:
00050 <font class="keywordflow">case</font> tk_union:
00051 <font class="keywordflow">case</font> tk_enum:
00052 <font class="keywordflow">case</font> tk_alias:
00053 <font class="keywordflow">case</font> tk_except:
00054 <font class="keywordflow">return</font> <a class="code" href="a00094.html#a0">STR_MATCH</a>( <a class="code" href="a00052.html#o0">_rid</a>.in(), tc->id() );
00055
00056 <font class="comment">// Collections</font>
00057 <font class="keywordflow">case</font> tk_sequence:
00058 <font class="keywordflow">case</font> tk_array:
00059
00060 <font class="comment">// Primitives</font>
00061 <font class="keywordflow">case</font> tk_null:
00062 <font class="keywordflow">case</font> tk_void:
00063 <font class="keywordflow">case</font> tk_short:
00064 <font class="keywordflow">case</font> tk_long:
00065 <font class="keywordflow">case</font> tk_ushort:
00066 <font class="keywordflow">case</font> tk_ulong:
00067 <font class="keywordflow">case</font> tk_float:
00068 <font class="keywordflow">case</font> tk_double:
00069 <font class="keywordflow">case</font> tk_boolean:
00070 <font class="keywordflow">case</font> tk_char:
00071 <font class="keywordflow">case</font> tk_octet:
00072 <font class="keywordflow">case</font> tk_any:
00073 <font class="keywordflow">case</font> tk_TypeCode:
00074 <font class="keywordflow">case</font> tk_Principal:
00075 <font class="keywordflow">case</font> tk_string:
00076 <font class="preprocessor">#ifdef HAS_LongLong</font>
00077 <font class="preprocessor"></font> <font class="keywordflow">case</font> tk_longlong:
00078 <font class="keywordflow">case</font> tk_ulonglong:
00079 <font class="preprocessor">#endif</font>
00080 <font class="preprocessor"></font><font class="preprocessor">#ifdef HAS_LongDouble</font>
00081 <font class="preprocessor"></font> <font class="keywordflow">case</font> tk_longdouble:
00082 <font class="preprocessor">#endif</font>
00083 <font class="preprocessor"></font><font class="preprocessor">#ifndef HAVE_OMNIORB3</font>
00084 <font class="preprocessor"></font> <font class="keywordflow">case</font> tk_wchar:
00085 <font class="keywordflow">case</font> tk_wstring:
00086 <font class="keywordflow">case</font> tk_fixed:
00087
00088 <font class="comment">// WTF? Not implemented in omniORB?</font>
00089 <font class="keywordflow">case</font> tk_value:
00090 <font class="keywordflow">case</font> tk_value_box:
00091 <font class="keywordflow">case</font> tk_native:
00092 <font class="keywordflow">case</font> tk_abstract_interface:
00093 <font class="keywordflow">case</font> tk_local_interface:
00094 <font class="preprocessor">#else</font>
00095 <font class="preprocessor"></font> <font class="keywordflow">default</font>:
00096 <font class="preprocessor">#endif</font>
00097 <font class="preprocessor"></font> <font class="keywordflow">break</font>;
00098 } <font class="comment">// end case. Note: no default, so that missing options are flagged by GCC.</font>
00099 <font class="keywordflow">return</font> <font class="keyword">false</font>;
00100 }
00101
00102 }; <font class="comment">// end namespace OmniEvents</font>
</pre></div><hr><address align="right"><small>Generated on Fri Nov 19 17:42:20 2004 for OmniEvents by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0
width=110 height=53></a>1.2.15 </small></address>
</body>
</html>
|