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