Formatting.
[metaproxy-moved-to-github.git] / doc / classes
1 $Id: classes,v 1.2 2006-01-16 14:33:41 mike Exp $
2
3
4 A Hitch-Hiker's Guide to the YP2 Classes
5 ========================================
6
7 Introductory Notes
8 ------------------
9
10 In general, classes seem to be named big-endianly, so that
11 "FactoryFilter" is not a filter for factories, but a factory that
12 produces filters, and "FactoryStatic" is a factory for the statically
13 registered filters (as opposed to those that are dynamically loaded).
14
15
16 Classes
17 =======
18
19 FactoryFilter
20 -------------
21
22 A factory class that exists primarily to provide the create() method,
23 which takes the name of a filter class as its argument and returns a
24 new filter of that type.  To enable this, the factory must first be
25 populated by calling add_creator() for static filters (this is done by
26 the FactoryStatic class, see below) and add_creator_dyn() for filters
27 loaded dynamically.
28
29 FactoryStatic
30 -------------
31
32 A subclass of FactoryFilter which is responsible for registering all
33 the statically defined filter types.  It does this by knowing about
34 all those filters' structures, which are listed in its constructor.
35 Merely instantiating this class registers all the static classes.  It
36 is for the benefit of this class that struct yp2_filter_struct exists,
37 and that all the filter classes provide a static object of that type.
38
39
40
41 ### Much more to add!
42