]>
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 | // |
e3101897 | 7 | // Licensed under Apache License v2.0. See the file "LICENSE" for more information. |
ac884b6a MS |
8 | // |
9 | ||
10 | // | |
11 | // Include necessary headers... | |
12 | // | |
13 | ||
38e73f87 | 14 | #include "ppdc-private.h" |
ac884b6a MS |
15 | |
16 | ||
17 | // | |
18 | // 'ppdcConstraint::ppdcConstraint()' - Create a constraint. | |
19 | // | |
20 | ||
21 | ppdcConstraint::ppdcConstraint(const char *o1, // I - First option | |
22 | const char *c1, // I - First choice | |
23 | const char *o2, // I - Second option | |
24 | const char *c2) // I - Second choice | |
25 | : ppdcShared() | |
26 | { | |
94da7e34 MS |
27 | PPDC_NEW; |
28 | ||
ac884b6a MS |
29 | option1 = new ppdcString(o1); |
30 | choice1 = new ppdcString(c1); | |
31 | option2 = new ppdcString(o2); | |
32 | choice2 = new ppdcString(c2); | |
33 | } | |
34 | ||
35 | ||
36 | // | |
37 | // 'ppdcConstraint::~ppdcConstraint()' - Destroy a constraint. | |
38 | // | |
39 | ||
40 | ppdcConstraint::~ppdcConstraint() | |
41 | { | |
94da7e34 MS |
42 | PPDC_DELETE; |
43 | ||
ac884b6a MS |
44 | option1->release(); |
45 | choice1->release(); | |
46 | option2->release(); | |
47 | choice2->release(); | |
48 | } |