]>
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.abstract-target"> | |
6 | ||
7 | <title>Class abstract-target</title> | |
8 | <indexterm> | |
9 | <primary>abstract-target</primary> | |
10 | </indexterm> | |
11 | ||
12 | <para> | |
13 | Base class for all abstract targets. | |
14 | </para> | |
15 | ||
16 | <programlisting language="jam"> | |
17 | class abstract-target { | |
18 | rule <link linkend="bbv2.reference.class.abstract-target.__init__">__init__</link> ( name : project ) | |
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 | rule <link linkend="bbv2.reference.class.abstract-target.__init__">generate</link> ( property-set ) | |
24 | } | |
25 | </programlisting> | |
26 | ||
27 | <para> | |
28 | Classes derived from <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>: | |
29 | <itemizedlist> | |
30 | <listitem> | |
31 | <link linkend="bbv2.reference.class.project-target">project-target</link> | |
32 | </listitem> | |
33 | <listitem> | |
34 | <link linkend="bbv2.reference.class.main-target">main-target</link> | |
35 | </listitem> | |
36 | <listitem> | |
37 | <link linkend="bbv2.reference.class.project-target">basic-target</link> | |
38 | </listitem> | |
39 | </itemizedlist> | |
40 | </para> | |
41 | ||
42 | <orderedlist> | |
43 | ||
44 | <listitem id="bbv2.reference.class.abstract-target.__init__"> | |
45 | <code language="jam">rule __init__ ( name : project )</code> | |
46 | <para> | |
47 | <variablelist> | |
48 | <varlistentry> | |
49 | <term><literal>name</literal></term> | |
50 | <listitem> | |
51 | <para>The name of the target in the Jamfile.</para> | |
52 | </listitem> | |
53 | </varlistentry> | |
54 | <varlistentry> | |
55 | <term><literal>project</literal></term> | |
56 | <listitem> | |
57 | <para>The <link linkend="bbv2.reference.class.project-target">project</link> to which this target belongs.</para> | |
58 | </listitem> | |
59 | </varlistentry> | |
60 | </variablelist> | |
61 | </para> | |
62 | </listitem> | |
63 | ||
64 | <listitem id="bbv2.reference.class.abstract-target.name"> | |
65 | <indexterm zone="bbv2.reference.class.abstract-target.name"> | |
66 | <primary>name</primary> | |
67 | <secondary>Abstract Target</secondary> | |
68 | </indexterm> | |
69 | <code language="jam">rule name ( )</code> | |
70 | <para>Returns the name of this target.</para> | |
71 | </listitem> | |
72 | ||
73 | <listitem id="bbv2.reference.class.abstract-target.project"> | |
74 | <indexterm zone="bbv2.reference.class.abstract-target.project"> | |
75 | <primary>project</primary> | |
76 | <secondary>Abstract Target</secondary> | |
77 | </indexterm> | |
78 | <code language="jam">rule project ( )</code> | |
79 | <para>Returns the <link linkend="bbv2.reference.class.project-target">project</link> for this target.</para> | |
80 | </listitem> | |
81 | ||
82 | <listitem id="bbv2.reference.class.abstract-target.location"> | |
83 | <indexterm zone="bbv2.reference.class.abstract-target.location"> | |
84 | <primary>location</primary> | |
85 | <secondary>Abstract Target</secondary> | |
86 | </indexterm> | |
87 | <code language="jam">rule location ( )</code> | |
88 | <para>Returns the location where the target was declared.</para> | |
89 | </listitem> | |
90 | ||
91 | <listitem id="bbv2.reference.class.abstract-target.full-name"> | |
92 | <indexterm zone="bbv2.reference.class.abstract-target.full-name"> | |
93 | <primary>full-name</primary> | |
94 | <secondary>Abstract Target</secondary> | |
95 | </indexterm> | |
96 | <code language="jam">rule full-name ( )</code> | |
97 | <para>Returns a user-readable name for this target.</para> | |
98 | </listitem> | |
99 | ||
100 | <listitem id="bbv2.reference.class.abstract-target.generate"> | |
101 | <indexterm zone="bbv2.reference.class.abstract-target.generate"> | |
102 | <primary>generate</primary> | |
103 | <secondary>Abstract Target</secondary> | |
104 | </indexterm> | |
105 | <code language="jam">rule generate ( property-set )</code> | |
106 | <para> | |
107 | Generates virtual targets for this abstract target using the specified | |
108 | properties, unless a different value of some feature is required by the | |
109 | target. This is an abstract method which must be overriden by derived | |
110 | classes. | |
111 | </para> | |
112 | ||
113 | <para> | |
114 | On success, returns: | |
115 | <itemizedlist> | |
116 | <listitem>a property-set with the usage requirements to be applied to dependents</listitem> | |
117 | <listitem>a list of produced virtual targets, which may be empty.</listitem> | |
118 | </itemizedlist> | |
119 | If <code language="jam">property-set</code> is empty, performs the | |
120 | default build of this target, in a way specific to the derived class. | |
121 | </para> | |
122 | </listitem> | |
123 | ||
124 | </orderedlist> | |
125 | ||
126 | </section> |