diff options
Diffstat (limited to 'doc/html/ObjDictionary_8h_source.html')
-rw-r--r-- | doc/html/ObjDictionary_8h_source.html | 265 |
1 files changed, 0 insertions, 265 deletions
diff --git a/doc/html/ObjDictionary_8h_source.html b/doc/html/ObjDictionary_8h_source.html deleted file mode 100644 index cf0162f..0000000 --- a/doc/html/ObjDictionary_8h_source.html +++ /dev/null @@ -1,265 +0,0 @@ -<!-- HTML header for doxygen 1.8.3.1--> -<!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.6"/> -<title>Templates -- Meow: meowpp/oo/ObjDictionary.h 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="navtree.css" rel="stylesheet" type="text/css"/> -<script type="text/javascript" src="resize.js"></script> -<script type="text/javascript" src="navtree.js"></script> -<script type="text/javascript"> - $(document).ready(initResizable); - $(window).load(resizeHeight); -</script> -<link href="stylesheet.css" rel="stylesheet" type="text/css" /> -<link href="custom.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 id="projectlogo"><img alt="Logo" src="logo.png"/></td> - <td style="padding-left: 0.5em;"> - <div id="projectname">Templates -- Meow -  <span id="projectnumber">1.2.11</span> - </div> - <div id="projectbrief">A C++ template contains kinds of interesting classes and functions</div> - </td> - </tr> - </tbody> -</table> -</div> -<!-- end header part --> -<!-- Generated by Doxygen 1.8.6 --> -</div><!-- top --> -<div id="side-nav" class="ui-resizable side-nav-resizable"> - <div id="nav-tree"> - <div id="nav-tree-contents"> - <div id="nav-sync" class="sync"></div> - </div> - </div> - <div id="splitbar" style="-moz-user-select:none;" - class="ui-resizable-handle"> - </div> -</div> -<script type="text/javascript"> -$(document).ready(function(){initNavTree('ObjDictionary_8h_source.html','');}); -</script> -<div id="doc-content"> -<div class="header"> - <div class="headertitle"> -<div class="title">ObjDictionary.h</div> </div> -</div><!--header--> -<div class="contents"> -<a href="ObjDictionary_8h.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="preprocessor">#ifndef oo_ObjDictionary_H__</span></div> -<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor"></span><span class="preprocessor">#define oo_ObjDictionary_H__</span></div> -<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="preprocessor"></span></div> -<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="preprocessor">#include "<a class="code" href="ObjBase_8h.html">ObjBase.h</a>"</span></div> -<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> </div> -<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="preprocessor">#include "../Self.h"</span></div> -<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div> -<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#include <string></span></div> -<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#include <typeinfo></span></div> -<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#include <map></span></div> -<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> </div> -<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#include <cstdio></span></div> -<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#include <cstdlib></span></div> -<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> </div> -<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="keyword">namespace </span>meow {</div> -<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> </div> -<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="keyword">template</span><<span class="keyword">class</span> Key, <span class="keyword">class</span> Value></div> -<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html"> 23</a></span> <span class="keyword">class </span><a class="code" href="classmeow_1_1ObjDictionary.html">ObjDictionary</a>: <span class="keyword">public</span> <a class="code" href="classmeow_1_1ObjBase.html">ObjBase</a> {</div> -<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="keyword">private</span>:</div> -<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  <span class="keyword">struct </span>Myself {</div> -<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  std::map<Key, Value> dictionary_;</div> -<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> </div> -<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  Myself() {</div> -<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  }</div> -<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div> -<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  Myself(Myself <span class="keyword">const</span>& b): dictionary_(b.dictionary_) {</div> -<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  }</div> -<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> </div> -<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  ~Myself() {</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>  };</div> -<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div> -<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <a class="code" href="classmeow_1_1Self.html">Self<Myself></a> <span class="keyword">const</span> <span class="keyword">self</span>;</div> -<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">public</span>:</div> -<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#a1055d36aa3d4551def2abd9aa86b7662"> 40</a></span>  <a class="code" href="classmeow_1_1ObjDictionary.html#a1055d36aa3d4551def2abd9aa86b7662">ObjDictionary</a>(): self() {</div> -<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  }</div> -<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div> -<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#ab29251c7ae6e13058912106075ebe161"> 43</a></span>  <a class="code" href="classmeow_1_1ObjDictionary.html#ab29251c7ae6e13058912106075ebe161">ObjDictionary</a>(<a class="code" href="classmeow_1_1ObjDictionary.html">ObjDictionary</a> <span class="keyword">const</span>& d): self(d.self, <a class="code" href="classmeow_1_1Self.html">Self</a><Myself>::COPY_FROM) {</div> -<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keyword">self</span>.copyFrom(b.self);</div> -<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  }</div> -<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> </div> -<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#a59cf39f8704134a64090ecb59fff01aa"> 47</a></span>  <a class="code" href="classmeow_1_1ObjDictionary.html#a59cf39f8704134a64090ecb59fff01aa">ObjDictionary</a>(std::map<Key, Value> <span class="keyword">const</span>& d): self(Myself(d)) {</div> -<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  }</div> -<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div> -<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#ab8eb8496153b57598e81e089eef89e08"> 50</a></span>  <a class="code" href="classmeow_1_1ObjDictionary.html#ab8eb8496153b57598e81e089eef89e08">~ObjDictionary</a>() {</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> </div> -<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#a7e50cbeeead963d95d661783ee2a9285"> 53</a></span>  <a class="code" href="classmeow_1_1ObjDictionary.html">ObjDictionary</a>& <a class="code" href="classmeow_1_1ObjDictionary.html#a7e50cbeeead963d95d661783ee2a9285">copyFrom</a>(<a class="code" href="classmeow_1_1ObjDictionary.html">ObjDictionary</a> <span class="keyword">const</span>& d) {</div> -<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="keyword">self</span>().<a class="code" href="classmeow_1_1ObjDictionary.html#a7e50cbeeead963d95d661783ee2a9285">copyFrom</a>(d.self);</div> -<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div> -<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  }</div> -<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> </div> -<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#ab0a4c64950a5a89012a913202fac027b"> 58</a></span>  <a class="code" href="classmeow_1_1ObjDictionary.html">ObjDictionary</a>& <a class="code" href="classmeow_1_1ObjDictionary.html#ab0a4c64950a5a89012a913202fac027b">referenceFrom</a>(<a class="code" href="classmeow_1_1ObjDictionary.html">ObjDictionary</a> <span class="keyword">const</span>& d) {</div> -<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="keyword">self</span>().<a class="code" href="classmeow_1_1ObjDictionary.html#ab0a4c64950a5a89012a913202fac027b">referenceFrom</a>(d.self);</div> -<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keywordflow">return</span> *<span class="keyword">this</span>;</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> </div> -<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#a0e265133214bd6b9f0dce6ce6dc6ca23"> 63</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classmeow_1_1ObjDictionary.html#a0e265133214bd6b9f0dce6ce6dc6ca23">size</a>()<span class="keyword"> const </span>{</div> -<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="keywordflow">return</span> <span class="keyword">self</span>->dictionary_.size();</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="classmeow_1_1ObjDictionary.html#afedaaaf1ed8b066a43d8e12081f6c878"> 67</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classmeow_1_1ObjDictionary.html#afedaaaf1ed8b066a43d8e12081f6c878">empty</a>()<span class="keyword"> const </span>{</div> -<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordflow">return</span> <span class="keyword">self</span>->dictionary_.empty();</div> -<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  }</div> -<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div> -<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#a081d3cf0d190e6dd02208c1c49653ed7"> 71</a></span>  <span class="keywordtype">void</span> <a class="code" href="classmeow_1_1ObjDictionary.html#a081d3cf0d190e6dd02208c1c49653ed7">clear</a>() {</div> -<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keyword">self</span>()->dictionary_.clear();</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="classmeow_1_1ObjDictionary.html#a451764f966fe7a237996c1698ba461ac"> 75</a></span>  std::map<Key, Value>::const_iterator <a class="code" href="classmeow_1_1ObjDictionary.html#a451764f966fe7a237996c1698ba461ac">first</a>()<span class="keyword"> const </span>{</div> -<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordflow">return</span> <span class="keyword">self</span>()->dictionary_.begin();</div> -<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  }</div> -<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> </div> -<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#a2724e52e9bf62b2c5b1fc999097f3d7d"> 79</a></span>  std::map<Key, Value>::iterator <a class="code" href="classmeow_1_1ObjDictionary.html#a2724e52e9bf62b2c5b1fc999097f3d7d">first</a>() {</div> -<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordflow">return</span> <span class="keyword">self</span>()->dictionary_.begin();</div> -<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  }</div> -<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> </div> -<div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#ae5f44ae004be8f10a1c9f5e65eeebc75"> 83</a></span>  std::map<Key, Value>::const_iterator <a class="code" href="classmeow_1_1ObjDictionary.html#ae5f44ae004be8f10a1c9f5e65eeebc75">end</a>()<span class="keyword"> const </span>{</div> -<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordflow">return</span> <span class="keyword">self</span>()->dictionary_.end(); <span class="comment">// OAO!!!</span></div> -<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  }</div> -<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> </div> -<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#aeb8765e90349daee27bcf9e6c2672676"> 87</a></span>  std::map<Key, Value>::iterator <a class="code" href="classmeow_1_1ObjDictionary.html#aeb8765e90349daee27bcf9e6c2672676">end</a>() {</div> -<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keywordflow">return</span> <span class="keyword">self</span>()->dictionary_.end();</div> -<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  }</div> -<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> </div> -<div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#a1979f646a23bffdd01a9fe52e5a8aca1"> 91</a></span>  std::map<Key, Value>::const_iterator <a class="code" href="classmeow_1_1ObjDictionary.html#a1979f646a23bffdd01a9fe52e5a8aca1">find</a>(Key <span class="keyword">const</span>& k)<span class="keyword"> const </span>{</div> -<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="keywordflow">return</span> <span class="keyword">self</span>()->dictionary_.find(k); <span class="comment">// OAO!!!</span></div> -<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  }</div> -<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> </div> -<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#a8f73bbc1d934566dd8a2087b145e3f48"> 95</a></span>  std::map<Key, Value>::iterator <a class="code" href="classmeow_1_1ObjDictionary.html#a8f73bbc1d934566dd8a2087b145e3f48">find</a>(Key <span class="keyword">const</span>& k) {</div> -<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keywordflow">return</span> <span class="keyword">self</span>()->dictionary_.find(k);</div> -<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  }</div> -<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> </div> -<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#ae60f2a947516d6d6f037cc106c00d3be"> 99</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classmeow_1_1ObjDictionary.html#ae60f2a947516d6d6f037cc106c00d3be">exist</a>(Key <span class="keyword">const</span>& k)<span class="keyword"> const </span>{</div> -<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keywordflow">return</span> (<a class="code" href="classmeow_1_1ObjDictionary.html#a1979f646a23bffdd01a9fe52e5a8aca1">find</a>() != <a class="code" href="classmeow_1_1ObjDictionary.html#ae5f44ae004be8f10a1c9f5e65eeebc75">end</a>());</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> </div> -<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#a9784fbd0eaab219216abdcba4f326ead"> 103</a></span>  <span class="keywordtype">void</span> <a class="code" href="classmeow_1_1ObjDictionary.html#a9784fbd0eaab219216abdcba4f326ead">insert</a>(Key <span class="keyword">const</span>& k, Value <span class="keyword">const</span>& v) {</div> -<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keyword">self</span>->dictionary_.insert(std::pair<Key, Value>(k, v));</div> -<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  }</div> -<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> </div> -<div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#a87b0f4542b07951f207a1c9d3e327c81"> 107</a></span>  <a class="code" href="classmeow_1_1ObjDictionary.html">ObjDictionary</a>& <a class="code" href="classmeow_1_1ObjDictionary.html#a87b0f4542b07951f207a1c9d3e327c81">operator=</a>(<a class="code" href="classmeow_1_1ObjDictionary.html">ObjDictionary</a> <span class="keyword">const</span>& a) {</div> -<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="keywordflow">return</span> <a class="code" href="classmeow_1_1ObjDictionary.html#a7e50cbeeead963d95d661783ee2a9285">copyFrom</a>(a);</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"><a class="line" href="classmeow_1_1ObjDictionary.html#a8d793863b74457608508c34d728f0983"> 111</a></span>  Value <a class="code" href="classmeow_1_1ObjDictionary.html#a8d793863b74457608508c34d728f0983">operator[]</a>(Key <span class="keyword">const</span>& k) {</div> -<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="keywordflow">return</span> <span class="keyword">self</span>()->dictionary_[k];</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> </div> -<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#a2393452e9533fab679565068545f109c"> 115</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classmeow_1_1ObjDictionary.html#a2393452e9533fab679565068545f109c">write</a>(FILE* f, <span class="keywordtype">bool</span> bin, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> fg)<span class="keyword"> const </span>{</div> -<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="keywordtype">size_t</span> sz = <a class="code" href="classmeow_1_1ObjDictionary.html#a0e265133214bd6b9f0dce6ce6dc6ca23">size</a>();</div> -<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keywordflow">if</span> (bin) {</div> -<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keywordflow">if</span> (fwrite(&sz, <span class="keyword">sizeof</span>(<span class="keywordtype">size_t</span>), 1, f) < 1) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div> -<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  }</div> -<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keywordflow">else</span> {</div> -<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <span class="keywordflow">if</span> (fprintf(f, <span class="stringliteral">"%lu\n"</span>, sz) < 1) <span class="keywordflow">return</span> <span class="keyword">false</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">for</span> (std::map<Key, Value>::const_iterator it = begin(); it != <a class="code" href="classmeow_1_1ObjDictionary.html#ae5f44ae004be8f10a1c9f5e65eeebc75">end</a>(); ++it) {</div> -<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keywordflow">if</span> (it->first .write(f, bin, fg) == <span class="keyword">false</span>) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div> -<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keywordflow">if</span> (it->second.write(f, bin, fg) == <span class="keyword">false</span>) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div> -<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  }</div> -<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div> -<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  }</div> -<div class="line"><a name="l00129"></a><span class="lineno"> 129</span> </div> -<div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#a0b1bd9fe09676aca74aec34bf5ea7137"> 130</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classmeow_1_1ObjDictionary.html#a0b1bd9fe09676aca74aec34bf5ea7137">read</a>(FILE* f, <span class="keywordtype">bool</span> bin, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> fg) {</div> -<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keywordtype">size_t</span> sz;</div> -<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keywordflow">if</span> (bin) {</div> -<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keywordflow">if</span> (fread(&sz, <span class="keyword">sizeof</span>(<span class="keywordtype">size_t</span>), 1, f) < 1) <span class="keywordflow">return</span> <span class="keyword">false</span>;</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>  <span class="keywordflow">else</span> {</div> -<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="keywordflow">if</span> (fscanf(f, <span class="stringliteral">"%lu\n"</span>, &sz) < 0) <span class="keywordflow">return</span> <span class="keyword">false</span>;</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>  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < sz; i++) {</div> -<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  Key k;</div> -<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  Value v;</div> -<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="keywordflow">if</span> (k.read(f, bin, fg) == <span class="keyword">false</span>) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div> -<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="keywordflow">if</span> (v.read(f, bin, fg) == <span class="keyword">false</span>) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div> -<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <a class="code" href="classmeow_1_1ObjDictionary.html#a9784fbd0eaab219216abdcba4f326ead">insert</a>(k, v);</div> -<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  }</div> -<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div> -<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  }</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="classmeow_1_1ObjDictionary.html#a14ce0fcedf7619c0b442588e185a7eeb"> 148</a></span>  <a class="code" href="classmeow_1_1ObjBase.html">ObjBase</a>* <a class="code" href="classmeow_1_1ObjDictionary.html#a14ce0fcedf7619c0b442588e185a7eeb">create</a>()<span class="keyword"> const </span>{</div> -<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classmeow_1_1ObjDictionary.html#a1055d36aa3d4551def2abd9aa86b7662">ObjDictionary</a>();</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> </div> -<div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#a8f2e32f6eb11904c2547fae0ff9ab3d6"> 152</a></span>  <a class="code" href="classmeow_1_1ObjBase.html">ObjBase</a>* <a class="code" href="classmeow_1_1ObjDictionary.html#a8f2e32f6eb11904c2547fae0ff9ab3d6">copyFrom</a>(<a class="code" href="classmeow_1_1ObjBase.html">ObjBase</a> <span class="keyword">const</span>* b) {</div> -<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="keywordflow">return</span> &(<a class="code" href="classmeow_1_1ObjDictionary.html#a7e50cbeeead963d95d661783ee2a9285">copyFrom</a>(*(<a class="code" href="classmeow_1_1ObjDictionary.html">ObjDictionary</a> <span class="keyword">const</span>*)b));</div> -<div class="line"><a name="l00154"></a><span class="lineno"> 154</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"><a class="line" href="classmeow_1_1ObjDictionary.html#aee3a1722f6061987a242b9b33e5fcc64"> 156</a></span>  <span class="keywordtype">char</span> <span class="keyword">const</span>* <a class="code" href="classmeow_1_1ObjDictionary.html#aee3a1722f6061987a242b9b33e5fcc64">ctype</a>()<span class="keyword"> const </span>{</div> -<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <span class="keywordflow">return</span> <span class="keyword">typeid</span>(*this).name();</div> -<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  }</div> -<div class="line"><a name="l00159"></a><span class="lineno"> 159</span> </div> -<div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="classmeow_1_1ObjDictionary.html#af5114823fcc2476aa45a965e4af66d6c"> 160</a></span>  std::string <a class="code" href="classmeow_1_1ObjDictionary.html#af5114823fcc2476aa45a965e4af66d6c">type</a>()<span class="keyword"> const </span>{</div> -<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  <span class="keywordflow">return</span> std::string(<a class="code" href="classmeow_1_1ObjDictionary.html#aee3a1722f6061987a242b9b33e5fcc64">ctype</a>());</div> -<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  }</div> -<div class="line"><a name="l00163"></a><span class="lineno"> 163</span> };</div> -<div class="line"><a name="l00164"></a><span class="lineno"> 164</span> </div> -<div class="line"><a name="l00165"></a><span class="lineno"> 165</span> }</div> -<div class="line"><a name="l00166"></a><span class="lineno"> 166</span> </div> -<div class="line"><a name="l00167"></a><span class="lineno"> 167</span> <span class="preprocessor">#endif // oo_ObjDictionary_H__</span></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_ab29251c7ae6e13058912106075ebe161"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#ab29251c7ae6e13058912106075ebe161">meow::ObjDictionary::ObjDictionary</a></div><div class="ttdeci">ObjDictionary(ObjDictionary const &d)</div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00043">ObjDictionary.h:43</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_a2724e52e9bf62b2c5b1fc999097f3d7d"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#a2724e52e9bf62b2c5b1fc999097f3d7d">meow::ObjDictionary::first</a></div><div class="ttdeci">std::map< Key, Value >::iterator first()</div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00079">ObjDictionary.h:79</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_a1055d36aa3d4551def2abd9aa86b7662"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#a1055d36aa3d4551def2abd9aa86b7662">meow::ObjDictionary::ObjDictionary</a></div><div class="ttdeci">ObjDictionary()</div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00040">ObjDictionary.h:40</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_a7e50cbeeead963d95d661783ee2a9285"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#a7e50cbeeead963d95d661783ee2a9285">meow::ObjDictionary::copyFrom</a></div><div class="ttdeci">ObjDictionary & copyFrom(ObjDictionary const &d)</div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00053">ObjDictionary.h:53</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_a0e265133214bd6b9f0dce6ce6dc6ca23"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#a0e265133214bd6b9f0dce6ce6dc6ca23">meow::ObjDictionary::size</a></div><div class="ttdeci">size_t size() const </div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00063">ObjDictionary.h:63</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_a87b0f4542b07951f207a1c9d3e327c81"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#a87b0f4542b07951f207a1c9d3e327c81">meow::ObjDictionary::operator=</a></div><div class="ttdeci">ObjDictionary & operator=(ObjDictionary const &a)</div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00107">ObjDictionary.h:107</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_a451764f966fe7a237996c1698ba461ac"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#a451764f966fe7a237996c1698ba461ac">meow::ObjDictionary::first</a></div><div class="ttdeci">std::map< Key, Value >::const_iterator first() const </div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00075">ObjDictionary.h:75</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_af5114823fcc2476aa45a965e4af66d6c"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#af5114823fcc2476aa45a965e4af66d6c">meow::ObjDictionary::type</a></div><div class="ttdeci">std::string type() const </div><div class="ttdoc">用std::string回傳這個class的type name </div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00160">ObjDictionary.h:160</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_afedaaaf1ed8b066a43d8e12081f6c878"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#afedaaaf1ed8b066a43d8e12081f6c878">meow::ObjDictionary::empty</a></div><div class="ttdeci">bool empty() const </div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00067">ObjDictionary.h:67</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_a2393452e9533fab679565068545f109c"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#a2393452e9533fab679565068545f109c">meow::ObjDictionary::write</a></div><div class="ttdeci">bool write(FILE *f, bool bin, unsigned int fg) const </div><div class="ttdoc">將物件寫入檔案, 預設implement為直接回傳 false </div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00115">ObjDictionary.h:115</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_ab0a4c64950a5a89012a913202fac027b"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#ab0a4c64950a5a89012a913202fac027b">meow::ObjDictionary::referenceFrom</a></div><div class="ttdeci">ObjDictionary & referenceFrom(ObjDictionary const &d)</div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00058">ObjDictionary.h:58</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_a8f2e32f6eb11904c2547fae0ff9ab3d6"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#a8f2e32f6eb11904c2547fae0ff9ab3d6">meow::ObjDictionary::copyFrom</a></div><div class="ttdeci">ObjBase * copyFrom(ObjBase const *b)</div><div class="ttdoc">複製, 預設使用operator= </div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00152">ObjDictionary.h:152</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_a8f73bbc1d934566dd8a2087b145e3f48"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#a8f73bbc1d934566dd8a2087b145e3f48">meow::ObjDictionary::find</a></div><div class="ttdeci">std::map< Key, Value >::iterator find(Key const &k)</div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00095">ObjDictionary.h:95</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_a081d3cf0d190e6dd02208c1c49653ed7"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#a081d3cf0d190e6dd02208c1c49653ed7">meow::ObjDictionary::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00071">ObjDictionary.h:71</a></div></div> -<div class="ttc" id="classmeow_1_1ObjBase_html"><div class="ttname"><a href="classmeow_1_1ObjBase.html">meow::ObjBase</a></div><div class="ttdoc">一切物件的Base, 並要求每個物件都要有read, write, create, ... 等功能 </div><div class="ttdef"><b>Definition:</b> <a href="ObjBase_8h_source.html#l00015">ObjBase.h:15</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_a14ce0fcedf7619c0b442588e185a7eeb"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#a14ce0fcedf7619c0b442588e185a7eeb">meow::ObjDictionary::create</a></div><div class="ttdeci">ObjBase * create() const </div><div class="ttdoc">回傳一個new出來的物件, 預設implement為直接回傳 NULL </div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00148">ObjDictionary.h:148</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_a8d793863b74457608508c34d728f0983"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#a8d793863b74457608508c34d728f0983">meow::ObjDictionary::operator[]</a></div><div class="ttdeci">Value operator[](Key const &k)</div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00111">ObjDictionary.h:111</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_ab8eb8496153b57598e81e089eef89e08"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#ab8eb8496153b57598e81e089eef89e08">meow::ObjDictionary::~ObjDictionary</a></div><div class="ttdeci">~ObjDictionary()</div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00050">ObjDictionary.h:50</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_aee3a1722f6061987a242b9b33e5fcc64"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#aee3a1722f6061987a242b9b33e5fcc64">meow::ObjDictionary::ctype</a></div><div class="ttdeci">char const * ctype() const </div><div class="ttdoc">用C-style string回傳這個class的type name </div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00156">ObjDictionary.h:156</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_a59cf39f8704134a64090ecb59fff01aa"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#a59cf39f8704134a64090ecb59fff01aa">meow::ObjDictionary::ObjDictionary</a></div><div class="ttdeci">ObjDictionary(std::map< Key, Value > const &d)</div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00047">ObjDictionary.h:47</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_a9784fbd0eaab219216abdcba4f326ead"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#a9784fbd0eaab219216abdcba4f326ead">meow::ObjDictionary::insert</a></div><div class="ttdeci">void insert(Key const &k, Value const &v)</div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00103">ObjDictionary.h:103</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_a1979f646a23bffdd01a9fe52e5a8aca1"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#a1979f646a23bffdd01a9fe52e5a8aca1">meow::ObjDictionary::find</a></div><div class="ttdeci">std::map< Key, Value >::const_iterator find(Key const &k) const </div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00091">ObjDictionary.h:91</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_ae5f44ae004be8f10a1c9f5e65eeebc75"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#ae5f44ae004be8f10a1c9f5e65eeebc75">meow::ObjDictionary::end</a></div><div class="ttdeci">std::map< Key, Value >::const_iterator end() const </div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00083">ObjDictionary.h:83</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_aeb8765e90349daee27bcf9e6c2672676"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#aeb8765e90349daee27bcf9e6c2672676">meow::ObjDictionary::end</a></div><div class="ttdeci">std::map< Key, Value >::iterator end()</div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00087">ObjDictionary.h:87</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html">meow::ObjDictionary</a></div><div class="ttdoc">純粹把 std::map 包起來, 變成繼承自 ObjBase </div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00023">ObjDictionary.h:23</a></div></div> -<div class="ttc" id="classmeow_1_1Self_html"><div class="ttname"><a href="classmeow_1_1Self.html">meow::Self< Myself ></a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_ae60f2a947516d6d6f037cc106c00d3be"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#ae60f2a947516d6d6f037cc106c00d3be">meow::ObjDictionary::exist</a></div><div class="ttdeci">bool exist(Key const &k) const </div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00099">ObjDictionary.h:99</a></div></div> -<div class="ttc" id="ObjBase_8h_html"><div class="ttname"><a href="ObjBase_8h.html">ObjBase.h</a></div></div> -<div class="ttc" id="classmeow_1_1ObjDictionary_html_a0b1bd9fe09676aca74aec34bf5ea7137"><div class="ttname"><a href="classmeow_1_1ObjDictionary.html#a0b1bd9fe09676aca74aec34bf5ea7137">meow::ObjDictionary::read</a></div><div class="ttdeci">bool read(FILE *f, bool bin, unsigned int fg)</div><div class="ttdoc">將物件從檔案讀出, 預設implement為直接回傳 false </div><div class="ttdef"><b>Definition:</b> <a href="ObjDictionary_8h_source.html#l00130">ObjDictionary.h:130</a></div></div> -</div><!-- fragment --></div><!-- contents --> -</div><!-- doc-content --> -<!-- HTML footer for doxygen 1.8.3.1--> -<!-- start footer part --> -<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> - <ul> - <li class="navelem"><a class="el" href="dir_92fecd8d02dd5e7a67429447fdf0f60f.html">meowpp</a></li><li class="navelem"><a class="el" href="dir_540a4c8f2977878a343351220ffba92b.html">oo</a></li><li class="navelem"><a class="el" href="ObjDictionary_8h.html">ObjDictionary.h</a></li> - <li class="footer">Generated on Mon Sep 8 2014 21:25:40 for Templates -- Meow by - <a href="http://www.doxygen.org/index.html"> - <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li> - </ul> -</div> -</body> -</html> |