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 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420
|
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>openvrml::scope class Reference</title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<link rel="icon" href="../vrml-16">
<link rel="start" href="http://openvrml.org/index" title="OpenVRML Home">
<link rel="prev" href="http://openvrml.org/discussion" title="Discussion">
<link rel="contents" href="index" title="Documentation Main Page">
<link rel="index" href="functions" title="OpenVRML Compound Members">
<link rel="appendix" href="conformance" title="Conformance Test Results">
<style type="text/css">
@import url("doxygen.css");
@import url("http://openvrml.org/openvrml.css");
.body td {
background-color: transparent;
}
div.qindex {
background-color: transparent;
border: none;
}
a.qindex {
text-decoration: inherit;
color: inherit
}
a.qindex:visited {
text-decoration: inherit;
font-weight: inherit;
color: inherit
}
a.qindex:hover {
text-decoration: inherit;
background-color: transparent;
}
a.qindexHL {
text-decoration: inherit;
font-weight: inherit;
background-color: transparent;
color: inherit;
}
a.qindexHL:hover {
text-decoration: inherit;
background-color: transparent;
color: inherit;
}
a.qindexHL:visited {
text-decoration: inherit;
background-color: transparent;
color: inherit;
}
a.el {
text-decoration: inherit;
font-weight: inherit
}
a.elRef {
font-weight: inherit
}
a.code {
text-decoration: inherit;
font-weight: inherit;
color: inherit;
}
a.codeRef {
font-weight: normal;
color: inherit;
}
a:hover {
text-decoration: inherit;
background-color: inherit;
}
h1 {
line-height: 1.2em;
}
div.qindex {
font-size: smaller;
}
div.qindex .qindex:link, div.qindex .qindex:visited {
font-weight: inherit;
}
div.qindex .qindexHL:link, div.qindex .qindexHL:visited {
font-weight: bold;
}
td.memItemLeft, td.memItemRight, .mdRow td {
font-family: "Bitstream Vera Sans Mono",
"LucidaTypewriter",
"Lucida Console",
monospace;
}
td.memItemLeft, td.memItemRight, td.mdescLeft, td.mdescRight {
background-color: rgb(95%, 95%, 95%);
}
.mdRow {
background-color: rgb(95%, 95%, 95%);
}
.mdTable {
background-color: rgb(95%, 95%, 95%);
}
.mdRow td {
background-color: rgb(95%, 95%, 95%);
}
.mdRow td code {
font-family: sans-serif;
font-style: italic;
}
</style>
</head>
<body>
<table class="sitenav">
<tr>
<th><a href="http://openvrml.org/index" title="Home">Home</a></th>
<th><a href="http://openvrml.org/download" title="Download">Download</a></th>
<th><a href="http://openvrml.org/screenshots/index" title="Screen shots">Screen shots</a></th>
<th><a href="http://openvrml.org/discussion" title="Mailing lists and IRC">Discussion</a></th>
<th>Documentation</th>
</tr>
</table>
<div class="body">
<!-- Generated by Doxygen 1.3.4-20031112 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div>
<h1>openvrml::scope Class Reference</h1>The scope class keeps track of defined nodes and prototypes.
<a href="#_details">More...</a>
<p>
Collaboration diagram for openvrml::scope:<p><center><img src="classopenvrml_1_1scope__coll__graph.png" border="0" usemap="#openvrml_1_1scope__coll__map" alt="Collaboration graph"></center>
<map name="openvrml_1_1scope__coll__map">
<area href="classopenvrml_1_1scope__ptr.html" shape="rect" coords="16,108,149,126" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classopenvrml_1_1scope-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="classopenvrml_1_1scope.html#a0">scope</a> (const std::string &<a class="el" href="classopenvrml_1_1scope.html#o0">id</a>, const <a class="el" href="classopenvrml_1_1scope__ptr.html">scope_ptr</a> &<a class="el" href="classopenvrml_1_1scope.html#o1">parent</a>=<a class="el" href="classopenvrml_1_1scope__ptr.html">scope_ptr</a>())</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Construct. <a href="#a0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a1" doxytag="openvrml::scope::~scope" ></a>
virtual </td><td class="memItemRight" valign=bottom><a class="el" href="classopenvrml_1_1scope.html#a1">~scope</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy. <br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="classopenvrml_1_1scope.html#a2">add_type</a> (const <a class="el" href="classopenvrml_1_1node__type__ptr.html">node_type_ptr</a> &type) throw (std::bad_alloc)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Add a node type. <a href="#a2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a3" doxytag="openvrml::scope::find_type" ></a>
const <a class="el" href="classopenvrml_1_1node__type__ptr.html">node_type_ptr</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="classopenvrml_1_1scope.html#a3">find_type</a> (const std::string &<a class="el" href="classopenvrml_1_1scope.html#o0">id</a>) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Find a node type, given a type name. Returns 0 if type is not defined. <br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="classopenvrml_1_1node__type__ptr.html">node_type_ptr</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="classopenvrml_1_1scope.html#a4">first_type</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The first type in the scope. <a href="#a4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classopenvrml_1_1node.html">node</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="classopenvrml_1_1scope.html#a5">find_node</a> (const std::string &<a class="el" href="classopenvrml_1_1scope.html#o0">id</a>) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Find the node in the scope with <a class="el" href="classopenvrml_1_1node.html#a1">node::id</a> <code>id</code>. <a href="#a5"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="o0" doxytag="openvrml::scope::id" ></a>
const std::string </td><td class="memItemRight" valign=bottom><a class="el" href="classopenvrml_1_1scope.html#o0">id</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">scope identifier. <br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="o1" doxytag="openvrml::scope::parent" ></a>
const <a class="el" href="classopenvrml_1_1scope__ptr.html">scope_ptr</a> </td><td class="memItemRight" valign=bottom><a class="el" href="classopenvrml_1_1scope.html#o1">parent</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">The parent scope; null if the scope is a root scope. <br><br></td></tr>
<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="classopenvrml_1_1scope.html#d0">scope</a> (const <a class="el" href="classopenvrml_1_1scope.html">scope</a> &)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Not implemented. <a href="#d0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classopenvrml_1_1scope.html">scope</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="classopenvrml_1_1scope.html#d1">operator=</a> (const <a class="el" href="classopenvrml_1_1scope.html">scope</a> &)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Not implemented. <a href="#d1"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="r0" doxytag="openvrml::scope::node_type_list" ></a>
std::list< <a class="el" href="classopenvrml_1_1node__type__ptr.html">node_type_ptr</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="classopenvrml_1_1scope.html#r0">node_type_list</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">List of <a class="el" href="classopenvrml_1_1node__type.html">node_types</a> in the scope. <br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="r1" doxytag="openvrml::scope::named_node_map" ></a>
std::map< std::string, <a class="el" href="classopenvrml_1_1node.html">node</a> * > </td><td class="memItemRight" valign=bottom><a class="el" href="classopenvrml_1_1scope.html#r1">named_node_map</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Map of the named <a class="el" href="classopenvrml_1_1node.html">nodes</a> in the scope. <br><br></td></tr>
<tr><td colspan=2><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="n0" doxytag="openvrml::scope::node" ></a>
class </td><td class="memItemRight" valign=bottom><a class="el" href="classopenvrml_1_1scope.html#n0">node</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">node identifiers are stored in the scope, so node needs special privilege to access them. <br><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The scope class keeps track of defined nodes and prototypes.
<p>
PROTO definitions add node types to the namespace. PROTO implementations are a separate node type namespace, and require that any nested PROTOs NOT be available outside the PROTO implementation. PROTOs defined outside the current namespace are available.
<p>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="a0" doxytag="openvrml::scope::scope" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> openvrml::scope::scope </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const std::string & </td>
<td class="mdname" nowrap> <em>id</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const <a class="el" href="classopenvrml_1_1scope__ptr.html">scope_ptr</a> & </td>
<td class="mdname" nowrap> <em>parent</em> = <a class="el" href="classopenvrml_1_1scope__ptr.html">scope_ptr</a>()</td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [explicit]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Construct.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>id</em> </td><td>the identifier for the scope. </td></tr>
<tr><td valign=top><em>parent</em> </td><td>the parent scope.</td></tr>
</table>
</dl>
For the root scope, <code>id</code> should be the URI of the world. For child scopes, <code>id</code> should be the name of the PROTO to which the scope corresponds. </td>
</tr>
</table>
<a class="anchor" name="d0" doxytag="openvrml::scope::scope" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> openvrml::scope::scope </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="classopenvrml_1_1scope.html">scope</a> & </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [private]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Not implemented.
<p>
scopes are not copyable. </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a2" doxytag="openvrml::scope::add_type" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> bool openvrml::scope::add_type </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="classopenvrml_1_1node__type__ptr.html">node_type_ptr</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>type</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> throw (std::bad_alloc)</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Add a node type.
<p>
Print an error message if the argument type is already defined.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>type</em> </td><td>a <a class="el" href="classopenvrml_1_1node__type__ptr.html">node_type_ptr</a></td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>true</code> if <code>type</code> is successfully added to the scope; <code>false</code> otherwise (if a <a class="el" href="classopenvrml_1_1node__type.html">node_type</a> with the same id is already defined for the scope).</dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign=top><em>std::bad_alloc</em> </td><td>if memory allocation fails.</td></tr>
</table>
</dl>
<dl compact><dt><b>Precondition:</b></dt><dd><code>type</code> is not null. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="a5" doxytag="openvrml::scope::find_node" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="classopenvrml_1_1node.html">node</a> * openvrml::scope::find_node </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const std::string & </td>
<td class="mdname1" valign="top" nowrap> <em>id</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Find the node in the scope with <a class="el" href="classopenvrml_1_1node.html#a1">node::id</a> <code>id</code>.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>a pointer to a node with <a class="el" href="classopenvrml_1_1node.html#a1">node::id</a> <code>id</code>, or 0 if no such node exists in the scope. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="a4" doxytag="openvrml::scope::first_type" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> const <a class="el" href="classopenvrml_1_1node__type__ptr.html">node_type_ptr</a> & openvrml::scope::first_type </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
The first type in the scope.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>the first <a class="el" href="classopenvrml_1_1node__type.html">node_type</a> in the scope, or a null <a class="el" href="classopenvrml_1_1node__type__ptr.html">node_type_ptr</a> if the scope has no node_types. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="d1" doxytag="openvrml::scope::operator=" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="classopenvrml_1_1scope.html">scope</a> & openvrml::scope::operator= </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="classopenvrml_1_1scope.html">scope</a> & </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [private]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Not implemented.
<p>
scopes are not copyable. </td>
</tr>
</table>
</div>
<address class="footer"><a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=7151&type=3" width="125" height="37" border="0" alt="SourceForge.net Logo" align="right"></a><a href="http://sourceforge.net/tracker/?func=add&group_id=7151&atid=107151">Report error</a><br>Generated Sun Nov 16 20:22:41 2003 by Doxygen 1.3.4-20031112</address>
</body>
</html>
|