3 <meta name="generator" content="groff -Thtml, see www.gnu.org">
4 <meta name="Content-Style" content="text/css">
5 <title>vector_push_back</title>
9 <h1 align=center>vector_push_back</h1>
10 <a href="#NAME">NAME</a><br>
11 <a href="#SYNOPSIS">SYNOPSIS</a><br>
12 <a href="#DESCRIPTION">DESCRIPTION</a><br>
13 <a href="#AUTHOR">AUTHOR</a><br>
14 <a href="#LICENSE">LICENSE</a><br>
15 <a href="#VERSION">VERSION</a><br>
18 <!-- Creator : groff version 1.17.2 -->
19 <!-- CreationDate: Fri May 3 14:59:07 2002 -->
22 <table width="100%" border=0 rules="none" frame="void"
23 cols="2" cellspacing="0" cellpadding="0">
24 <tr valign="top" align="left">
25 <td width="10%"></td><td width="90%">
26 vector_push_back, _vector_push_back, vector_pop_back, _vector_pop_back, vector_push_front, _vector_push_front, vector_pop_front, _vector_pop_front - push and pop objects into and out of vectors</td></table>
27 <a name="SYNOPSIS"></a>
30 <table width="100%" border=0 rules="none" frame="void"
31 cols="2" cellspacing="0" cellpadding="0">
32 <tr valign="top" align="left">
33 <td width="10%"></td><td width="90%">
34 <pre><b>#include <vector.h>
36 #define vector_push_back(v,obj) _vector_push_back((v),&(obj))
37 void _vector_push_back (vector, const void *ptr);
38 #define vector_pop_back(v,obj) _vector_pop_back((v),&(obj))
39 void _vector_pop_back (vector, void *ptr);
40 #define vector_push_front(v,obj) _vector_push_front((v),&(obj))
41 void _vector_push_front (vector, const void *ptr);
42 #define vector_pop_front(v,obj) _vector_pop_front((v),&(obj))
43 void _vector_pop_front (vector, void *ptr);
44 </b></pre></td></table>
45 <a name="DESCRIPTION"></a>
48 <table width="100%" border=0 rules="none" frame="void"
49 cols="2" cellspacing="0" cellpadding="0">
50 <tr valign="top" align="left">
51 <td width="10%"></td><td width="90%">
52 The <b>*_push_*</b> functions push objects onto
55 <table width="100%" border=0 rules="none" frame="void"
56 cols="2" cellspacing="0" cellpadding="0">
57 <tr valign="top" align="left">
58 <td width="10%"></td><td width="90%">
59 The <b>*_pop_*</b> functions pop objects off vectors into
60 local variables.</td></table>
62 <table width="100%" border=0 rules="none" frame="void"
63 cols="2" cellspacing="0" cellpadding="0">
64 <tr valign="top" align="left">
65 <td width="10%"></td><td width="90%">
66 The <b>*_front</b> functions push and pop objects off the
67 front of a vector. This type of operation is not very
68 efficient, because it involves moving all other elements of
69 the vector up or down by one place.</td></table>
71 <table width="100%" border=0 rules="none" frame="void"
72 cols="2" cellspacing="0" cellpadding="0">
73 <tr valign="top" align="left">
74 <td width="10%"></td><td width="90%">
75 The <b>*_back</b> functions push and pop elements off the
76 end of the vector, which is efficient.</td></table>
78 <table width="100%" border=0 rules="none" frame="void"
79 cols="2" cellspacing="0" cellpadding="0">
80 <tr valign="top" align="left">
81 <td width="10%"></td><td width="90%">
82 Each function has two forms: a macro version and an
83 underlying function.</td></table>
85 <table width="100%" border=0 rules="none" frame="void"
86 cols="2" cellspacing="0" cellpadding="0">
87 <tr valign="top" align="left">
88 <td width="10%"></td><td width="90%">
89 Array indexes are checked. You cannot pop an empty vector.
90 If <b>ptr</b> is <b>NULL</b> then the popped object is
91 discarded.</td></table>
95 <table width="100%" border=0 rules="none" frame="void"
96 cols="2" cellspacing="0" cellpadding="0">
97 <tr valign="top" align="left">
98 <td width="10%"></td><td width="90%">
99 Richard Jones <rich@annexia.org></td></table>
100 <a name="LICENSE"></a>
103 <table width="100%" border=0 rules="none" frame="void"
104 cols="2" cellspacing="0" cellpadding="0">
105 <tr valign="top" align="left">
106 <td width="10%"></td><td width="90%">
107 GNU LGPL (see http://www.gnu.org/)</td></table>
108 <a name="VERSION"></a>
111 <table width="100%" border=0 rules="none" frame="void"
112 cols="2" cellspacing="0" cellpadding="0">
113 <tr valign="top" align="left">
114 <td width="10%"></td><td width="90%">
115 c2lib-1.2.13</td></table>