http://git-wip-us.apache.org/repos/asf/mesos-site/blob/a3206036/content/api/latest/c++/boundedhashmap_8hpp_source.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/boundedhashmap_8hpp_source.html b/content/api/latest/c++/boundedhashmap_8hpp_source.html new file mode 100644 index 0000000..72a69ff --- /dev/null +++ b/content/api/latest/c++/boundedhashmap_8hpp_source.html @@ -0,0 +1,246 @@ +<!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"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.5"/> +<title>Apache Mesos: 3rdparty/stout/include/stout/boundedhashmap.hpp Source File</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td style="padding-left: 0.5em;"> + <div id="projectname">Apache Mesos + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.5 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li><a href="namespaces.html"><span>Namespaces</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><a href="examples.html"><span>Examples</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_8cab8f464681f7cc51cee77e79a434cd.html">3rdparty</a></li><li class="navelem"><a class="el" href="dir_aa547de1d719d14adccfca1dfb1735b3.html">stout</a></li><li class="navelem"><a class="el" href="dir_1a1b923d951dd999d43396870333fc33.html">include</a></li><li class="navelem"><a class="el" href="dir_dbd52553d038069c1ed93e3477ea333d.html">stout</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">boundedhashmap.hpp</div> </div> +</div><!--header--> +<div class="contents"> +<a href="boundedhashmap_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div> +<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// you may not use this file except in compliance with the License.</span></div> +<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// You may obtain a copy of the License at</span></div> +<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div> +<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div> +<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">//</span></div> +<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div> +<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div> +<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div> +<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// See the License for the specific language governing permissions and</span></div> +<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// limitations under the License.</span></div> +<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#ifndef __STOUT_BOUNDEDHASHMAP_HPP__</span></div> +<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor"></span><span class="preprocessor">#define __STOUT_BOUNDEDHASHMAP_HPP__</span></div> +<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor"></span></div> +<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#include <list></span></div> +<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include <utility></span></div> +<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div> +<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include <<a class="code" href="stout_2include_2stout_2check_8hpp.html">stout/check.hpp</a>></span></div> +<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include <<a class="code" href="hashmap_8hpp.html">stout/hashmap.hpp</a>></span></div> +<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include <<a class="code" href="option_8hpp.html">stout/option.hpp</a>></span></div> +<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div> +<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment">// A hashmap that contains a fixed number of entries at most. Entries</span></div> +<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment">// are evicted in FIFO order -- i.e., when the capacity of the map is</span></div> +<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment">// reached, the next insertion results in removing the oldest entry.</span></div> +<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment">// Updating an entry does not change insertion order.</span></div> +<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="keyword">template</span> <<span class="keyword">typename</span> Key, <span class="keyword">typename</span> Value></div> +<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html"> 27</a></span> <span class="keyword">class </span><a class="code" href="classBoundedHashMap.html">BoundedHashMap</a></div> +<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> {</div> +<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="keyword">public</span>:</div> +<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html#a35ccd513de49c362d6a76e87e5923143"> 30</a></span>  <span class="keyword">typedef</span> std::pair<Key, Value> <a class="code" href="classBoundedHashMap.html#a35ccd513de49c362d6a76e87e5923143">entry</a>;</div> +<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html#a8dccc532c99c340728c8f186230fb64e"> 31</a></span>  <span class="keyword">typedef</span> std::list<entry> <a class="code" href="classBoundedHashMap.html#a8dccc532c99c340728c8f186230fb64e">list</a>;</div> +<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html#a1c466b3b3f48efaea49e9d66903a7526"> 32</a></span>  <span class="keyword">typedef</span> <a class="code" href="classhashmap.html">hashmap<Key, typename list::iterator></a> <a class="code" href="classBoundedHashMap.html#a1c466b3b3f48efaea49e9d66903a7526">map</a>;</div> +<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> </div> +<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html#a311e29319ba27184ab59b5674312ed09"> 34</a></span>  <a class="code" href="classBoundedHashMap.html#a311e29319ba27184ab59b5674312ed09">BoundedHashMap</a>(<span class="keywordtype">size_t</span> capacity) : capacity_(capacity) {}</div> +<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </div> +<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="comment">// NOTE: We don't provide `operator[]`, unlike LinkedHashMap,</span></div> +<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <span class="comment">// because it would be difficult to implement correctly for bounded</span></div> +<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <span class="comment">// maps with zero capacity.</span></div> +<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html#a54e903e8c96c78d913e74609d836ae67"> 39</a></span>  <span class="keywordtype">void</span> <a class="code" href="classBoundedHashMap.html#a54e903e8c96c78d913e74609d836ae67">set</a>(<span class="keyword">const</span> Key& key, <span class="keyword">const</span> Value& value)</div> +<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  {</div> +<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <span class="keywordflow">if</span> (capacity_ == 0) {</div> +<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keywordflow">return</span>;</div> +<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  }</div> +<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> </div> +<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keywordflow">if</span> (!keys_.<a class="code" href="classhashmap.html#ac142b3f8b73c76d5d4545bbd299007e5">contains</a>(key)) {</div> +<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="comment">// Insert a new list entry and get a "pointer" to its location.</span></div> +<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keyword">typename</span> list::iterator iter =</div> +<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  entries_.insert(entries_.end(), std::make_pair(key, value));</div> +<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div> +<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  keys_[key] = iter;</div> +<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> </div> +<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="comment">// If the map now exceeds its capacity, remove the oldest entry.</span></div> +<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="comment">// Note that removal from both std::list and hashmap does not</span></div> +<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="comment">// invalidate iterators that reference other entries.</span></div> +<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="keywordflow">if</span> (keys_.size() > capacity_) {</div> +<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="keyword">typename</span> list::iterator firstEntry = entries_.begin();</div> +<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  keys_.erase(firstEntry->first);</div> +<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  entries_.erase(firstEntry);</div> +<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div> +<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  CHECK(keys_.size() == capacity_);</div> +<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  }</div> +<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  } <span class="keywordflow">else</span> {</div> +<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  keys_[key]->second = value;</div> +<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  }</div> +<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  }</div> +<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div> +<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html#a852bfef273fe4f90653d271378a2cbec"> 67</a></span>  <a class="code" href="classOption.html">Option<Value></a> <span class="keyword">get</span>(<span class="keyword">const</span> Key& key) <span class="keyword">const</span></div> +<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  {</div> +<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="keywordflow">if</span> (keys_.<a class="code" href="classhashmap.html#ac142b3f8b73c76d5d4545bbd299007e5">contains</a>(key)) {</div> +<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keywordflow">return</span> keys_.at(key)->second;</div> +<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  }</div> +<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordflow">return</span> <a class="code" href="structNone.html">None</a>();</div> +<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  }</div> +<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> </div> +<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html#a70ac620485764a32411dfd63cbed12c5"> 75</a></span>  Value& <a class="code" href="classBoundedHashMap.html#a70ac620485764a32411dfd63cbed12c5">at</a>(<span class="keyword">const</span> Key& key)</div> +<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  {</div> +<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordflow">return</span> keys_.at(key)->second;</div> +<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  }</div> +<div class="line"><a name="l00079"></a><span class="lineno"> 79</span> </div> +<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html#ad821f79df9d83977f91240c495257c5f"> 80</a></span>  <span class="keyword">const</span> Value& <a class="code" href="classBoundedHashMap.html#ad821f79df9d83977f91240c495257c5f">at</a>(<span class="keyword">const</span> Key& key)<span class="keyword"> const</span></div> +<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="keyword"> </span>{</div> +<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keywordflow">return</span> keys_.at(key)->second;</div> +<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  }</div> +<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> </div> +<div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html#a301ca7659ecbb2b5e054b00de4973e8c"> 85</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classBoundedHashMap.html#a301ca7659ecbb2b5e054b00de4973e8c">contains</a>(<span class="keyword">const</span> Key& key)<span class="keyword"> const</span></div> +<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="keyword"> </span>{</div> +<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="keywordflow">return</span> keys_.<a class="code" href="classhashmap.html#ac142b3f8b73c76d5d4545bbd299007e5">contains</a>(key);</div> +<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  }</div> +<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> </div> +<div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html#a0d549fc5e940b2117b65083fc796f035"> 90</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classBoundedHashMap.html#a0d549fc5e940b2117b65083fc796f035">erase</a>(<span class="keyword">const</span> Key& key)</div> +<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  {</div> +<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="keywordflow">if</span> (keys_.<a class="code" href="classhashmap.html#ac142b3f8b73c76d5d4545bbd299007e5">contains</a>(key)) {</div> +<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keyword">typename</span> list::iterator <a class="code" href="classBoundedHashMap.html#a35ccd513de49c362d6a76e87e5923143">entry</a> = keys_[key];</div> +<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  keys_.erase(key);</div> +<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  entries_.erase(entry);</div> +<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> </div> +<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keywordflow">return</span> 1;</div> +<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  }</div> +<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="keywordflow">return</span> 0;</div> +<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  }</div> +<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> </div> +<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="comment">// Returns the keys in the map in insertion order.</span></div> +<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html#ab68b4c5ea8887bff0b68853223b130f3"> 103</a></span>  std::list<Key> <a class="code" href="classBoundedHashMap.html#ab68b4c5ea8887bff0b68853223b130f3">keys</a>()<span class="keyword"> const</span></div> +<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="keyword"> </span>{</div> +<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  std::list<Key> result;</div> +<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> </div> +<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="keywordflow">foreach</span> (<span class="keyword">const</span> <a class="code" href="classBoundedHashMap.html#a35ccd513de49c362d6a76e87e5923143">entry</a>& <a class="code" href="classBoundedHashMap.html#a35ccd513de49c362d6a76e87e5923143">entry</a>, entries_) {</div> +<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  result.push_back(entry.first);</div> +<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  }</div> +<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> </div> +<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <span class="keywordflow">return</span> result;</div> +<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  }</div> +<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> </div> +<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="comment">// Returns the values in the map in insertion order.</span></div> +<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html#a3230dcf13d6b5099fe3aba148573e7a9"> 115</a></span>  std::list<Value> <a class="code" href="classBoundedHashMap.html#a3230dcf13d6b5099fe3aba148573e7a9">values</a>()<span class="keyword"> const</span></div> +<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="keyword"> </span>{</div> +<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  std::list<Value> result;</div> +<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> </div> +<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="keywordflow">foreach</span> (<span class="keyword">const</span> <a class="code" href="classBoundedHashMap.html#a35ccd513de49c362d6a76e87e5923143">entry</a>& <a class="code" href="classBoundedHashMap.html#a35ccd513de49c362d6a76e87e5923143">entry</a>, entries_) {</div> +<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  result.push_back(entry.second);</div> +<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  }</div> +<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> </div> +<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <span class="keywordflow">return</span> result;</div> +<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  }</div> +<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> </div> +<div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html#aa0c84c4c9636449ab35ef13ecce36266"> 126</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classBoundedHashMap.html#aa0c84c4c9636449ab35ef13ecce36266">size</a>()<span class="keyword"> const</span></div> +<div class="line"><a name="l00127"></a><span class="lineno"> 127</span> <span class="keyword"> </span>{</div> +<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="keywordflow">return</span> keys_.size();</div> +<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  }</div> +<div class="line"><a name="l00130"></a><span class="lineno"> 130</span> </div> +<div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html#aa628a0c249203758e056473698c53ed6"> 131</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classBoundedHashMap.html#aa628a0c249203758e056473698c53ed6">empty</a>()<span class="keyword"> const</span></div> +<div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="keyword"> </span>{</div> +<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keywordflow">return</span> keys_.empty();</div> +<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  }</div> +<div class="line"><a name="l00135"></a><span class="lineno"> 135</span> </div> +<div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html#aed7138e6b983ced56b126a5bc43e37c8"> 136</a></span>  <span class="keywordtype">void</span> <a class="code" href="classBoundedHashMap.html#aed7138e6b983ced56b126a5bc43e37c8">clear</a>()</div> +<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  {</div> +<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  entries_.clear();</div> +<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  keys_.clear();</div> +<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  }</div> +<div class="line"><a name="l00141"></a><span class="lineno"> 141</span> </div> +<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="comment">// Support for iteration; this allows using `foreachpair` and</span></div> +<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="comment">// related constructs. Note that these iterate over the map in</span></div> +<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="comment">// insertion order.</span></div> +<div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html#a4cb91ebc0803532a11b448886a8c2dce"> 145</a></span>  <span class="keyword">typename</span> list::iterator <a class="code" href="classBoundedHashMap.html#a4cb91ebc0803532a11b448886a8c2dce">begin</a>() { <span class="keywordflow">return</span> entries_.begin(); }</div> +<div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html#a8ec9da0f54d5b063b34e0fb33485cc8a"> 146</a></span>  <span class="keyword">typename</span> list::iterator <a class="code" href="classBoundedHashMap.html#a8ec9da0f54d5b063b34e0fb33485cc8a">end</a>() { <span class="keywordflow">return</span> entries_.end(); }</div> +<div class="line"><a name="l00147"></a><span class="lineno"> 147</span> </div> +<div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html#a9a07a63071611db41410f0a707e16575"> 148</a></span>  <span class="keyword">typename</span> list::const_iterator <a class="code" href="classBoundedHashMap.html#a9a07a63071611db41410f0a707e16575">begin</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> entries_.cbegin(); }</div> +<div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="classBoundedHashMap.html#a7d90d9668967c2ed885cc6a6e72d558c"> 149</a></span>  <span class="keyword">typename</span> list::const_iterator <a class="code" href="classBoundedHashMap.html#a7d90d9668967c2ed885cc6a6e72d558c">end</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> entries_.cend(); }</div> +<div class="line"><a name="l00150"></a><span class="lineno"> 150</span> </div> +<div class="line"><a name="l00151"></a><span class="lineno"> 151</span> <span class="keyword">private</span>:</div> +<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <span class="keyword">const</span> <span class="keywordtype">size_t</span> capacity_;</div> +<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <a class="code" href="classBoundedHashMap.html#a8dccc532c99c340728c8f186230fb64e">list</a> entries_; <span class="comment">// Key-value pairs ordered by insertion order.</span></div> +<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <a class="code" href="classBoundedHashMap.html#a1c466b3b3f48efaea49e9d66903a7526">map</a> keys_; <span class="comment">// Map from key to "pointer" to key's location in list.</span></div> +<div class="line"><a name="l00155"></a><span class="lineno"> 155</span> };</div> +<div class="line"><a name="l00156"></a><span class="lineno"> 156</span> </div> +<div class="line"><a name="l00157"></a><span class="lineno"> 157</span> <span class="preprocessor">#endif // __STOUT_BOUNDEDHASHMAP_HPP__</span></div> +<div class="ttc" id="classBoundedHashMap_html_a311e29319ba27184ab59b5674312ed09"><div class="ttname"><a href="classBoundedHashMap.html#a311e29319ba27184ab59b5674312ed09">BoundedHashMap::BoundedHashMap</a></div><div class="ttdeci">BoundedHashMap(size_t capacity)</div><div class="ttdef"><b>Definition:</b> boundedhashmap.hpp:34</div></div> +<div class="ttc" id="classOption_html"><div class="ttname"><a href="classOption.html">Option</a></div><div class="ttdef"><b>Definition:</b> option.hpp:24</div></div> +<div class="ttc" id="classBoundedHashMap_html_a35ccd513de49c362d6a76e87e5923143"><div class="ttname"><a href="classBoundedHashMap.html#a35ccd513de49c362d6a76e87e5923143">BoundedHashMap::entry</a></div><div class="ttdeci">std::pair< Key, Value > entry</div><div class="ttdef"><b>Definition:</b> boundedhashmap.hpp:30</div></div> +<div class="ttc" id="classBoundedHashMap_html_a9a07a63071611db41410f0a707e16575"><div class="ttname"><a href="classBoundedHashMap.html#a9a07a63071611db41410f0a707e16575">BoundedHashMap::begin</a></div><div class="ttdeci">list::const_iterator begin() const </div><div class="ttdef"><b>Definition:</b> boundedhashmap.hpp:148</div></div> +<div class="ttc" id="classBoundedHashMap_html_a70ac620485764a32411dfd63cbed12c5"><div class="ttname"><a href="classBoundedHashMap.html#a70ac620485764a32411dfd63cbed12c5">BoundedHashMap::at</a></div><div class="ttdeci">Value & at(const Key &key)</div><div class="ttdef"><b>Definition:</b> boundedhashmap.hpp:75</div></div> +<div class="ttc" id="stout_2include_2stout_2check_8hpp_html"><div class="ttname"><a href="stout_2include_2stout_2check_8hpp.html">check.hpp</a></div></div> +<div class="ttc" id="classBoundedHashMap_html_a8dccc532c99c340728c8f186230fb64e"><div class="ttname"><a href="classBoundedHashMap.html#a8dccc532c99c340728c8f186230fb64e">BoundedHashMap::list</a></div><div class="ttdeci">std::list< entry > list</div><div class="ttdef"><b>Definition:</b> boundedhashmap.hpp:31</div></div> +<div class="ttc" id="classBoundedHashMap_html_ad821f79df9d83977f91240c495257c5f"><div class="ttname"><a href="classBoundedHashMap.html#ad821f79df9d83977f91240c495257c5f">BoundedHashMap::at</a></div><div class="ttdeci">const Value & at(const Key &key) const </div><div class="ttdef"><b>Definition:</b> boundedhashmap.hpp:80</div></div> +<div class="ttc" id="classhashmap_html"><div class="ttname"><a href="classhashmap.html">hashmap< Key, typename list::iterator ></a></div></div> +<div class="ttc" id="classBoundedHashMap_html_aa0c84c4c9636449ab35ef13ecce36266"><div class="ttname"><a href="classBoundedHashMap.html#aa0c84c4c9636449ab35ef13ecce36266">BoundedHashMap::size</a></div><div class="ttdeci">size_t size() const </div><div class="ttdef"><b>Definition:</b> boundedhashmap.hpp:126</div></div> +<div class="ttc" id="classBoundedHashMap_html_a4cb91ebc0803532a11b448886a8c2dce"><div class="ttname"><a href="classBoundedHashMap.html#a4cb91ebc0803532a11b448886a8c2dce">BoundedHashMap::begin</a></div><div class="ttdeci">list::iterator begin()</div><div class="ttdef"><b>Definition:</b> boundedhashmap.hpp:145</div></div> +<div class="ttc" id="classBoundedHashMap_html_a301ca7659ecbb2b5e054b00de4973e8c"><div class="ttname"><a href="classBoundedHashMap.html#a301ca7659ecbb2b5e054b00de4973e8c">BoundedHashMap::contains</a></div><div class="ttdeci">bool contains(const Key &key) const </div><div class="ttdef"><b>Definition:</b> boundedhashmap.hpp:85</div></div> +<div class="ttc" id="classBoundedHashMap_html_ab68b4c5ea8887bff0b68853223b130f3"><div class="ttname"><a href="classBoundedHashMap.html#ab68b4c5ea8887bff0b68853223b130f3">BoundedHashMap::keys</a></div><div class="ttdeci">std::list< Key > keys() const </div><div class="ttdef"><b>Definition:</b> boundedhashmap.hpp:103</div></div> +<div class="ttc" id="classBoundedHashMap_html_a0d549fc5e940b2117b65083fc796f035"><div class="ttname"><a href="classBoundedHashMap.html#a0d549fc5e940b2117b65083fc796f035">BoundedHashMap::erase</a></div><div class="ttdeci">size_t erase(const Key &key)</div><div class="ttdef"><b>Definition:</b> boundedhashmap.hpp:90</div></div> +<div class="ttc" id="option_8hpp_html"><div class="ttname"><a href="option_8hpp.html">option.hpp</a></div></div> +<div class="ttc" id="classBoundedHashMap_html_a3230dcf13d6b5099fe3aba148573e7a9"><div class="ttname"><a href="classBoundedHashMap.html#a3230dcf13d6b5099fe3aba148573e7a9">BoundedHashMap::values</a></div><div class="ttdeci">std::list< Value > values() const </div><div class="ttdef"><b>Definition:</b> boundedhashmap.hpp:115</div></div> +<div class="ttc" id="classBoundedHashMap_html"><div class="ttname"><a href="classBoundedHashMap.html">BoundedHashMap</a></div><div class="ttdef"><b>Definition:</b> boundedhashmap.hpp:27</div></div> +<div class="ttc" id="structNone_html"><div class="ttname"><a href="structNone.html">None</a></div><div class="ttdef"><b>Definition:</b> none.hpp:27</div></div> +<div class="ttc" id="classBoundedHashMap_html_aed7138e6b983ced56b126a5bc43e37c8"><div class="ttname"><a href="classBoundedHashMap.html#aed7138e6b983ced56b126a5bc43e37c8">BoundedHashMap::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdef"><b>Definition:</b> boundedhashmap.hpp:136</div></div> +<div class="ttc" id="classBoundedHashMap_html_a54e903e8c96c78d913e74609d836ae67"><div class="ttname"><a href="classBoundedHashMap.html#a54e903e8c96c78d913e74609d836ae67">BoundedHashMap::set</a></div><div class="ttdeci">void set(const Key &key, const Value &value)</div><div class="ttdef"><b>Definition:</b> boundedhashmap.hpp:39</div></div> +<div class="ttc" id="classBoundedHashMap_html_a1c466b3b3f48efaea49e9d66903a7526"><div class="ttname"><a href="classBoundedHashMap.html#a1c466b3b3f48efaea49e9d66903a7526">BoundedHashMap::map</a></div><div class="ttdeci">hashmap< Key, typename list::iterator > map</div><div class="ttdef"><b>Definition:</b> boundedhashmap.hpp:32</div></div> +<div class="ttc" id="classBoundedHashMap_html_a7d90d9668967c2ed885cc6a6e72d558c"><div class="ttname"><a href="classBoundedHashMap.html#a7d90d9668967c2ed885cc6a6e72d558c">BoundedHashMap::end</a></div><div class="ttdeci">list::const_iterator end() const </div><div class="ttdef"><b>Definition:</b> boundedhashmap.hpp:149</div></div> +<div class="ttc" id="classBoundedHashMap_html_aa628a0c249203758e056473698c53ed6"><div class="ttname"><a href="classBoundedHashMap.html#aa628a0c249203758e056473698c53ed6">BoundedHashMap::empty</a></div><div class="ttdeci">bool empty() const </div><div class="ttdef"><b>Definition:</b> boundedhashmap.hpp:131</div></div> +<div class="ttc" id="classhashmap_html_ac142b3f8b73c76d5d4545bbd299007e5"><div class="ttname"><a href="classhashmap.html#ac142b3f8b73c76d5d4545bbd299007e5">hashmap::contains</a></div><div class="ttdeci">bool contains(const Key &key) const </div><div class="ttdef"><b>Definition:</b> hashmap.hpp:84</div></div> +<div class="ttc" id="classBoundedHashMap_html_a8ec9da0f54d5b063b34e0fb33485cc8a"><div class="ttname"><a href="classBoundedHashMap.html#a8ec9da0f54d5b063b34e0fb33485cc8a">BoundedHashMap::end</a></div><div class="ttdeci">list::iterator end()</div><div class="ttdef"><b>Definition:</b> boundedhashmap.hpp:146</div></div> +<div class="ttc" id="hashmap_8hpp_html"><div class="ttname"><a href="hashmap_8hpp.html">hashmap.hpp</a></div></div> +</div><!-- fragment --></div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.5 +</small></address> +</body> +</html>
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/a3206036/content/api/latest/c++/build_8hpp.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/build_8hpp.html b/content/api/latest/c++/build_8hpp.html new file mode 100644 index 0000000..24d514f --- /dev/null +++ b/content/api/latest/c++/build_8hpp.html @@ -0,0 +1,98 @@ +<!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"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.5"/> +<title>Apache Mesos: src/common/build.hpp File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td style="padding-left: 0.5em;"> + <div id="projectname">Apache Mesos + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.5 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li><a href="namespaces.html"><span>Namespaces</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><a href="examples.html"><span>Examples</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_fdedb0aba14d44ce9d99bc100e026e6a.html">common</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#namespaces">Namespaces</a> | +<a href="#var-members">Variables</a> </div> + <div class="headertitle"> +<div class="title">build.hpp File Reference</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><code>#include <string></code><br/> +</div> +<p><a href="build_8hpp_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a> +Namespaces</h2></td></tr> +<tr class="memitem:namespacemesos"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemesos.html">mesos</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:namespacemesos_1_1internal"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemesos_1_1internal.html">mesos::internal</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:namespacemesos_1_1internal_1_1build"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemesos_1_1internal_1_1build.html">mesos::internal::build</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a> +Variables</h2></td></tr> +<tr class="memitem:a815dab7636e7ddbb6ede2493d9b3f40f"><td class="memItemLeft" align="right" valign="top">const std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemesos_1_1internal_1_1build.html#a815dab7636e7ddbb6ede2493d9b3f40f">mesos::internal::build::DATE</a></td></tr> +<tr class="separator:a815dab7636e7ddbb6ede2493d9b3f40f"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:aa79f42728c96cf89104ff674afd449ef"><td class="memItemLeft" align="right" valign="top">const double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemesos_1_1internal_1_1build.html#aa79f42728c96cf89104ff674afd449ef">mesos::internal::build::TIME</a></td></tr> +<tr class="separator:aa79f42728c96cf89104ff674afd449ef"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a990aa9342d17028bb8dbce24b4e9ef10"><td class="memItemLeft" align="right" valign="top">const std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemesos_1_1internal_1_1build.html#a990aa9342d17028bb8dbce24b4e9ef10">mesos::internal::build::USER</a></td></tr> +<tr class="separator:a990aa9342d17028bb8dbce24b4e9ef10"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ac7ad8af16064f5374768b02b584f9636"><td class="memItemLeft" align="right" valign="top">const std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemesos_1_1internal_1_1build.html#ac7ad8af16064f5374768b02b584f9636">mesos::internal::build::FLAGS</a></td></tr> +<tr class="separator:ac7ad8af16064f5374768b02b584f9636"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a629287c92cdad45338c6791495c5d696"><td class="memItemLeft" align="right" valign="top">const std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemesos_1_1internal_1_1build.html#a629287c92cdad45338c6791495c5d696">mesos::internal::build::JAVA_JVM_LIBRARY</a></td></tr> +<tr class="separator:a629287c92cdad45338c6791495c5d696"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ac100c57fe8d1090b0117fd1f26fcf730"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classOption.html">Option</a>< std::string > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemesos_1_1internal_1_1build.html#ac100c57fe8d1090b0117fd1f26fcf730">mesos::internal::build::GIT_SHA</a></td></tr> +<tr class="separator:ac100c57fe8d1090b0117fd1f26fcf730"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:acb7d084d37c709bfa87207ba1b5be465"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classOption.html">Option</a>< std::string > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemesos_1_1internal_1_1build.html#acb7d084d37c709bfa87207ba1b5be465">mesos::internal::build::GIT_BRANCH</a></td></tr> +<tr class="separator:acb7d084d37c709bfa87207ba1b5be465"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:acb25c3d04299afc5daa3a7218f5e09d4"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classOption.html">Option</a>< std::string > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemesos_1_1internal_1_1build.html#acb25c3d04299afc5daa3a7218f5e09d4">mesos::internal::build::GIT_TAG</a></td></tr> +<tr class="separator:acb25c3d04299afc5daa3a7218f5e09d4"><td class="memSeparator" colspan="2"> </td></tr> +</table> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.5 +</small></address> +</body> +</html> http://git-wip-us.apache.org/repos/asf/mesos-site/blob/a3206036/content/api/latest/c++/build_8hpp_source.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/build_8hpp_source.html b/content/api/latest/c++/build_8hpp_source.html new file mode 100644 index 0000000..b2dbbc9 --- /dev/null +++ b/content/api/latest/c++/build_8hpp_source.html @@ -0,0 +1,111 @@ +<!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"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.5"/> +<title>Apache Mesos: src/common/build.hpp Source File</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td style="padding-left: 0.5em;"> + <div id="projectname">Apache Mesos + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.5 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li><a href="namespaces.html"><span>Namespaces</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><a href="examples.html"><span>Examples</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_fdedb0aba14d44ce9d99bc100e026e6a.html">common</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">build.hpp</div> </div> +</div><!--header--> +<div class="contents"> +<a href="build_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// Licensed to the Apache Software Foundation (ASF) under one</span></div> +<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// or more contributor license agreements. See the NOTICE file</span></div> +<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// distributed with this work for additional information</span></div> +<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">// regarding copyright ownership. The ASF licenses this file</span></div> +<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// to you under the Apache License, Version 2.0 (the</span></div> +<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">// "License"); you may not use this file except in compliance</span></div> +<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">// with the License. You may obtain a copy of the License at</span></div> +<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">//</span></div> +<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div> +<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">//</span></div> +<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div> +<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div> +<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div> +<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">// See the License for the specific language governing permissions and</span></div> +<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">// limitations under the License.</span></div> +<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> </div> +<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#ifndef __BUILD_HPP__</span></div> +<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor"></span><span class="preprocessor">#define __BUILD_HPP__</span></div> +<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor"></span></div> +<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include <string></span></div> +<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div> +<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="keyword">namespace </span>mesos {</div> +<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="keyword">namespace </span>internal {</div> +<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal_1_1build.html"> 24</a></span> <span class="keyword">namespace </span>build {</div> +<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div> +<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="keyword">extern</span> <span class="keyword">const</span> std::string <a class="code" href="namespacemesos_1_1internal_1_1build.html#a815dab7636e7ddbb6ede2493d9b3f40f">DATE</a>;</div> +<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="namespacemesos_1_1internal_1_1build.html#aa79f42728c96cf89104ff674afd449ef">TIME</a>;</div> +<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="keyword">extern</span> <span class="keyword">const</span> std::string <a class="code" href="namespacemesos_1_1internal_1_1build.html#a990aa9342d17028bb8dbce24b4e9ef10">USER</a>;</div> +<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="keyword">extern</span> <span class="keyword">const</span> std::string <a class="code" href="namespacemesos_1_1internal_1_1build.html#ac7ad8af16064f5374768b02b584f9636">FLAGS</a>;</div> +<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="keyword">extern</span> <span class="keyword">const</span> std::string <a class="code" href="namespacemesos_1_1internal_1_1build.html#a629287c92cdad45338c6791495c5d696">JAVA_JVM_LIBRARY</a>;</div> +<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="classOption.html">Option<std::string></a> <a class="code" href="namespacemesos_1_1internal_1_1build.html#ac100c57fe8d1090b0117fd1f26fcf730">GIT_SHA</a>;</div> +<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="classOption.html">Option<std::string></a> <a class="code" href="namespacemesos_1_1internal_1_1build.html#acb7d084d37c709bfa87207ba1b5be465">GIT_BRANCH</a>;</div> +<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="classOption.html">Option<std::string></a> <a class="code" href="namespacemesos_1_1internal_1_1build.html#acb25c3d04299afc5daa3a7218f5e09d4">GIT_TAG</a>;</div> +<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div> +<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> } <span class="comment">// namespace build {</span></div> +<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> } <span class="comment">// namespace internal {</span></div> +<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> } <span class="comment">// namespace mesos {</span></div> +<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div> +<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="preprocessor">#endif // __BUILD_HPP__</span></div> +<div class="ttc" id="classOption_html"><div class="ttname"><a href="classOption.html">Option< std::string ></a></div></div> +<div class="ttc" id="namespacemesos_1_1internal_1_1build_html_a990aa9342d17028bb8dbce24b4e9ef10"><div class="ttname"><a href="namespacemesos_1_1internal_1_1build.html#a990aa9342d17028bb8dbce24b4e9ef10">mesos::internal::build::USER</a></div><div class="ttdeci">const std::string USER</div></div> +<div class="ttc" id="namespacemesos_1_1internal_1_1build_html_aa79f42728c96cf89104ff674afd449ef"><div class="ttname"><a href="namespacemesos_1_1internal_1_1build.html#aa79f42728c96cf89104ff674afd449ef">mesos::internal::build::TIME</a></div><div class="ttdeci">const double TIME</div></div> +<div class="ttc" id="namespacemesos_1_1internal_1_1build_html_a815dab7636e7ddbb6ede2493d9b3f40f"><div class="ttname"><a href="namespacemesos_1_1internal_1_1build.html#a815dab7636e7ddbb6ede2493d9b3f40f">mesos::internal::build::DATE</a></div><div class="ttdeci">const std::string DATE</div></div> +<div class="ttc" id="namespacemesos_1_1internal_1_1build_html_acb7d084d37c709bfa87207ba1b5be465"><div class="ttname"><a href="namespacemesos_1_1internal_1_1build.html#acb7d084d37c709bfa87207ba1b5be465">mesos::internal::build::GIT_BRANCH</a></div><div class="ttdeci">const Option< std::string > GIT_BRANCH</div></div> +<div class="ttc" id="namespacemesos_1_1internal_1_1build_html_a629287c92cdad45338c6791495c5d696"><div class="ttname"><a href="namespacemesos_1_1internal_1_1build.html#a629287c92cdad45338c6791495c5d696">mesos::internal::build::JAVA_JVM_LIBRARY</a></div><div class="ttdeci">const std::string JAVA_JVM_LIBRARY</div></div> +<div class="ttc" id="namespacemesos_1_1internal_1_1build_html_ac7ad8af16064f5374768b02b584f9636"><div class="ttname"><a href="namespacemesos_1_1internal_1_1build.html#ac7ad8af16064f5374768b02b584f9636">mesos::internal::build::FLAGS</a></div><div class="ttdeci">const std::string FLAGS</div></div> +<div class="ttc" id="namespacemesos_1_1internal_1_1build_html_acb25c3d04299afc5daa3a7218f5e09d4"><div class="ttname"><a href="namespacemesos_1_1internal_1_1build.html#acb25c3d04299afc5daa3a7218f5e09d4">mesos::internal::build::GIT_TAG</a></div><div class="ttdeci">const Option< std::string > GIT_TAG</div></div> +<div class="ttc" id="namespacemesos_1_1internal_1_1build_html_ac100c57fe8d1090b0117fd1f26fcf730"><div class="ttname"><a href="namespacemesos_1_1internal_1_1build.html#ac100c57fe8d1090b0117fd1f26fcf730">mesos::internal::build::GIT_SHA</a></div><div class="ttdeci">const Option< std::string > GIT_SHA</div></div> +</div><!-- fragment --></div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.5 +</small></address> +</body> +</html> http://git-wip-us.apache.org/repos/asf/mesos-site/blob/a3206036/content/api/latest/c++/bytes_8hpp.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/bytes_8hpp.html b/content/api/latest/c++/bytes_8hpp.html new file mode 100644 index 0000000..a72411d --- /dev/null +++ b/content/api/latest/c++/bytes_8hpp.html @@ -0,0 +1,276 @@ +<!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"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.5"/> +<title>Apache Mesos: 3rdparty/stout/include/stout/bytes.hpp File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td style="padding-left: 0.5em;"> + <div id="projectname">Apache Mesos + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.5 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li><a href="namespaces.html"><span>Namespaces</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><a href="examples.html"><span>Examples</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_8cab8f464681f7cc51cee77e79a434cd.html">3rdparty</a></li><li class="navelem"><a class="el" href="dir_aa547de1d719d14adccfca1dfb1735b3.html">stout</a></li><li class="navelem"><a class="el" href="dir_1a1b923d951dd999d43396870333fc33.html">include</a></li><li class="navelem"><a class="el" href="dir_dbd52553d038069c1ed93e3477ea333d.html">stout</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Classes</a> | +<a href="#func-members">Functions</a> </div> + <div class="headertitle"> +<div class="title">bytes.hpp File Reference</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><code>#include <ctype.h></code><br/> +<code>#include <stdint.h></code><br/> +<code>#include <iomanip></code><br/> +<code>#include <iostream></code><br/> +<code>#include <string></code><br/> +<code>#include <<a class="el" href="abort_8hpp_source.html">stout/abort.hpp</a>></code><br/> +<code>#include <<a class="el" href="numify_8hpp_source.html">stout/numify.hpp</a>></code><br/> +<code>#include <<a class="el" href="stringify_8hpp_source.html">stout/stringify.hpp</a>></code><br/> +<code>#include <<a class="el" href="strings_8hpp_source.html">stout/strings.hpp</a>></code><br/> +<code>#include <<a class="el" href="try_8hpp_source.html">stout/try.hpp</a>></code><br/> +</div> +<p><a href="bytes_8hpp_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> +Classes</h2></td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classBytes.html">Bytes</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classKilobytes.html">Kilobytes</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classMegabytes.html">Megabytes</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classGigabytes.html">Gigabytes</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classTerabytes.html">Terabytes</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> +Functions</h2></td></tr> +<tr class="memitem:a5e87dde1f7de1550205527b0a837d2a1"><td class="memItemLeft" align="right" valign="top">std::ostream & </td><td class="memItemRight" valign="bottom"><a class="el" href="bytes_8hpp.html#a5e87dde1f7de1550205527b0a837d2a1">operator<<</a> (std::ostream &stream, const <a class="el" href="classBytes.html">Bytes</a> &bytes)</td></tr> +<tr class="separator:a5e87dde1f7de1550205527b0a837d2a1"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ab8178989216bbbc9c2c750f4efe9aec2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classBytes.html">Bytes</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="bytes_8hpp.html#ab8178989216bbbc9c2c750f4efe9aec2">operator+</a> (const <a class="el" href="classBytes.html">Bytes</a> &lhs, const <a class="el" href="classBytes.html">Bytes</a> &rhs)</td></tr> +<tr class="separator:ab8178989216bbbc9c2c750f4efe9aec2"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a1b13dd560e830b9dd9c82da3ef2175b4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classBytes.html">Bytes</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="bytes_8hpp.html#a1b13dd560e830b9dd9c82da3ef2175b4">operator-</a> (const <a class="el" href="classBytes.html">Bytes</a> &lhs, const <a class="el" href="classBytes.html">Bytes</a> &rhs)</td></tr> +<tr class="separator:a1b13dd560e830b9dd9c82da3ef2175b4"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a7045e3d0e2cc485a30aef5659bbd1527"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classBytes.html">Bytes</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="bytes_8hpp.html#a7045e3d0e2cc485a30aef5659bbd1527">operator*</a> (const <a class="el" href="classBytes.html">Bytes</a> &lhs, uint64_t multiplier)</td></tr> +<tr class="separator:a7045e3d0e2cc485a30aef5659bbd1527"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a7e600e17fc1650a8f0ad974e382a2926"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classBytes.html">Bytes</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="bytes_8hpp.html#a7e600e17fc1650a8f0ad974e382a2926">operator/</a> (const <a class="el" href="classBytes.html">Bytes</a> &lhs, uint64_t divisor)</td></tr> +<tr class="separator:a7e600e17fc1650a8f0ad974e382a2926"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Function Documentation</h2> +<a class="anchor" id="a7045e3d0e2cc485a30aef5659bbd1527"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="classBytes.html">Bytes</a> operator* </td> + <td>(</td> + <td class="paramtype">const <a class="el" href="classBytes.html">Bytes</a> & </td> + <td class="paramname"><em>lhs</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">uint64_t </td> + <td class="paramname"><em>multiplier</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">inline</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="ab8178989216bbbc9c2c750f4efe9aec2"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="classBytes.html">Bytes</a> operator+ </td> + <td>(</td> + <td class="paramtype">const <a class="el" href="classBytes.html">Bytes</a> & </td> + <td class="paramname"><em>lhs</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const <a class="el" href="classBytes.html">Bytes</a> & </td> + <td class="paramname"><em>rhs</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">inline</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a1b13dd560e830b9dd9c82da3ef2175b4"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="classBytes.html">Bytes</a> operator- </td> + <td>(</td> + <td class="paramtype">const <a class="el" href="classBytes.html">Bytes</a> & </td> + <td class="paramname"><em>lhs</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const <a class="el" href="classBytes.html">Bytes</a> & </td> + <td class="paramname"><em>rhs</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">inline</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a7e600e17fc1650a8f0ad974e382a2926"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="classBytes.html">Bytes</a> operator/ </td> + <td>(</td> + <td class="paramtype">const <a class="el" href="classBytes.html">Bytes</a> & </td> + <td class="paramname"><em>lhs</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">uint64_t </td> + <td class="paramname"><em>divisor</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">inline</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a5e87dde1f7de1550205527b0a837d2a1"></a> +<div class="memitem"> +<div class="memproto"> +<table class="mlabels"> + <tr> + <td class="mlabels-left"> + <table class="memname"> + <tr> + <td class="memname">std::ostream& operator<< </td> + <td>(</td> + <td class="paramtype">std::ostream & </td> + <td class="paramname"><em>stream</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">const <a class="el" href="classBytes.html">Bytes</a> & </td> + <td class="paramname"><em>bytes</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> + </td> + <td class="mlabels-right"> +<span class="mlabels"><span class="mlabel">inline</span></span> </td> + </tr> +</table> +</div><div class="memdoc"> + +</div> +</div> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.5 +</small></address> +</body> +</html>