• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Option choice class for the CUPS PPD Compiler.
3 //
4 // Copyright 2007-2009 by Apple Inc.
5 // Copyright 2002-2005 by Easy Software Products.
6 //
7 // Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
8 //
9 
10 //
11 // Include necessary headers...
12 //
13 
14 #include "ppdc-private.h"
15 
16 
17 //
18 // 'ppdcChoice::ppdcChoice()' - Create a new option choice.
19 //
20 
ppdcChoice(const char * n,const char * t,const char * c)21 ppdcChoice::ppdcChoice(const char *n,	// I - Name of choice
22                        const char *t,	// I - Text of choice
23 		       const char *c)	// I - Code of choice
24   : ppdcShared()
25 {
26   PPDC_NEW;
27 
28   name = new ppdcString(n);
29   text = new ppdcString(t);
30   code = new ppdcString(c);
31 }
32 
33 
34 //
35 // 'ppdcChoice::~ppdcChoice()' - Destroy an option choice.
36 //
37 
~ppdcChoice()38 ppdcChoice::~ppdcChoice()
39 {
40   PPDC_DELETE;
41 
42   name->release();
43   text->release();
44   code->release();
45 }
46