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