1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343
|
<HTML>
<HEAD>
<TITLE>class ObjList</TITLE>
<META NAME="Generator" CONTENT="KDOC ">
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD>
<TABLE BORDER="0">
<TR><TD valign="top" align="left" cellspacing="10">
<h1>class ObjList</h1>
</TD>
<TD valign="top" align="right" colspan="1">An object list class. <small><A HREF="#longdesc">More...</A></small></TD></TR>
</TABLE>
<HR>
<TABLE BORDER="0">
<TR><TH>Full name</TH><TD><code><A HREF="TelEngine.html">TelEngine</A>::ObjList</code></TD></TR>
<TR><TH>Definition</TH><TD><code>#include <<A HREF="yateclass_h.html">yateclass.h</A>></code></TD></TR>
<TR><TH>Inherits</TH><TD><A HREF="TelEngine__GenObject.html">TelEngine::GenObject</A> <small>[public ]</small></TD></TR>
<TR><TH>Inherited by</TH><TD><A HREF="TelEngine__JGRtpCandidates.html">JGRtpCandidates</A>, <A HREF="TelEngine__JGRtpMediaList.html">JGRtpMediaList</A></TD></TR>
<TR><TH><A HREF="full-list-TelEngine__ObjList.html">List of all Methods</A></TH></TR>
</TABLE>
</TD>
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
</TABLE></TD></TR></TABLE>
<h4>Public Methods</h4><ul><LI> <b><A HREF="#ref1">ObjList</A></b> ()
</LI>
<LI>virtual <b><A HREF="#ref2">~ObjList</A></b> ()
</LI>
<LI>virtual void* <b><A HREF="#ref3">getObject</A></b> (const String& name) const
</LI>
<LI>unsigned int <b><A HREF="#ref4">length</A></b> () const
</LI>
<LI>unsigned int <b><A HREF="#ref5">count</A></b> () const
</LI>
<LI>inline GenObject* <b><A HREF="#ref6">get</A></b> () const
</LI>
<LI>GenObject* <b><A HREF="#ref7">set</A></b> (const GenObject* obj, bool delold = true)
</LI>
<LI>inline ObjList* <b><A HREF="#ref8">next</A></b> () const
</LI>
<LI>ObjList* <b><A HREF="#ref9">last</A></b> () const
</LI>
<LI>ObjList* <b><A HREF="#ref10">skipNull</A></b> () const
</LI>
<LI>ObjList* <b><A HREF="#ref11">skipNext</A></b> () const
</LI>
<LI>GenObject* <b><A HREF="#ref12">at</A></b> (int index) const
</LI>
<LI>ObjList* <b><A HREF="#ref13">operator+</A></b> (int index) const
</LI>
<LI>inline GenObject* <b><A HREF="#ref14">operator[]</A></b> (signed int index) const
</LI>
<LI>inline GenObject* <b><A HREF="#ref15">operator[]</A></b> (unsigned int index) const
</LI>
<LI>GenObject* <b><A HREF="#ref16">operator[]</A></b> (const String& str) const
</LI>
<LI>ObjList* <b><A HREF="#ref17">find</A></b> (const GenObject* obj) const
</LI>
<LI>ObjList* <b><A HREF="#ref18">find</A></b> (const String& str) const
</LI>
<LI>int <b><A HREF="#ref19">index</A></b> (const GenObject* obj) const
</LI>
<LI>int <b><A HREF="#ref20">index</A></b> (const String& str) const
</LI>
<LI>ObjList* <b><A HREF="#ref21">insert</A></b> (const GenObject* obj, bool compact = true)
</LI>
<LI>ObjList* <b><A HREF="#ref22">append</A></b> (const GenObject* obj, bool compact = true)
</LI>
<LI>GenObject* <b><A HREF="#ref23">remove</A></b> (bool delobj = true)
</LI>
<LI>GenObject* <b><A HREF="#ref24">remove</A></b> (GenObject* obj, bool delobj = true)
</LI>
<LI>GenObject* <b><A HREF="#ref25">remove</A></b> (const String& str, bool delobj = true)
</LI>
<LI>void <b><A HREF="#ref26">clear</A></b> ()
</LI>
<LI>inline bool <b><A HREF="#ref27">autoDelete</A></b> ()
</LI>
<LI>inline void <b><A HREF="#ref28">setDelete</A></b> (bool autodelete)
</LI>
</ul><h4>Public Static Methods</h4><ul><LI>static const ObjList& <b><A HREF="#ref29">empty</A></b> ()
</LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p>
A simple single-linked object list handling class
</p>
<A NAME="ObjList"></A><A NAME="ref1"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>ObjList</strong> ()
<br></td><td align="right"><h3><strong>ObjList</strong></h3></td></tr></table><p></p><p>
Creates a new, empty list.
</p>
<A NAME="~ObjList"></A><A NAME="ref2"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>~ObjList</strong> ()
<br></td><td align="right"><h3><strong>~ObjList</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
Destroys the list and everything in it.
</p>
<A NAME="getObject"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void* <strong>getObject</strong> (const String& name)
<br></td><td align="right"><h3><strong>getObject</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p>
Get a pointer to a derived class given that class name
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>name</i></TD><TD align="left" valign="top">Name of the class we are asking for
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Pointer to the requested class or NULL if this object doesn't implement it
</p>
<p>Reimplemented from <A HREF="TelEngine__GenObject.html#getObject">GenObject</A>.</p>
<A NAME="length"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td>unsigned int <strong>length</strong> ()
<br></td><td align="right"><h3><strong>length</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Get the number of elements in the list
</p>
<p><b>Returns</b>: Count of items
</p>
<A NAME="count"></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td>unsigned int <strong>count</strong> ()
<br></td><td align="right"><h3><strong>count</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Get the number of non-null objects in the list
</p>
<p><b>Returns</b>: Count of items
</p>
<A NAME="get"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline GenObject* <strong>get</strong> ()
<br></td><td align="right"><h3><strong>get</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Get the object associated to this list item
</p>
<p><b>Returns</b>: Pointer to the object or NULL
</p>
<A NAME="set"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td>GenObject* <strong>set</strong> (const GenObject* obj, bool delold = true)
<br></td><td align="right"><h3><strong>set</strong></h3></td></tr></table><p></p><p>
Set the object associated to this list item
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>obj</i></TD><TD align="left" valign="top">Pointer to the new object to set
</TD></TR>
<TR><TD align="left" valign="top"><i>delold</i></TD><TD align="left" valign="top">True to delete the old object (default)
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Pointer to the old object if not destroyed
</p>
<A NAME="next"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline ObjList* <strong>next</strong> ()
<br></td><td align="right"><h3><strong>next</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Get the next item in the list
</p>
<p><b>Returns</b>: Pointer to the next item in list or NULL
</p>
<A NAME="last"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td>ObjList* <strong>last</strong> ()
<br></td><td align="right"><h3><strong>last</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Get the last item in the list
</p>
<p><b>Returns</b>: Pointer to the last item in list
</p>
<A NAME="skipNull"></A><A NAME="ref10"></A><table width="100%"><tr bgcolor="#eeeeee"><td>ObjList* <strong>skipNull</strong> ()
<br></td><td align="right"><h3><strong>skipNull</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Skip over NULL holding items in the list
</p>
<p><b>Returns</b>: Pointer to the first non NULL holding item in list or NULL
</p>
<A NAME="skipNext"></A><A NAME="ref11"></A><table width="100%"><tr bgcolor="#eeeeee"><td>ObjList* <strong>skipNext</strong> ()
<br></td><td align="right"><h3><strong>skipNext</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Advance in the list skipping over NULL holding items
</p>
<p><b>Returns</b>: Pointer to the next non NULL holding item in list or NULL
</p>
<A NAME="at"></A><A NAME="ref12"></A><table width="100%"><tr bgcolor="#eeeeee"><td>GenObject* <strong>at</strong> (int index)
<br></td><td align="right"><h3><strong>at</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Get the object at a specific index in list
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>index</i></TD><TD align="left" valign="top">Index of the object to retrive
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Pointer to the object or NULL
</p>
<A NAME="operator+"></A><A NAME="ref13"></A><table width="100%"><tr bgcolor="#eeeeee"><td>ObjList* <strong>operator+</strong> (int index)
<br></td><td align="right"><h3><strong>operator+</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Pointer-like indexing operator
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>index</i></TD><TD align="left" valign="top">Index of the list item to retrive
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Pointer to the list item or NULL
</p>
<A NAME="operator[]"></A><A NAME="ref14"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline GenObject* <strong>operator[]</strong> (signed int index)
<br></td><td align="right"><h3><strong>operator[]</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Array-like indexing operator with signed parameter
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>index</i></TD><TD align="left" valign="top">Index of the object to retrive
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Pointer to the object or NULL
</p>
<A NAME="operator[]"></A><A NAME="ref15"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline GenObject* <strong>operator[]</strong> (unsigned int index)
<br></td><td align="right"><h3><strong>operator[]</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Array-like indexing operator with unsigned parameter
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>index</i></TD><TD align="left" valign="top">Index of the object to retrive
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Pointer to the object or NULL
</p>
<A NAME="operator[]"></A><A NAME="ref16"></A><table width="100%"><tr bgcolor="#eeeeee"><td>GenObject* <strong>operator[]</strong> (const String& str)
<br></td><td align="right"><h3><strong>operator[]</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Array-like indexing operator
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String value of the object to locate
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Pointer to the object or NULL
</p>
<A NAME="find"></A><A NAME="ref17"></A><table width="100%"><tr bgcolor="#eeeeee"><td>ObjList* <strong>find</strong> (const GenObject* obj)
<br></td><td align="right"><h3><strong>find</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Get the item in the list that holds an object
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>obj</i></TD><TD align="left" valign="top">Pointer to the object to search for
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Pointer to the found item or NULL
</p>
<A NAME="find"></A><A NAME="ref18"></A><table width="100%"><tr bgcolor="#eeeeee"><td>ObjList* <strong>find</strong> (const String& str)
<br></td><td align="right"><h3><strong>find</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Get the item in the list that holds an object by String value
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String value (toString) of the object to search for
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Pointer to the found item or NULL
</p>
<A NAME="index"></A><A NAME="ref19"></A><table width="100%"><tr bgcolor="#eeeeee"><td>int <strong>index</strong> (const GenObject* obj)
<br></td><td align="right"><h3><strong>index</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Get the position in list of a GenObject by a pointer to it
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>obj</i></TD><TD align="left" valign="top">Pointer to the object to search for
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Index of object in list, -1 if not found
</p>
<A NAME="index"></A><A NAME="ref20"></A><table width="100%"><tr bgcolor="#eeeeee"><td>int <strong>index</strong> (const String& str)
<br></td><td align="right"><h3><strong>index</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Get the position in list of the first GenObject with a given value
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String value (toString) of the object to search for
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Index of object in list, -1 if not found
</p>
<A NAME="insert"></A><A NAME="ref21"></A><table width="100%"><tr bgcolor="#eeeeee"><td>ObjList* <strong>insert</strong> (const GenObject* obj, bool compact = true)
<br></td><td align="right"><h3><strong>insert</strong></h3></td></tr></table><p></p><p>
Insert an object at this point
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>obj</i></TD><TD align="left" valign="top">Pointer to the object to insert
</TD></TR>
<TR><TD align="left" valign="top"><i>compact</i></TD><TD align="left" valign="top">True to replace NULL values in list if possible
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: A pointer to the inserted list item
</p>
<A NAME="append"></A><A NAME="ref22"></A><table width="100%"><tr bgcolor="#eeeeee"><td>ObjList* <strong>append</strong> (const GenObject* obj, bool compact = true)
<br></td><td align="right"><h3><strong>append</strong></h3></td></tr></table><p></p><p>
Append an object to the end of the list
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>obj</i></TD><TD align="left" valign="top">Pointer to the object to append
</TD></TR>
<TR><TD align="left" valign="top"><i>compact</i></TD><TD align="left" valign="top">True to replace NULL values in list if possible
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: A pointer to the inserted list item
</p>
<A NAME="remove"></A><A NAME="ref23"></A><table width="100%"><tr bgcolor="#eeeeee"><td>GenObject* <strong>remove</strong> (bool delobj = true)
<br></td><td align="right"><h3><strong>remove</strong></h3></td></tr></table><p></p><p>
Delete this list item
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>delobj</i></TD><TD align="left" valign="top">True to delete the object (default)
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Pointer to the object if not destroyed
</p>
<A NAME="remove"></A><A NAME="ref24"></A><table width="100%"><tr bgcolor="#eeeeee"><td>GenObject* <strong>remove</strong> (GenObject* obj, bool delobj = true)
<br></td><td align="right"><h3><strong>remove</strong></h3></td></tr></table><p></p><p>
Delete the list item that holds a given object
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>obj</i></TD><TD align="left" valign="top">Object to search in the list
</TD></TR>
<TR><TD align="left" valign="top"><i>delobj</i></TD><TD align="left" valign="top">True to delete the object (default)
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Pointer to the object if not destroyed
</p>
<A NAME="remove"></A><A NAME="ref25"></A><table width="100%"><tr bgcolor="#eeeeee"><td>GenObject* <strong>remove</strong> (const String& str, bool delobj = true)
<br></td><td align="right"><h3><strong>remove</strong></h3></td></tr></table><p></p><p>
Delete the first list item that holds an object with a iven value
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>str</i></TD><TD align="left" valign="top">String value (toString) of the object to remove
</TD></TR>
<TR><TD align="left" valign="top"><i>delobj</i></TD><TD align="left" valign="top">True to delete the object (default)
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Pointer to the object if not destroyed
</p>
<A NAME="clear"></A><A NAME="ref26"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>clear</strong> ()
<br></td><td align="right"><h3><strong>clear</strong></h3></td></tr></table><p></p><p>
Clear the list and optionally delete all contained objects
</p>
<A NAME="autoDelete"></A><A NAME="ref27"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline bool <strong>autoDelete</strong> ()
<br></td><td align="right"><h3><strong>autoDelete</strong></h3></td></tr></table><p></p><p>
Get the automatic delete flag
</p>
<p><b>Returns</b>: True if will delete on destruct, false otherwise
</p>
<A NAME="setDelete"></A><A NAME="ref28"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline void <strong>setDelete</strong> (bool autodelete)
<br></td><td align="right"><h3><strong>setDelete</strong></h3></td></tr></table><p></p><p>
Set the automatic delete flag
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>autodelete</i></TD><TD align="left" valign="top">True to delete on destruct, false otherwise
</TD></TR>
</TABLE></P>
<A NAME="empty"></A><A NAME="ref29"></A><table width="100%"><tr bgcolor="#eeeeee"><td> const ObjList& <strong>empty</strong> ()
<br></td><td align="right"><h3><strong>empty</strong></h3></td></tr></table><p> <small>[static]</small></p><p>
A static empty object list
</p>
<p><b>Returns</b>: Reference to a static empty list
</p>
<HR>
<table>
<tr><td><small>Generated by: paulc on bussard on Mon Mar 8 12:18:15 2010, using kdoc 2.0a54.</small></td></tr>
</table>
</BODY>
</HTML>
|