Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3584 | sourcerer | 1 | LibWapcaplet - a string internment library |
2 | ========================================== |
||
3 | |||
4 | Overview |
||
5 | -------- |
||
6 | |||
7 | LibWapcaplet provides a reference counted string internment system |
||
8 | designed to store small strings and allow rapid comparison of them in |
||
9 | terms of equality. It supports a caseless comparison where it will |
||
10 | automatically intern a lowercased variant of the string and use that |
||
11 | for comparison if needed. |
||
12 | |||
13 | Rationale |
||
14 | --------- |
||
15 | |||
16 | Prior to LibWapcaplet, LibParserUtils contained a dictionary and hash |
||
17 | implementation along with a red-black tree implementation |
||
18 | internally. These three things were then used by client applications |
||
19 | and libraries such as LibCSS. However, the code was deemed to be |
||
20 | inefficient and the features in the wrong library. The behaviour |
||
21 | required of the client libraries was therefore split out so that |
||
22 | internment would still be able to be shared between different client |
||
23 | libraries in the same application. (E.g. LibCSS and Hubbub) |
||
24 | |||
25 | For those interested, The name 'Wapcaplet' is from the Monty Python |
||
26 | sketch in which Mr Simpson (who is not French) attempts to sell |
||
27 | 122,000 miles of string which was unfortunately cut up into 3 inch |
||
28 | lengths, and Adrian Wapcaplet comes up with the idea of "Simpson's |
||
29 | individual emperor stringettes - Just the right length!" |
||
30 | |||
31 | Requirements |
||
32 | ------------ |
||
33 | |||
34 | To compile LibWapcaplet you need: |
||
35 | |||
36 | * GNU Make 3.81 or better |
||
37 | * A version of GCC capable of -MMD -MF (unless you change the build |
||
38 | system) |
||
39 | |||
40 | To compile the test suite you need: |
||
41 | |||
42 | * Check v0.9.5 or better. |
||
43 | |||
44 | Compilation |
||
45 | ----------- |
||
46 | |||
47 | To build LibWapcaplet in release mode, type 'make'. To build it in |
||
48 | debug mode type 'make BUILD=debug'. To install, run 'make |
||
49 | install'. If you wish to install LibWapcaplet into somewhere other |
||
50 | than /usr/local/ then add PREFIX=/path/to/place to the installation |
||
51 | make command. |
||
52 | |||
53 | Verification |
||
54 | ------------ |
||
55 | |||
56 | To build and run the tests, run 'make test'. |
||
57 | |||
58 | In release mode, fewer tests will be run as the assert() calls will be |
||
59 | elided. |
||
60 | |||
61 | API documentation |
||
62 | ----------------- |
||
63 | |||
64 | For API documentation see include/libwapcaplet/libwapcaplet.h |
||
65 |