-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnode13.html
More file actions
114 lines (107 loc) · 3.48 KB
/
Copy pathnode13.html
File metadata and controls
114 lines (107 loc) · 3.48 KB
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 98.1p1 release (March 2nd, 1998)
originally by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Ptrlist</TITLE>
<META NAME="description" CONTENT="Ptrlist">
<META NAME="keywords" CONTENT="graphcode">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<LINK REL="STYLESHEET" HREF="graphcode.css">
<LINK REL="next" HREF="node14.html">
<LINK REL="previous" HREF="node12.html">
<LINK REL="up" HREF="graphcode.html">
<LINK REL="next" HREF="node14.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html167"
HREF="node14.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="/usr/local/lib/latex2html/icons.gif/next_motif.gif"></A>
<A NAME="tex2html164"
HREF="graphcode.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="/usr/local/lib/latex2html/icons.gif/up_motif.gif"></A>
<A NAME="tex2html158"
HREF="node12.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="/usr/local/lib/latex2html/icons.gif/previous_motif.gif"></A>
<A NAME="tex2html166"
HREF="node19.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
SRC="/usr/local/lib/latex2html/icons.gif/index_motif.gif"></A>
<BR>
<B> Next:</B> <A NAME="tex2html168"
HREF="node14.html">omap</A>
<B> Up:</B> <A NAME="tex2html165"
HREF="graphcode.html">Graphcode Documentation</A>
<B> Previous:</B> <A NAME="tex2html159"
HREF="node12.html">objref</A>
<BR>
<BR>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION00050000000000000000"> </A><A NAME="117"> </A><A NAME="Ptrlist"> </A>
<BR>
Ptrlist
</H1>
<P>
Ptrlists work a bit like <code>std::vector<objref></code> -- objrefs can be
added with <code>Ptrlist::push_back()</code>, indexed with standard array
indexing <code>Ptrlist::operator[]</code>, and iterated over in the usual
way with <code>Ptrlist::iterator</code>. However, unlike
<code>std::vector<objref></code>, only pointers to the objref is stored
within <code>Ptrlist</code>, not copies.
<P>
Synopsis:
<P>
<PRE>
class Ptrlist
{
public:
class iterator
{
public:
objref& operator*();
objref* operator->();
iterator operator++();
iterator operator--();
iterator operator++(int);
iterator operator--(int);
bool operator==(const iterator& x);
bool operator!=(const iterator& x);
};
iterator begin() const;
iterator end() const;
objref & front ()
objref & back ()
unsigned size() const;
objref& operator[](unsigned i) const;
void push_back(objref* x);
void push_back(objref& x);
void erase(GraphID_t i);
void clear();
Ptrlist& operator=(const Ptrlist &x);
};
</PRE>
<P>
Ptrlists can only refer to objects stored in objectMap.
Ptrlists can be serialised -- Ptrlists must be unpacked within the
context of an omapthe objectMap.
<P>
If you need to use a backing map, you can declare another omap object
and assign objectMap to it. This will create copies of all the objects
contained within objectMap.
<P>
<BR><HR>
<ADDRESS>
<I>Russell Standish</I>
<BR><I>2007-03-13</I>
</ADDRESS>
</BODY>
</HTML>