17:39
[skypekit:skypekit.git] / skypekit_2.0.0.190_29281_CB30 / interfaces / skype / cpp_embedded / documentation / html / skype-obj-dict_8h_source.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <title>SkypeKit C++ Wrapper: Main Page</title>
6 <link href="tabs.css" rel="stylesheet" type="text/css"/>
7 <link href="islander.css" rel="stylesheet" type="text/css"/>
8 </head>
9 <body>
10 <img src="..\skypekit.png" align="right">
11 <!-- Generated by Doxygen 1.6.2 -->
12 <script type="text/javascript">
13 <!--
14 function changeDisplayState (e){
15   var num=this.id.replace(/[^[0-9]/g,'');
16   var button=this.firstChild;
17   var sectionDiv=document.getElementById('dynsection'+num);
18   if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
19     sectionDiv.style.display='block';
20     button.src='open.gif';
21   }else{
22     sectionDiv.style.display='none';
23     button.src='closed.gif';
24   }
25 }
26 function initDynSections(){
27   var divs=document.getElementsByTagName('div');
28   var sectionCounter=1;
29   for(var i=0;i<divs.length-1;i++){
30     if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
31       var header=divs[i];
32       var section=divs[i+1];
33       var button=header.firstChild;
34       if (button!='IMG'){
35         divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
36         button=document.createElement('img');
37         divs[i].insertBefore(button,divs[i].firstChild);
38       }
39       header.style.cursor='pointer';
40       header.onclick=changeDisplayState;
41       header.id='dynheader'+sectionCounter;
42       button.src='closed.gif';
43       section.id='dynsection'+sectionCounter;
44       section.style.display='none';
45       section.style.marginLeft='14px';
46       sectionCounter++;
47     }
48   }
49 }
50 window.onload = initDynSections;
51 -->
52 </script>
53 <div class="navigation" id="top">
54   <div class="tabs">
55     <ul>
56       <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
57       <li><a href="annotated.html"><span>Classes</span></a></li>
58       <li class="current"><a href="files.html"><span>Files</span></a></li>
59       <li><a href="examples.html"><span>Examples</span></a></li>
60     </ul>
61   </div>
62   <div class="tabs">
63     <ul>
64       <li><a href="files.html"><span>File&nbsp;List</span></a></li>
65       <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
66     </ul>
67   </div>
68 <h1>skype-obj-dict.h</h1><a href="skype-obj-dict_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
69 <a name="l00002"></a>00002 <span class="preprocessor">#ifndef __SKYPE_OBJ_DICT_H</span>
70 <a name="l00003"></a>00003 <span class="preprocessor"></span><span class="preprocessor">#define __SKYPE_OBJ_DICT_H</span>
71 <a name="l00004"></a>00004 <span class="preprocessor"></span>
72 <a name="l00005"></a>00005 <span class="preprocessor">#include &lt;stddef.h&gt;</span>
73 <a name="l00006"></a>00006 
74 <a name="l00007"></a>00007 <span class="keyword">class </span><a class="code" href="class_s_e_object.html" title="SEObject is a base class for all API modules.">SEObject</a>;
75 <a name="l00008"></a>00008 <span class="comment"></span>
76 <a name="l00009"></a>00009 <span class="comment">/** \class SEObjDict skype-obj-dict.h &quot;skype-obj-dict.h&quot;</span>
77 <a name="l00010"></a>00010 <span class="comment"> *  \brief SEObjDict is a dictionary class of SEObject pointers associated to integers.</span>
78 <a name="l00011"></a>00011 <span class="comment"> */</span>
79 <a name="l00012"></a><a class="code" href="class_s_e_obj_dict.html">00012</a> <span class="keyword">class </span><a class="code" href="class_s_e_obj_dict.html" title="SEObjDict is a dictionary class of SEObject pointers associated to integers.">SEObjDict</a>
80 <a name="l00013"></a>00013 {
81 <a name="l00014"></a>00014 <span class="keyword">public</span>:<span class="comment"></span>
82 <a name="l00015"></a>00015 <span class="comment">        /** Creates an empty dictionary of pointers. */</span>
83 <a name="l00016"></a>00016         <a class="code" href="class_s_e_obj_dict.html#a176afb1ecfac3c08931c3577aed023ea">SEObjDict</a>();<span class="comment"></span>
84 <a name="l00017"></a>00017 <span class="comment">        /** Constructs an implicitly shared copy of dict. */</span>
85 <a name="l00018"></a>00018         <a class="code" href="class_s_e_obj_dict.html#a176afb1ecfac3c08931c3577aed023ea">SEObjDict</a>(<span class="keyword">const</span> <a class="code" href="class_s_e_obj_dict.html" title="SEObjDict is a dictionary class of SEObject pointers associated to integers.">SEObjDict</a>&amp; dict);<span class="comment"></span>
86 <a name="l00019"></a>00019 <span class="comment">        /** Destroys the dictionary and frees the data if this is the last reference to it. */</span>
87 <a name="l00020"></a>00020         <a class="code" href="class_s_e_obj_dict.html#aeb8352622855acf4f96214fb3ae930a6">~SEObjDict</a>();
88 <a name="l00021"></a>00021 <span class="comment"></span>
89 <a name="l00022"></a>00022 <span class="comment">        /** \cond INTERNAL */</span>
90 <a name="l00023"></a>00023 <span class="keyword">protected</span>:
91 <a name="l00024"></a>00024         <span class="keyword">class </span>Element;
92 <a name="l00025"></a>00025         <span class="keyword">class </span>Data;
93 <a name="l00026"></a>00026         Data* d;<span class="comment"></span>
94 <a name="l00027"></a>00027 <span class="comment">        /** \endcond */</span>
95 <a name="l00028"></a>00028 
96 <a name="l00029"></a>00029 <span class="keyword">public</span>:<span class="comment"></span>
97 <a name="l00030"></a>00030 <span class="comment">        /** Inserts the key with the value into the dictionary.</span>
98 <a name="l00031"></a>00031 <span class="comment">         * Multiple items can have the same key, they are not overwritten.</span>
99 <a name="l00032"></a>00032 <span class="comment">         * You can access them with the offset parameter of the find() function.</span>
100 <a name="l00033"></a>00033 <span class="comment">         * If key is null, nothing is inserted.</span>
101 <a name="l00034"></a>00034 <span class="comment">         */</span>
102 <a name="l00035"></a>00035         <span class="keywordtype">void</span> <a class="code" href="class_s_e_obj_dict.html#ae50095f56a922b205c9e1e5a1183a164">insert</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> key, <span class="keyword">const</span> <a class="code" href="class_s_e_object.html" title="SEObject is a base class for all API modules.">SEObject</a>* value);<span class="comment"></span>
103 <a name="l00036"></a>00036 <span class="comment">        /** Finds the specified key in the dictionary.</span>
104 <a name="l00037"></a>00037 <span class="comment">         * \param key       Key to search.</span>
105 <a name="l00038"></a>00038 <span class="comment">         * \param offset    When the dictionary contains several entries with the same key,</span>
106 <a name="l00039"></a>00039 <span class="comment">         *                  use the offset param to indicate which key you want.</span>
107 <a name="l00040"></a>00040 <span class="comment">         * \return null if the key is not found.</span>
108 <a name="l00041"></a>00041 <span class="comment">         */</span>
109 <a name="l00042"></a>00042         <span class="keyword">const</span> <a class="code" href="class_s_e_object.html" title="SEObject is a base class for all API modules.">SEObject</a>*&amp; <a class="code" href="class_s_e_obj_dict.html#accc273e93af5387886c4178fe7adfad8">find</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> key, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> offset = 0) <span class="keyword">const</span>;<span class="comment"></span>
110 <a name="l00043"></a>00043 <span class="comment">        /** Assigns a shallow copy of dict to this dictionary and returns a reference to it.</span>
111 <a name="l00044"></a>00044 <span class="comment">         * This is very fast because the dictionary isn&#39;t actually copied.</span>
112 <a name="l00045"></a>00045 <span class="comment">         */</span>
113 <a name="l00046"></a>00046         <a class="code" href="class_s_e_obj_dict.html" title="SEObjDict is a dictionary class of SEObject pointers associated to integers.">SEObjDict</a>&amp; <a class="code" href="class_s_e_obj_dict.html#a66d19eb03538501c7c21a78d647de39a">operator=</a>(<span class="keyword">const</span> <a class="code" href="class_s_e_obj_dict.html" title="SEObjDict is a dictionary class of SEObject pointers associated to integers.">SEObjDict</a>&amp; dict);
114 <a name="l00047"></a>00047 <span class="comment"></span>
115 <a name="l00048"></a>00048 <span class="comment">        /** Returns how many elements are in the dictionary. */</span>
116 <a name="l00049"></a>00049         <span class="keywordtype">size_t</span> <a class="code" href="class_s_e_obj_dict.html#ae68f72f9b339eeb92ddf4b94d9f82081">size</a>() <span class="keyword">const</span>;
117 <a name="l00050"></a>00050 <span class="comment"></span>
118 <a name="l00051"></a>00051 <span class="comment">        /** Use this function to iterate through the dictionary.</span>
119 <a name="l00052"></a>00052 <span class="comment">         * It doesn&#39;t make sense to use this functions outside of an iteration (i.e. a loop).</span>
120 <a name="l00053"></a>00053 <span class="comment">         * See also keyAt()</span>
121 <a name="l00054"></a>00054 <span class="comment">         */</span>
122 <a name="l00055"></a>00055         <span class="keyword">const</span> <a class="code" href="class_s_e_object.html" title="SEObject is a base class for all API modules.">SEObject</a>*&amp; <a class="code" href="class_s_e_obj_dict.html#ad2d1fb5955fd51add5a3f60342ee7b7e">operator[]</a>(<span class="keywordtype">size_t</span> i) <span class="keyword">const</span>;<span class="comment"></span>
123 <a name="l00056"></a>00056 <span class="comment">        /** Use this function to iterate through the dictionary.</span>
124 <a name="l00057"></a>00057 <span class="comment">         * It doesn&#39;t make sense to use this functions outside of an iteration (i.e. a loop).</span>
125 <a name="l00058"></a>00058 <span class="comment">         * See also operator[]()</span>
126 <a name="l00059"></a>00059 <span class="comment">         */</span>
127 <a name="l00060"></a>00060         <span class="keywordtype">int</span> <a class="code" href="class_s_e_obj_dict.html#abb900c616942c44ff357b0d2b8a38c56">keyAt</a>(<span class="keywordtype">size_t</span> i) <span class="keyword">const</span>;
128 <a name="l00061"></a>00061 
129 <a name="l00062"></a>00062         <span class="keywordtype">bool</span> <span class="keyword">remove</span>(<span class="keyword">const</span> <span class="keywordtype">int</span> key);
130 <a name="l00063"></a>00063 <span class="comment"></span>
131 <a name="l00064"></a>00064 <span class="comment">        /** \cond INTERNAL */</span>
132 <a name="l00065"></a>00065 
133 <a name="l00066"></a>00066 <span class="keyword">protected</span>:
134 <a name="l00067"></a>00067         <span class="keywordtype">void</span> d_ref();
135 <a name="l00068"></a>00068         <span class="keywordtype">void</span> d_unref();
136 <a name="l00069"></a>00069         <span class="keywordtype">void</span> detach();<span class="comment"></span>
137 <a name="l00070"></a>00070 <span class="comment">        /** \endcond */</span>
138 <a name="l00071"></a>00071 };
139 <a name="l00072"></a>00072 
140 <a name="l00073"></a>00073 <span class="preprocessor">#endif // __SKYPE_OBJ_DICT_H</span>
141 </pre></div></div>
142
143 <hr/>   
144                 <p><b>(c) Skype Technologies S.A. Confidential/Proprietary</b></p>              
145                 <p>Last updated: 18 Jun 2010</p>                
146                 </BODY>
147 </HTML>