• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Filter 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 // 'ppdcFilter::ppdcFilter()' - Create a filter.
20 //
21 
ppdcFilter(const char * t,const char * p,int c)22 ppdcFilter::ppdcFilter(const char *t,	// I - MIME type
23 		       const char *p,	// I - Filter program
24 		       int        c)	// I - Relative cost
25   : ppdcShared()
26 {
27   PPDC_NEW;
28 
29   mime_type = new ppdcString(t);
30   program   = new ppdcString(p);
31   cost      = c;
32 }
33 
34 
35 //
36 // 'ppdcFilter::~ppdcFilter()' - Destroy a filter.
37 //
38 
~ppdcFilter()39 ppdcFilter::~ppdcFilter()
40 {
41   PPDC_DELETE;
42 
43   mime_type->release();
44   program->release();
45 }
46