blob: bb1a68d4737b0f43611cad3d05d058ca49057a93 [file] [log] [blame]
<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Kudu C++ client API: include/kudu/client/stubs.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<img id="MSearchSelect" src="search/search.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</div>
</li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<h1>include/kudu/client/stubs.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Licensed to the Apache Software Foundation (ASF) under one</span>
<a name="l00002"></a>00002 <span class="comment">// or more contributor license agreements. See the NOTICE file</span>
<a name="l00003"></a>00003 <span class="comment">// distributed with this work for additional information</span>
<a name="l00004"></a>00004 <span class="comment">// regarding copyright ownership. The ASF licenses this file</span>
<a name="l00005"></a>00005 <span class="comment">// to you under the Apache License, Version 2.0 (the</span>
<a name="l00006"></a>00006 <span class="comment">// &quot;License&quot;); you may not use this file except in compliance</span>
<a name="l00007"></a>00007 <span class="comment">// with the License. You may obtain a copy of the License at</span>
<a name="l00008"></a>00008 <span class="comment">//</span>
<a name="l00009"></a>00009 <span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span>
<a name="l00010"></a>00010 <span class="comment">//</span>
<a name="l00011"></a>00011 <span class="comment">// Unless required by applicable law or agreed to in writing,</span>
<a name="l00012"></a>00012 <span class="comment">// software distributed under the License is distributed on an</span>
<a name="l00013"></a>00013 <span class="comment">// &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span>
<a name="l00014"></a>00014 <span class="comment">// KIND, either express or implied. See the License for the</span>
<a name="l00015"></a>00015 <span class="comment">// specific language governing permissions and limitations</span>
<a name="l00016"></a>00016 <span class="comment">// under the License.</span>
<a name="l00017"></a>00017 <span class="preprocessor">#ifndef KUDU_CLIENT_STUBS_H</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define KUDU_CLIENT_STUBS_H</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;stdlib.h&gt;</span> <span class="comment">// for exit()</span>
<a name="l00021"></a>00021
<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00023"></a>00023
<a name="l00024"></a>00024 <span class="comment">//</span>
<a name="l00025"></a>00025 <span class="comment">// GCC can be told that a certain branch is not likely to be taken (for</span>
<a name="l00026"></a>00026 <span class="comment">// instance, a CHECK failure), and use that information in static analysis.</span>
<a name="l00027"></a>00027 <span class="comment">// Giving it this information can help it optimize for the common case in</span>
<a name="l00028"></a>00028 <span class="comment">// the absence of better information (ie. -fprofile-arcs).</span>
<a name="l00029"></a>00029 <span class="comment">//</span>
<a name="l00030"></a>00030 <span class="preprocessor">#ifndef PREDICT_FALSE</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#if defined(__GNUC__)</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define PREDICT_FALSE(x) (__builtin_expect(x, 0))</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#define PREDICT_FALSE(x) x</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#ifndef PREDICT_TRUE</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#if defined(__GNUC__)</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#define PREDICT_TRUE(x) x</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span>
<a name="l00045"></a>00045 <span class="comment">// Annotate a function indicating the caller must examine the return value.</span>
<a name="l00046"></a>00046 <span class="comment">// Use like:</span>
<a name="l00047"></a>00047 <span class="comment">// int foo() WARN_UNUSED_RESULT;</span>
<a name="l00048"></a>00048 <span class="comment">// To explicitly ignore a result, see |ignore_result()| in &lt;base/basictypes.h&gt;.</span>
<a name="l00049"></a>00049 <span class="preprocessor">#ifndef WARN_UNUSED_RESULT</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#if defined(__GNUC__)</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor">#define WARN_UNUSED_RESULT</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span>
<a name="l00057"></a>00057 <span class="preprocessor">#if (defined(__GNUC__) || defined(__APPLE__)) &amp;&amp; !defined(SWIG)</span>
<a name="l00058"></a>00058 <span class="preprocessor"></span><span class="preprocessor">#undef ATTRIBUTE_UNUSED</span>
<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#define ATTRIBUTE_UNUSED __attribute__ ((unused))</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#ifndef ATTRIBUTE_UNUSED</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor">#define ATTRIBUTE_UNUSED</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span>
<a name="l00066"></a>00066 <span class="comment">// For deprecated functions or variables, generate a warning at usage sites.</span>
<a name="l00067"></a>00067 <span class="comment">// Verified to work as early as GCC 3.1.1 and clang 3.2 (so we&apos;ll assume any</span>
<a name="l00068"></a>00068 <span class="comment">// clang is new enough).</span>
<a name="l00069"></a>00069 <span class="preprocessor">#ifndef ATTRIBUTE_DEPRECATED</span>
<a name="l00070"></a>00070 <span class="preprocessor"></span><span class="preprocessor">#if defined(__clang__) || \</span>
<a name="l00071"></a>00071 <span class="preprocessor"> (defined(COMPILER_GCC) &amp;&amp; \</span>
<a name="l00072"></a>00072 <span class="preprocessor"> (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) &gt;= 30200)</span>
<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">#define ATTRIBUTE_DEPRECATED(msg) __attribute__ ((deprecated (msg) ))</span>
<a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor">#define ATTRIBUTE_DEPRECATED(msg)</span>
<a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#endif // #ifndef ATTRIBUTE_DEPRECATED</span>
<a name="l00078"></a>00078 <span class="preprocessor"></span>
<a name="l00079"></a>00079 <span class="preprocessor">#ifndef COMPILE_ASSERT</span>
<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="comment">// The COMPILE_ASSERT macro can be used to verify that a compile time</span>
<a name="l00081"></a>00081 <span class="comment">// expression is true. For example, you could use it to verify the</span>
<a name="l00082"></a>00082 <span class="comment">// size of a static array:</span>
<a name="l00083"></a>00083 <span class="comment">//</span>
<a name="l00084"></a>00084 <span class="comment">// COMPILE_ASSERT(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES,</span>
<a name="l00085"></a>00085 <span class="comment">// content_type_names_incorrect_size);</span>
<a name="l00086"></a>00086 <span class="comment">//</span>
<a name="l00087"></a>00087 <span class="comment">// or to make sure a struct is smaller than a certain size:</span>
<a name="l00088"></a>00088 <span class="comment">//</span>
<a name="l00089"></a>00089 <span class="comment">// COMPILE_ASSERT(sizeof(foo) &lt; 128, foo_too_large);</span>
<a name="l00090"></a>00090 <span class="comment">//</span>
<a name="l00091"></a>00091 <span class="comment">// The second argument to the macro is the name of the variable. If</span>
<a name="l00092"></a>00092 <span class="comment">// the expression is false, most compilers will issue a warning/error</span>
<a name="l00093"></a>00093 <span class="comment">// containing the name of the variable.</span>
<a name="l00094"></a>00094
<a name="l00095"></a>00095 <span class="keyword">template</span> &lt;<span class="keywordtype">bool</span>&gt;
<a name="l00096"></a><a class="code" href="structStubsCompileAssert.html">00096</a> <span class="keyword">struct </span><a class="code" href="structStubsCompileAssert.html">StubsCompileAssert</a> {
<a name="l00097"></a>00097 };
<a name="l00098"></a>00098
<a name="l00099"></a>00099 <span class="preprocessor">#define COMPILE_ASSERT(expr, msg) \</span>
<a name="l00100"></a>00100 <span class="preprocessor"> typedef StubsCompileAssert&lt;(bool(expr))&gt; msg[bool(expr) ? 1 : -1] ATTRIBUTE_UNUSED // NOLINT(*)</span>
<a name="l00101"></a>00101 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00102"></a>00102 <span class="preprocessor"></span>
<a name="l00103"></a>00103 <span class="comment">// Annotate a virtual method indicating it must be overriding a virtual</span>
<a name="l00104"></a>00104 <span class="comment">// method in the parent class.</span>
<a name="l00105"></a>00105 <span class="comment">// Use like:</span>
<a name="l00106"></a>00106 <span class="comment">// virtual void foo() OVERRIDE;</span>
<a name="l00107"></a>00107 <span class="preprocessor">#ifndef OVERRIDE</span>
<a name="l00108"></a>00108 <span class="preprocessor"></span><span class="preprocessor">#if defined(COMPILER_MSVC)</span>
<a name="l00109"></a>00109 <span class="preprocessor"></span><span class="preprocessor">#define OVERRIDE override</span>
<a name="l00110"></a>00110 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__clang__)</span>
<a name="l00111"></a>00111 <span class="preprocessor"></span><span class="preprocessor">#define OVERRIDE override</span>
<a name="l00112"></a>00112 <span class="preprocessor"></span><span class="preprocessor">#elif defined(COMPILER_GCC) &amp;&amp; __cplusplus &gt;= 201103 &amp;&amp; \</span>
<a name="l00113"></a>00113 <span class="preprocessor"> (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) &gt;= 40700</span>
<a name="l00114"></a>00114 <span class="preprocessor"></span><span class="comment">// GCC 4.7 supports explicit virtual overrides when C++11 support is enabled.</span>
<a name="l00115"></a>00115 <span class="preprocessor">#define OVERRIDE override</span>
<a name="l00116"></a>00116 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00117"></a>00117 <span class="preprocessor"></span><span class="preprocessor">#define OVERRIDE</span>
<a name="l00118"></a>00118 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00119"></a>00119 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00120"></a>00120 <span class="preprocessor"></span>
<a name="l00121"></a>00121 <span class="preprocessor">#ifndef DISALLOW_COPY_AND_ASSIGN</span>
<a name="l00122"></a>00122 <span class="preprocessor"></span><span class="preprocessor">#define DISALLOW_COPY_AND_ASSIGN(TypeName) \</span>
<a name="l00123"></a>00123 <span class="preprocessor"> TypeName(const TypeName&amp;); \</span>
<a name="l00124"></a>00124 <span class="preprocessor"> void operator=(const TypeName&amp;)</span>
<a name="l00125"></a>00125 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00126"></a>00126 <span class="preprocessor"></span>
<a name="l00127"></a>00127 <span class="preprocessor">#ifndef FRIEND_TEST</span>
<a name="l00128"></a>00128 <span class="preprocessor"></span><span class="preprocessor">#define FRIEND_TEST(test_case_name, test_name) \</span>
<a name="l00129"></a>00129 <span class="preprocessor"> friend class test_case_name##_##test_name##_Test</span>
<a name="l00130"></a>00130 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00131"></a>00131 <span class="preprocessor"></span>
<a name="l00132"></a>00132 <span class="comment">// Stubbed versions of macros defined in glog/logging.h, intended for</span>
<a name="l00133"></a>00133 <span class="comment">// environments where glog headers aren&apos;t available.</span>
<a name="l00134"></a>00134 <span class="comment">//</span>
<a name="l00135"></a>00135 <span class="comment">// Add more as needed.</span>
<a name="l00136"></a>00136
<a name="l00137"></a>00137 <span class="preprocessor">#define KUDU_DCHECK(condition) while (false) kudu::internal_logging::NullLog()</span>
<a name="l00138"></a>00138 <span class="preprocessor"></span><span class="preprocessor">#define KUDU_DCHECK_EQ(val1, val2) while (false) kudu::internal_logging::NullLog()</span>
<a name="l00139"></a>00139 <span class="preprocessor"></span><span class="preprocessor">#define KUDU_DCHECK_NE(val1, val2) while (false) kudu::internal_logging::NullLog()</span>
<a name="l00140"></a>00140 <span class="preprocessor"></span><span class="preprocessor">#define KUDU_DCHECK_LE(val1, val2) while (false) kudu::internal_logging::NullLog()</span>
<a name="l00141"></a>00141 <span class="preprocessor"></span><span class="preprocessor">#define KUDU_DCHECK_LT(val1, val2) while (false) kudu::internal_logging::NullLog()</span>
<a name="l00142"></a>00142 <span class="preprocessor"></span><span class="preprocessor">#define KUDU_DCHECK_GE(val1, val2) while (false) kudu::internal_logging::NullLog()</span>
<a name="l00143"></a>00143 <span class="preprocessor"></span><span class="preprocessor">#define KUDU_DCHECK_GT(val1, val2) while (false) kudu::internal_logging::NullLog()</span>
<a name="l00144"></a>00144 <span class="preprocessor"></span><span class="preprocessor">#define KUDU_DCHECK_NOTNULL(val) (val)</span>
<a name="l00145"></a>00145 <span class="preprocessor"></span><span class="preprocessor">#define KUDU_DCHECK_STREQ(str1, str2) while (false) kudu::internal_logging::NullLog()</span>
<a name="l00146"></a>00146 <span class="preprocessor"></span><span class="preprocessor">#define KUDU_DCHECK_STRCASEEQ(str1, str2) while (false) kudu::internal_logging::NullLog()</span>
<a name="l00147"></a>00147 <span class="preprocessor"></span><span class="preprocessor">#define KUDU_DCHECK_STRNE(str1, str2) while (false) kudu::internal_logging::NullLog()</span>
<a name="l00148"></a>00148 <span class="preprocessor"></span><span class="preprocessor">#define KUDU_DCHECK_STRCASENE(str1, str2) while (false) kudu::internal_logging::NullLog()</span>
<a name="l00149"></a>00149 <span class="preprocessor"></span>
<a name="l00150"></a>00150 <span class="comment">// Log levels. LOG ignores them, so their values are abitrary.</span>
<a name="l00151"></a>00151
<a name="l00152"></a>00152 <span class="preprocessor">#define KUDU_INFO 0</span>
<a name="l00153"></a>00153 <span class="preprocessor"></span><span class="preprocessor">#define KUDU_WARNING 1</span>
<a name="l00154"></a>00154 <span class="preprocessor"></span><span class="preprocessor">#define KUDU_ERROR 2</span>
<a name="l00155"></a>00155 <span class="preprocessor"></span><span class="preprocessor">#define KUDU_FATAL 3</span>
<a name="l00156"></a>00156 <span class="preprocessor"></span>
<a name="l00157"></a>00157 <span class="preprocessor">#ifdef NDEBUG</span>
<a name="l00158"></a>00158 <span class="preprocessor"></span><span class="preprocessor">#define KUDU_DFATAL KUDU_WARNING</span>
<a name="l00159"></a>00159 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00160"></a>00160 <span class="preprocessor"></span><span class="preprocessor">#define KUDU_DFATAL KUDU_FATAL</span>
<a name="l00161"></a>00161 <span class="preprocessor"></span><span class="preprocessor">#endif // NDEBUG</span>
<a name="l00162"></a>00162 <span class="preprocessor"></span>
<a name="l00163"></a>00163 <span class="preprocessor">#define KUDU_LOG_INTERNAL(level) kudu::internal_logging::CerrLog(level)</span>
<a name="l00164"></a>00164 <span class="preprocessor"></span><span class="preprocessor">#define KUDU_LOG(level) KUDU_LOG_INTERNAL(KUDU_##level)</span>
<a name="l00165"></a>00165 <span class="preprocessor"></span>
<a name="l00166"></a>00166 <span class="preprocessor">#define KUDU_CHECK(condition) \</span>
<a name="l00167"></a>00167 <span class="preprocessor"> (condition) ? 0 : KUDU_LOG(FATAL) &lt;&lt; &quot;Check failed: &quot; #condition &quot; &quot;</span>
<a name="l00168"></a>00168 <span class="preprocessor"></span>
<a name="l00169"></a>00169 <span class="keyword">namespace </span>kudu {
<a name="l00170"></a>00170
<a name="l00171"></a>00171 <span class="keyword">namespace </span>internal_logging {
<a name="l00172"></a>00172
<a name="l00177"></a><a class="code" href="classkudu_1_1internal__logging_1_1NullLog.html">00177</a> <span class="keyword">class </span><a class="code" href="classkudu_1_1internal__logging_1_1NullLog.html" title="A helper for the nil log sink.">NullLog</a> {
<a name="l00178"></a>00178 <span class="keyword">public</span>:
<a name="l00184"></a>00184 <span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt;
<a name="l00185"></a><a class="code" href="classkudu_1_1internal__logging_1_1NullLog.html#a22d6f2dc74bdba99a6c8ddd6818a0972">00185</a> <a class="code" href="classkudu_1_1internal__logging_1_1NullLog.html" title="A helper for the nil log sink.">NullLog</a>&amp; <a class="code" href="classkudu_1_1internal__logging_1_1NullLog.html#a22d6f2dc74bdba99a6c8ddd6818a0972">operator&lt;&lt;</a>(<span class="keyword">const</span> T&amp; t) {
<a name="l00186"></a>00186 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00187"></a>00187 }
<a name="l00188"></a>00188 };
<a name="l00189"></a>00189
<a name="l00191"></a><a class="code" href="classkudu_1_1internal__logging_1_1CerrLog.html">00191</a> <span class="keyword">class </span><a class="code" href="classkudu_1_1internal__logging_1_1CerrLog.html" title="A helper for stderr log sink.">CerrLog</a> {
<a name="l00192"></a>00192 <span class="keyword">public</span>:
<a name="l00197"></a><a class="code" href="classkudu_1_1internal__logging_1_1CerrLog.html#ac3773ad2825d82f91ea65109f2def713">00197</a> <a class="code" href="classkudu_1_1internal__logging_1_1CerrLog.html#ac3773ad2825d82f91ea65109f2def713">CerrLog</a>(<span class="keywordtype">int</span> severity) <span class="comment">// NOLINT(runtime/explicit)</span>
<a name="l00198"></a>00198 : severity_(severity),
<a name="l00199"></a>00199 has_logged_(false) {
<a name="l00200"></a>00200 }
<a name="l00201"></a>00201
<a name="l00202"></a>00202 ~<a class="code" href="classkudu_1_1internal__logging_1_1CerrLog.html" title="A helper for stderr log sink.">CerrLog</a>() {
<a name="l00203"></a>00203 <span class="keywordflow">if</span> (has_logged_) {
<a name="l00204"></a>00204 std::cerr &lt;&lt; std::endl;
<a name="l00205"></a>00205 }
<a name="l00206"></a>00206 <span class="keywordflow">if</span> (severity_ == KUDU_FATAL) {
<a name="l00207"></a>00207 exit(1);
<a name="l00208"></a>00208 }
<a name="l00209"></a>00209 }
<a name="l00210"></a>00210
<a name="l00216"></a>00216 <span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt;
<a name="l00217"></a><a class="code" href="classkudu_1_1internal__logging_1_1CerrLog.html#ab7c20ca0621898f9520bc364ea2913a2">00217</a> <a class="code" href="classkudu_1_1internal__logging_1_1CerrLog.html" title="A helper for stderr log sink.">CerrLog</a>&amp; <a class="code" href="classkudu_1_1internal__logging_1_1CerrLog.html#ab7c20ca0621898f9520bc364ea2913a2">operator&lt;&lt;</a>(<span class="keyword">const</span> T&amp; t) {
<a name="l00218"></a>00218 has_logged_ = <span class="keyword">true</span>;
<a name="l00219"></a>00219 std::cerr &lt;&lt; t;
<a name="l00220"></a>00220 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00221"></a>00221 }
<a name="l00222"></a>00222
<a name="l00223"></a>00223 <span class="keyword">private</span>:
<a name="l00224"></a>00224 <span class="keyword">const</span> <span class="keywordtype">int</span> severity_;
<a name="l00225"></a>00225 <span class="keywordtype">bool</span> has_logged_;
<a name="l00226"></a>00226 };
<a name="l00227"></a>00227
<a name="l00228"></a>00228 } <span class="comment">// namespace internal_logging</span>
<a name="l00229"></a>00229 } <span class="comment">// namespace kudu</span>
<a name="l00230"></a>00230
<a name="l00231"></a>00231 <span class="preprocessor">#endif</span>
</pre></div></div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<!-- start footer part -->
<hr class="footer"/>
<address class="footer">
<small>Generated for Kudu version 1.0.1 on Tue Oct 11 08:52:01 2016 by Doxygen 1.6.1</small>
<br>
<small>Copyright © 2016 The Apache Software Foundation.</small>
</address>
</body>
</html>