]> git.ipfire.org Git - thirdparty/cups.git/blob - ppdc/ppdc-constraint.cxx
57fbe842845e9aaf9941a640cd35edccce3a47f6
[thirdparty/cups.git] / ppdc / ppdc-constraint.cxx
1 //
2 // Contraint class for the CUPS PPD Compiler.
3 //
4 // Copyright 2007-2009 by Apple Inc.
5 // Copyright 2002-2005 by Easy Software Products.
6 //
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
11 // file is missing or damaged, see the license at "http://www.cups.org/".
12 //
13
14 //
15 // Include necessary headers...
16 //
17
18 #include "ppdc-private.h"
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 {
31 PPDC_NEW;
32
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 {
46 PPDC_DELETE;
47
48 option1->release();
49 choice1->release();
50 option2->release();
51 choice2->release();
52 }