]>
Commit | Line | Data |
---|---|---|
ac884b6a | 1 | // |
503b54c9 | 2 | // Contraint class for the CUPS PPD Compiler. |
ac884b6a | 3 | // |
503b54c9 MS |
4 | // Copyright 2007-2009 by Apple Inc. |
5 | // Copyright 2002-2005 by Easy Software Products. | |
ac884b6a | 6 | // |
503b54c9 MS |
7 | // These coded instructions, statements, and computer programs are the |
8 | // property of Apple Inc. and are protected by Federal copyright | |
9 | // law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
10 | // which should have been included with this file. If this file is | |
57b7b66b | 11 | // missing or damaged, see the license at "http://www.cups.org/". |
ac884b6a MS |
12 | // |
13 | ||
14 | // | |
15 | // Include necessary headers... | |
16 | // | |
17 | ||
38e73f87 | 18 | #include "ppdc-private.h" |
ac884b6a MS |
19 | |
20 | ||
21 | // | |
22 | // 'ppdcConstraint::ppdcConstraint()' - Create a constraint. | |
23 | // | |
24 | ||
25 | ppdcConstraint::ppdcConstraint(const char *o1, // I - First option | |
26 | const char *c1, // I - First choice | |
27 | const char *o2, // I - Second option | |
28 | const char *c2) // I - Second choice | |
29 | : ppdcShared() | |
30 | { | |
94da7e34 MS |
31 | PPDC_NEW; |
32 | ||
ac884b6a MS |
33 | option1 = new ppdcString(o1); |
34 | choice1 = new ppdcString(c1); | |
35 | option2 = new ppdcString(o2); | |
36 | choice2 = new ppdcString(c2); | |
37 | } | |
38 | ||
39 | ||
40 | // | |
41 | // 'ppdcConstraint::~ppdcConstraint()' - Destroy a constraint. | |
42 | // | |
43 | ||
44 | ppdcConstraint::~ppdcConstraint() | |
45 | { | |
94da7e34 MS |
46 | PPDC_DELETE; |
47 | ||
ac884b6a MS |
48 | option1->release(); |
49 | choice1->release(); | |
50 | option2->release(); | |
51 | choice2->release(); | |
52 | } |