]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
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.typed-target"> | |
6 | ||
7 | <title>Class typed-target</title> | |
8 | <indexterm> | |
9 | <primary>typed-target</primary> | |
10 | </indexterm> | |
11 | ||
12 | <programlisting language="jam"> | |
13 | class typed-target : <link linkend="bbv2.reference.class.basic-target">basic-target</link> { | |
14 | rule <link linkend="bbv2.reference.class.typed-target.__init__">__init__</link> ( name : project : type : sources * : requirements * : default-build * : usage-requirements * ) | |
15 | rule <link linkend="bbv2.reference.class.typed-target.type">type</link> ( ) | |
16 | rule <link linkend="bbv2.reference.class.typed-target.construct">construct</link> ( name : source-targets * : property-set ) | |
17 | ||
18 | # Methods inherited from <link linkend="bbv2.reference.class.abstract-target">abstract-target</link> | |
19 | rule <link linkend="bbv2.reference.class.abstract-target.name">name</link> ( ) | |
20 | rule <link linkend="bbv2.reference.class.abstract-target.project">project</link> ( ) | |
21 | rule <link linkend="bbv2.reference.class.abstract-target.location">location</link> ( ) | |
22 | rule <link linkend="bbv2.reference.class.abstract-target.full-name">full-name</link> ( ) | |
23 | ||
24 | # Methods inherited from <link linkend="bbv2.reference.class.basic-target">basic-target</link> | |
25 | rule <link linkend="bbv2.reference.class.basic-target.generate">generate</link> ( property-set ) | |
26 | } | |
27 | </programlisting> | |
28 | ||
29 | <para> | |
30 | <link linkend="bbv2.reference.class.typed-target">typed-target</link> | |
31 | is the most common kind of target alternative. Rules for creating | |
32 | typed targets are defined automatically for each type. | |
33 | </para> | |
34 | ||
35 | <orderedlist> | |
36 | ||
37 | <listitem id="bbv2.reference.class.typed-target.__init__"> | |
38 | <code language="jam">rule __init__ ( name : project : type : sources * : requirements * : default-build * : usage-requirements * )</code> | |
39 | <para> | |
40 | <variablelist> | |
41 | <varlistentry> | |
42 | <term><literal>name</literal></term> | |
43 | <listitem><para>The name of the target</para></listitem> | |
44 | </varlistentry> | |
45 | <varlistentry> | |
46 | <term><literal>project</literal></term> | |
47 | <listitem> | |
48 | <para> | |
49 | The <link linkend="bbv2.reference.class.project-target">project</link> | |
50 | in which the target is declared. | |
51 | </para> | |
52 | </listitem> | |
53 | </varlistentry> | |
54 | <varlistentry> | |
55 | <term><literal>type</literal></term> | |
56 | <listitem> | |
57 | <para> | |
58 | The <link linkend="bbv2.reference.modules.type">type</link> | |
59 | of the target. | |
60 | </para> | |
61 | </listitem> | |
62 | </varlistentry> | |
63 | </variablelist> | |
64 | </para> | |
65 | </listitem> | |
66 | ||
67 | <listitem id="bbv2.reference.class.typed-target.type"> | |
68 | <indexterm zone="bbv2.reference.class.typed-target.type"> | |
69 | <primary>type</primary> | |
70 | <secondary>Typed Target Method</secondary> | |
71 | </indexterm> | |
72 | <code language="jam">rule type ( )</code> | |
73 | <para> | |
74 | Returns the <link linkend="bbv2.reference.modules.type">type</link> | |
75 | of the target. | |
76 | </para> | |
77 | </listitem> | |
78 | ||
79 | <listitem id="bbv2.reference.class.typed-target.construct"> | |
80 | <indexterm zone="bbv2.reference.class.typed-target.construct"> | |
81 | <primary>construct</primary> | |
82 | <secondary>Typed Target Method</secondary> | |
83 | </indexterm> | |
84 | <code language="jam">rule construct ( name : source-targets * : property-set )</code> | |
85 | <para> | |
86 | Implements <link linkend="bbv2.reference.class.basic-target.construct"> | |
87 | basic-target.construct</link>. Attempts to create a target of | |
88 | the correct type using generators appropriate for the given | |
89 | <link linkend="bbv2.reference.class.property-set">property-set</link>. | |
90 | Returns a <link linkend="bbv2.reference.class.property-set"> | |
91 | property-set</link> containing the usage requirements | |
92 | and a list of virtual targets. | |
93 | ||
94 | <note> | |
95 | <para> | |
96 | This function is invoked automatically by | |
97 | <link linkend="bbv2.reference.class.basic-target.generate">basic-target.generate</link> | |
98 | and should not be called directly by users. | |
99 | </para> | |
100 | </note> | |
101 | </para> | |
102 | </listitem> | |
103 | ||
104 | </orderedlist> | |
105 | ||
106 | </section> |