]> git.ipfire.org Git - thirdparty/cups.git/blob - ppdc/ppdc-attr.cxx
Import changes from CUPS 1.5svn-r9085.
[thirdparty/cups.git] / ppdc / ppdc-attr.cxx
1 //
2 // "$Id$"
3 //
4 // Attribute 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 // ppdcAttr::ppdcAttr() - Create an attribute.
18 // ppdcAttr::~ppdcAttr() - Destroy an attribute.
19 //
20
21 //
22 // Include necessary headers...
23 //
24
25 #include "ppdc-private.h"
26
27
28 //
29 // 'ppdcAttr::ppdcAttr()' - Create an attribute.
30 //
31
32 ppdcAttr::ppdcAttr(const char *n, // I - Name
33 const char *s, // I - Spec string
34 const char *t, // I - Human-readable text
35 const char *v, // I - Value
36 bool loc) // I - Localize this attribute?
37 : ppdcShared()
38 {
39 PPDC_NEW;
40
41 name = new ppdcString(n);
42 selector = new ppdcString(s);
43 text = new ppdcString(t);
44 value = new ppdcString(v);
45 localizable = loc;
46 }
47
48
49 //
50 // 'ppdcAttr::~ppdcAttr()' - Destroy an attribute.
51 //
52
53 ppdcAttr::~ppdcAttr()
54 {
55 PPDC_DELETE;
56
57 name->release();
58 selector->release();
59 text->release();
60 value->release();
61 }
62
63
64 //
65 // End of "$Id$".
66 //