]>
Commit | Line | Data |
---|---|---|
1 | <?xml version="1.0" encoding="UTF-8"?> | |
2 | <!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" | |
3 | "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> | |
4 | ||
5 | <section id="bbv2.reference.class.property-set"> | |
6 | ||
7 | <title>Class property-set</title> | |
8 | <indexterm> | |
9 | <primary>property-set</primary> | |
10 | </indexterm> | |
11 | ||
12 | <para>Class for storing a set of properties.</para> | |
13 | ||
14 | <programlisting language="jam"> | |
15 | class property-set { | |
16 | rule <link linkend="bbv2.reference.class.property-set.raw">raw</link> ( ) | |
17 | rule <link linkend="bbv2.reference.class.property-set.str">str</link> ( ) | |
18 | rule <link linkend="bbv2.reference.class.property-set.propagated">propagated</link> ( ) | |
19 | rule <link linkend="bbv2.reference.class.property-set.add">add</link> ( ps ) | |
20 | rule <link linkend="bbv2.reference.class.property-set.add-raw">add-raw</link> ( properties * ) | |
21 | rule <link linkend="bbv2.reference.class.property-set.refine">refine</link> ( ps ) | |
22 | rule <link linkend="bbv2.reference.class.property-set.get">get</link> ( feature ) | |
23 | } | |
24 | </programlisting> | |
25 | ||
26 | <para> | |
27 | There is 1<->1 correspondence between identity and value. No two instances | |
28 | of the class are equal. To maintain this property, the 'property-set.create' | |
29 | rule should be used to create new instances. Instances are immutable. | |
30 | </para> | |
31 | ||
32 | <orderedlist> | |
33 | ||
34 | <listitem id="bbv2.reference.class.property-set.raw"> | |
35 | <indexterm zone="bbv2.reference.class.property-set.raw"> | |
36 | <primary>raw</primary> | |
37 | <secondary>Property Set Method</secondary> | |
38 | </indexterm> | |
39 | <code language="jam">rule raw ( )</code> | |
40 | <para>Returns a Jam list of the stored properties.</para> | |
41 | </listitem> | |
42 | ||
43 | <listitem id="bbv2.reference.class.property-set.str"> | |
44 | <indexterm zone="bbv2.reference.class.property-set.str"> | |
45 | <primary>str</primary> | |
46 | <secondary>Property Set Method</secondary> | |
47 | </indexterm> | |
48 | <code language="jam">rule str ( )</code> | |
49 | <para>Returns the string repesentation of the stored properties.</para> | |
50 | </listitem> | |
51 | ||
52 | <listitem id="bbv2.reference.class.property-set.propagated"> | |
53 | <indexterm zone="bbv2.reference.class.property-set.propagated"> | |
54 | <primary>propagated</primary> | |
55 | <secondary>Property Set Method</secondary> | |
56 | </indexterm> | |
57 | <code language="jam">rule propagated ( )</code> | |
58 | <para> | |
59 | Returns a <link linkend="bbv2.reference.class.property-set">property-set</link> | |
60 | containing all the <link linkend="bbv2.reference.features.attributes.propagated">propagated</link> | |
61 | properties in this <link linkend="bbv2.reference.class.property-set">property-set</link>. | |
62 | </para> | |
63 | </listitem> | |
64 | ||
65 | <listitem id="bbv2.reference.class.property-set.add"> | |
66 | <indexterm zone="bbv2.reference.class.property-set.add"> | |
67 | <primary>add</primary> | |
68 | <secondary>Property Set Method</secondary> | |
69 | </indexterm> | |
70 | <code language="jam">rule add ( ps )</code> | |
71 | <para> | |
72 | Returns a new <link linkend="bbv2.reference.class.property-set"> | |
73 | property-set</link> containing the union of the properties | |
74 | in this <link linkend="bbv2.reference.class.property-set"> | |
75 | property-set</link> and in <literal>ps</literal>. | |
76 | <note> | |
77 | <para> | |
78 | If <literal>ps</literal> contains non-free properties | |
79 | that should override the values in this object, use | |
80 | <link linkend="bbv2.reference.class.property-set.refine"> | |
81 | refine</link> instead. | |
82 | </para> | |
83 | </note> | |
84 | </para> | |
85 | </listitem> | |
86 | ||
87 | <listitem id="bbv2.reference.class.property-set.add-raw"> | |
88 | <indexterm zone="bbv2.reference.class.property-set.add-raw"> | |
89 | <primary>add-raw</primary> | |
90 | <secondary>Property Set Method</secondary> | |
91 | </indexterm> | |
92 | <code language="jam">rule add-raw ( properties * )</code> | |
93 | <para> | |
94 | Link <link linkend="bbv2.reference.class.property-set.add"> | |
95 | add</link>, except that it takes a list of properties | |
96 | instead of a <link linkend="bbv2.reference.class.property-set"> | |
97 | property-set</link>. | |
98 | </para> | |
99 | </listitem> | |
100 | ||
101 | <listitem id="bbv2.reference.class.property-set.refine"> | |
102 | <indexterm zone="bbv2.reference.class.property-set.refine"> | |
103 | <primary>refine</primary> | |
104 | <secondary>Property Set Method</secondary> | |
105 | </indexterm> | |
106 | <code language="jam">rule refine ( ps )</code> | |
107 | <para> | |
108 | Refines properties by overriding any non-free and non-conditional | |
109 | properties for which a different value is specified in | |
110 | <literal>ps</literal>. Returns the resulting | |
111 | <link linkend="bbv2.reference.class.property-set">property-set</link>. | |
112 | </para> | |
113 | </listitem> | |
114 | ||
115 | <listitem id="bbv2.reference.class.property-set.get"> | |
116 | <indexterm zone="bbv2.reference.class.property-set.get"> | |
117 | <primary>get</primary> | |
118 | <secondary>Property Set Method</secondary> | |
119 | </indexterm> | |
120 | <code language="jam">rule get ( feature )</code> | |
121 | <para> | |
122 | Returns all the values of <literal>feature</literal>. | |
123 | </para> | |
124 | </listitem> | |
125 | ||
126 | </orderedlist> | |
127 | ||
128 | </section> |