]> git.ipfire.org Git - thirdparty/cups.git/blob - ppdc/ppdc-filter.cxx
ff3e8bc11cfb42dca8bf82f22e8be2c18d0a4a43
[thirdparty/cups.git] / ppdc / ppdc-filter.cxx
1 //
2 // Filter 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 // 'ppdcFilter::ppdcFilter()' - Create a filter.
23 //
24
25 ppdcFilter::ppdcFilter(const char *t, // I - MIME type
26 const char *p, // I - Filter program
27 int c) // I - Relative cost
28 : ppdcShared()
29 {
30 PPDC_NEW;
31
32 mime_type = new ppdcString(t);
33 program = new ppdcString(p);
34 cost = c;
35 }
36
37
38 //
39 // 'ppdcFilter::~ppdcFilter()' - Destroy a filter.
40 //
41
42 ppdcFilter::~ppdcFilter()
43 {
44 PPDC_DELETE;
45
46 mime_type->release();
47 program->release();
48 }