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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>BZFS API Documentation: Data Types</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css"
href="http://www.bzflag.org/general.css">
<link href="http://www.bzflag.or/favicon.ico" rel="shortcut icon">
<style type="text/css">
<!--
.style1 {
font-size: 16px;
font-weight: bold;
}
.style2 {font-size: 36px}
.style5 {color: #999999}
.style6 {color: #FFFFFF}
-->
</style>
</head>
<body>
<table bgcolor="#dddddd" border="0" cellpadding="0" cellspacing="1"
width="100%">
<tbody>
<tr height="50" valign="top">
<td colspan="2">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td align="right" bgcolor="#013571"><img
src="http://www.bzflag.org/images/logo2-1.jpg" alt="logo"></td>
<td align="left" bgcolor="#818181"><img
src="http://www.bzflag.org/images/logo2-2.jpg" alt=""></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr valign="top">
<td>
<table width="100%">
<tbody>
<tr>
<td align="center" valign="top" width="14%">
<table align="center" bgcolor="#ffffff" border="1"
bordercolor="#000000" width="179">
<tbody>
<tr>
<td align="center"><span class="style6"> Contents </span></td>
</tr>
<tr>
<td align="center"> <strong>Overview</strong> </td>
</tr>
<tr>
<td align="center"> <a href="index.html">Introduction
</a> </td>
</tr>
<tr>
<td align="center"> <a href="general.html">General
Info </a> </td>
</tr>
<tr>
<td align="center"> <strong>Reference</strong> </td>
</tr>
<tr>
<td align="center"> <a href="entrys.html">Entries</a>
</td>
</tr>
<tr>
</tr>
<tr>
<td align="center"> <a href="types.html">Types</a> </td>
</tr>
<tr>
</tr>
<tr>
<td align="center"> <a href="events.html">Events</a>
</td>
</tr>
<tr>
</tr>
<tr>
<td align="center"> <a href="functions.html">Functions</a> </td>
</tr>
<tr>
</tr>
<tr>
<td align="center"> <strong>Examples</strong> </td>
</tr>
<tr>
<td align="center"> shockwaveDeath </td>
</tr>
<tr>
</tr>
<tr>
<td align="center"> scoreReset </td>
</tr>
<tr>
</tr>
</tbody>
</table>
</td>
<td width="86%">
<table align="left" bgcolor="#ffffff" border="0"
cellpadding="2" cellspacing="2" width="100%">
<tbody>
<tr>
<td valign="top">
<center><b>BZFS API Documentation</b></center>
</td>
</tr>
<tr>
<td align="left">
<p class="style1 style2" align="center">Data Types </p>
<p>Due to how windows handles memory access between
an application and dynamically loaded DLLs, there are a few custom data
types that are used in the API. These are used for common STL style
containers, for strings and lists.</p>
<p>Any text passed back from the API or events will
come in the form of a bzApiString. This is a class defined in the API
that behaves much like a std::string. The c_str() method can be used to
get the text out as a normal const char*. The class also supports many
assignment functions for setting it's contents.</p>
<p> A few API functions require lists of integers,
strings, or floats. For these functions the plugin will need to use the
bzAPIIntList, bzAPIFloatList, or bzAPIStringList classes. These classes
are similar to the std::vector. When a plugin needs to allocate one of
these lists, it must use the appropriate allocator function, to tell
the API to make a new list for the plugin to use. These functions are
bz_newIntList, bz_newFloatList, and bz_newStringList. These will return
a pointer to a new list for the plugin to use. When the plugin is
finished with the list, it needs to remove the list with a call to
bz_deleteIntList, bz_deleteFloatList, or bz_deleteStringList as
appropriate.</p>
<p>Sadly these are a little clunky but are required
to let bzfs allocate any memory it may free on windows. Hopefully
future releases of windows will remove this limitation. </p>
<p>The text based classes also include some utility functions such as replace all and tokenize </p></td>
</tr>
<tr>
<td>
<div align="left"><a href="entrys.html">Previous</a></div>
<div class="style5" align="right"><a
href="events.html">Next</a></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr valign="bottom">
<td cellpadding="2" bgcolor="#000000">
<table bgcolor="#ffffff" border="0" cellpadding="2" width="100%">
<tbody>
<tr>
<td align="right"> <span class="copyright">copyright
© <a href="http://www.bzflag.org/wiki/CurrentMaintainer">CurrentMaintainer</a>
1993-2006 </span> </td>
</tr>
<tr>
<td>
<table bgcolor="#ffffff" border="0" cellpadding="2"
width="100%">
<tbody>
<tr>
<td align="center"> <a href="http://www.opengl.org/"><img
src="http://www.bzflag.org//images/opengl.gif" alt="opengl" border="0"
height="31" width="88"></a> <a
href="http://sourceforge.net/project/?group_id=3248"><img
src="http://sourceforge.net/sflogo.php?group_id=3248&type=1"
alt="sourceforge" border="0" height="31" width="88"></a> <a
href="http://sourceforge.net/donate/index.php?group_id=3248"><img
src="http://images.sourceforge.net/images/project-support.jpg"
alt="Support This Project" border="0" height="32" width="88"> </a> <a
href="http://www.linuxgames.com/"><img
src="http://www.bzflag.org/images/linuxgames.gif" alt="linuxgames"
border="0" height="31" width="88"></a> <a
href="http://www.telefragged.com/"><img
src="http://www.bzflag.org//images/telefragged.gif" alt="telefragged"
border="0" height="31" width="88"></a> </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>
|