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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Ipelib: IpeRepository Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.1 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li id="current"><a href="annotated.html"><span>Classes</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul></div>
<h1>IpeRepository Class Reference<br>
<small>
[<a class="el" href="group__attr.html">Ipe Attributes</a>]</small>
</h1><!-- doxytag: class="IpeRepository" -->Repository of attribute values.
<a href="#_details">More...</a>
<p>
<a href="class_ipe_repository-members.html">List of all members.</a><h2>Public Member Functions</h2>
<ul>
<li><a class="el" href="class_ipe_repository.html#157a7b5510ad73a6077e6cfdd1d9b31d">IpeRepository</a> ()
<li><a class="el" href="class_ipe_string.html">IpeString</a> <a class="el" href="class_ipe_repository.html#f006856b9a276ab3f9653ca0ea50bf78">ToString</a> (<a class="el" href="class_ipe_attribute.html">IpeAttribute</a> index) const
<li><a class="el" href="class_ipe_color.html">IpeColor</a> <a class="el" href="class_ipe_repository.html#8f2d076511d24618ebe92fd471c4ae76">ToColor</a> (<a class="el" href="class_ipe_attribute.html">IpeAttribute</a> index) const
<li><a class="el" href="class_ipe_fixed.html">IpeFixed</a> <a class="el" href="class_ipe_repository.html#3b90ea082521e3283a7f205adcabcc00">ToScalar</a> (<a class="el" href="class_ipe_attribute.html">IpeAttribute</a> index) const
<li><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_repository.html#ce8c72d9f92ab7ab22c24e17f32fdf9b">ToAttribute</a> (const <a class="el" href="class_ipe_color.html">IpeColor</a> &color)
<li><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_repository.html#7ff9de18d439ec06a26b52dc5677cdaf">ToAttribute</a> (<a class="el" href="class_ipe_attribute.html#47c97ef33d42815601f407fe1d9a4764">IpeKind</a> kind, <a class="el" href="class_ipe_fixed.html">IpeFixed</a> value)
<li><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_repository.html#0024e0f74c01f7fa8135b39e58a2ae21">MakeColor</a> (<a class="el" href="class_ipe_string.html">IpeString</a> str)
<li><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_repository.html#f9efec046ab56daa0d558eb4b7c84012">MakeString</a> (<a class="el" href="class_ipe_attribute.html#47c97ef33d42815601f407fe1d9a4764">IpeKind</a> kind, <a class="el" href="class_ipe_string.html">IpeString</a> str)
<li><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_repository.html#a077d84443e9eed3fdc5c85e16feecf2">MakeDashStyle</a> (<a class="el" href="class_ipe_string.html">IpeString</a> str)
<li><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_repository.html#cd458f49a827ec9a658bc1b09ebcf741">MakeTextSize</a> (<a class="el" href="class_ipe_string.html">IpeString</a> str)
<li><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_repository.html#244c173523ed0a9dc8aeb23f569843aa">MakeScalar</a> (<a class="el" href="class_ipe_attribute.html#47c97ef33d42815601f407fe1d9a4764">IpeKind</a> kind, <a class="el" href="class_ipe_string.html">IpeString</a> str)
<li><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_repository.html#24885fc1bcde110721fe61c8634ecad8">MakeSymbol</a> (<a class="el" href="class_ipe_attribute.html#47c97ef33d42815601f407fe1d9a4764">IpeKind</a> kind, <a class="el" href="class_ipe_string.html">IpeString</a> str)
<li><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_repository.html#51f00b882ebd45dc3a3695381eaa413a">GetSymbol</a> (<a class="el" href="class_ipe_attribute.html#47c97ef33d42815601f407fe1d9a4764">IpeKind</a> kind, <a class="el" href="class_ipe_string.html">IpeString</a> str) const
<li><a class="el" href="class_ipe_string.html">IpeString</a> <a class="el" href="class_ipe_repository.html#1460fa7f1af4def74edc43898b2e8a66">String</a> (<a class="el" href="class_ipe_attribute.html">IpeAttribute</a> attr) const
</ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Repository of attribute values.
<p>
Ipe documents can use symbolic attributes, such as 'normal', 'fat', or 'thin' for line thickness, or 'red', 'navy', 'turquoise' for color, as well as absolute attributes such as (0.5,0.5,0.5) for medium gray. To avoid storing these very common values hundreds of times, <a class="el" href="class_ipe_repository.html">IpeRepository</a> keeps a repository of all the non-scalar attribute values in the document. Inside IpeObject's attributes are represented as integer indices into the repository.<p>
There are currently the following symbolic attributes with values stored in the repository.<ul>
<li>Color</li><li>Line style (dash pattern)</li><li>Font size</li><li>Text style (Latex style)</li></ul>
<p>
The following attributes can be symbolic, but if they are absolute then the scalar value is stored inside the <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> (not in the repository).<ul>
<li>Mark size</li><li>Arrow size</li><li>Grid size</li><li>Angle size (for angular snap)</li><li>Line width</li></ul>
<p>
Finally, line join, line cap, and the fill rule cannot be symbolic. They can be null, or have an absolute value stored inside the attribute.
<p>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="157a7b5510ad73a6077e6cfdd1d9b31d"></a><!-- doxytag: member="IpeRepository::IpeRepository" ref="157a7b5510ad73a6077e6cfdd1d9b31d" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">IpeRepository::IpeRepository </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Constructor.
<p>
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="f006856b9a276ab3f9653ca0ea50bf78"></a><!-- doxytag: member="IpeRepository::ToString" ref="f006856b9a276ab3f9653ca0ea50bf78" args="(IpeAttribute index) const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_ipe_string.html">IpeString</a> IpeRepository::ToString </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> </td>
<td class="paramname"> <em>attr</em> </td>
<td> ) </td>
<td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Return string with given index.
<p>
Both symbolic and absolute values are possible.
</div>
</div><p>
<a class="anchor" name="8f2d076511d24618ebe92fd471c4ae76"></a><!-- doxytag: member="IpeRepository::ToColor" ref="8f2d076511d24618ebe92fd471c4ae76" args="(IpeAttribute index) const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_ipe_color.html">IpeColor</a> IpeRepository::ToColor </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> </td>
<td class="paramname"> <em>index</em> </td>
<td> ) </td>
<td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Return color with given index.
<p>
</div>
</div><p>
<a class="anchor" name="3b90ea082521e3283a7f205adcabcc00"></a><!-- doxytag: member="IpeRepository::ToScalar" ref="3b90ea082521e3283a7f205adcabcc00" args="(IpeAttribute index) const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_ipe_fixed.html">IpeFixed</a> IpeRepository::ToScalar </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> </td>
<td class="paramname"> <em>index</em> </td>
<td> ) </td>
<td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Return value with given index.
<p>
</div>
</div><p>
<a class="anchor" name="ce8c72d9f92ab7ab22c24e17f32fdf9b"></a><!-- doxytag: member="IpeRepository::ToAttribute" ref="ce8c72d9f92ab7ab22c24e17f32fdf9b" args="(const IpeColor &color)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpeRepository::ToAttribute </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_ipe_color.html">IpeColor</a> & </td>
<td class="paramname"> <em>color</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Lookup a color (add it if it doesn't exist yet), and return index.
<p>
</div>
</div><p>
<a class="anchor" name="7ff9de18d439ec06a26b52dc5677cdaf"></a><!-- doxytag: member="IpeRepository::ToAttribute" ref="7ff9de18d439ec06a26b52dc5677cdaf" args="(IpeKind kind, IpeFixed value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpeRepository::ToAttribute </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_ipe_attribute.html#47c97ef33d42815601f407fe1d9a4764">IpeKind</a> </td>
<td class="paramname"> <em>kind</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_ipe_fixed.html">IpeFixed</a> </td>
<td class="paramname"> <em>value</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Lookup <em>value</em> (add it if it doesn't exist yet), and return index.
<p>
</div>
</div><p>
<a class="anchor" name="0024e0f74c01f7fa8135b39e58a2ae21"></a><!-- doxytag: member="IpeRepository::MakeColor" ref="0024e0f74c01f7fa8135b39e58a2ae21" args="(IpeString str)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpeRepository::MakeColor </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_ipe_string.html">IpeString</a> </td>
<td class="paramname"> <em>str</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Create an <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> representing the color described.
<p>
Empty string creates null color, string starting with a letter creates a symbolic color (includes special case "void"), otherwise absolute color.
</div>
</div><p>
<a class="anchor" name="f9efec046ab56daa0d558eb4b7c84012"></a><!-- doxytag: member="IpeRepository::MakeString" ref="f9efec046ab56daa0d558eb4b7c84012" args="(IpeKind kind, IpeString str)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpeRepository::MakeString </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_ipe_attribute.html#47c97ef33d42815601f407fe1d9a4764">IpeKind</a> </td>
<td class="paramname"> <em>kind</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_ipe_string.html">IpeString</a> </td>
<td class="paramname"> <em>str</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Construct absolute value (which is a string).
<p>
</div>
</div><p>
<a class="anchor" name="a077d84443e9eed3fdc5c85e16feecf2"></a><!-- doxytag: member="IpeRepository::MakeDashStyle" ref="a077d84443e9eed3fdc5c85e16feecf2" args="(IpeString str)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpeRepository::MakeDashStyle </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_ipe_string.html">IpeString</a> </td>
<td class="paramname"> <em>str</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Construct dash style attribute from string.
<p>
Empty string creates null value, string starting with '[' creates an absolute dash style, otherwise symbolic dash style (including the special case "solid").
</div>
</div><p>
<a class="anchor" name="cd458f49a827ec9a658bc1b09ebcf741"></a><!-- doxytag: member="IpeRepository::MakeTextSize" ref="cd458f49a827ec9a658bc1b09ebcf741" args="(IpeString str)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpeRepository::MakeTextSize </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_ipe_string.html">IpeString</a> </td>
<td class="paramname"> <em>str</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Construct text size attribute from string.
<p>
Empty string creates null value, string starting with digit creates an numeric absolute value, string starting with letter creates symbolic text size, anything else creates absolute (string) text size.
</div>
</div><p>
<a class="anchor" name="244c173523ed0a9dc8aeb23f569843aa"></a><!-- doxytag: member="IpeRepository::MakeScalar" ref="244c173523ed0a9dc8aeb23f569843aa" args="(IpeKind kind, IpeString str)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpeRepository::MakeScalar </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_ipe_attribute.html#47c97ef33d42815601f407fe1d9a4764">IpeKind</a> </td>
<td class="paramname"> <em>kind</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_ipe_string.html">IpeString</a> </td>
<td class="paramname"> <em>str</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Construct scalar attribute from string.
<p>
Empty string creates null value, string starting with non-letter creates an absolute value, string starting with letter creates symbolic value.
</div>
</div><p>
<a class="anchor" name="24885fc1bcde110721fe61c8634ecad8"></a><!-- doxytag: member="IpeRepository::MakeSymbol" ref="24885fc1bcde110721fe61c8634ecad8" args="(IpeKind kind, IpeString str)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpeRepository::MakeSymbol </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_ipe_attribute.html#47c97ef33d42815601f407fe1d9a4764">IpeKind</a> </td>
<td class="paramname"> <em>kind</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_ipe_string.html">IpeString</a> </td>
<td class="paramname"> <em>str</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Construct symbolic attribute from string.
<p>
Empty string creates null value, anything else creates symbolic value.
</div>
</div><p>
<a class="anchor" name="51f00b882ebd45dc3a3695381eaa413a"></a><!-- doxytag: member="IpeRepository::GetSymbol" ref="51f00b882ebd45dc3a3695381eaa413a" args="(IpeKind kind, IpeString str) const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpeRepository::GetSymbol </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_ipe_attribute.html#47c97ef33d42815601f407fe1d9a4764">IpeKind</a> </td>
<td class="paramname"> <em>kind</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_ipe_string.html">IpeString</a> </td>
<td class="paramname"> <em>str</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Construct symbolic attribute from string.
<p>
Like MakeSymbol, but will not create new repository entry.
</div>
</div><p>
<a class="anchor" name="1460fa7f1af4def74edc43898b2e8a66"></a><!-- doxytag: member="IpeRepository::String" ref="1460fa7f1af4def74edc43898b2e8a66" args="(IpeAttribute attr) const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_ipe_string.html">IpeString</a> IpeRepository::String </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> </td>
<td class="paramname"> <em>attr</em> </td>
<td> ) </td>
<td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Return string representation of attribute (symbolic or absolute).
<p>
</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li>ipecolor.h<li>ipecolor.cpp</ul>
<hr>
</body></html>
|