]>
Commit | Line | Data |
---|---|---|
ac884b6a | 1 | // |
503b54c9 | 2 | // Attribute class for the CUPS PPD Compiler. |
ac884b6a | 3 | // |
503b54c9 MS |
4 | // Copyright 2007-2009 by Apple Inc. |
5 | // Copyright 2002-2005 by Easy Software Products. | |
ac884b6a | 6 | // |
e3101897 | 7 | // Licensed under Apache License v2.0. See the file "LICENSE" for more information. |
ac884b6a MS |
8 | // |
9 | ||
10 | // | |
11 | // Include necessary headers... | |
12 | // | |
13 | ||
38e73f87 | 14 | #include "ppdc-private.h" |
ac884b6a MS |
15 | |
16 | ||
17 | // | |
18 | // 'ppdcAttr::ppdcAttr()' - Create an attribute. | |
19 | // | |
20 | ||
21 | ppdcAttr::ppdcAttr(const char *n, // I - Name | |
22 | const char *s, // I - Spec string | |
23 | const char *t, // I - Human-readable text | |
bdd6c45b MS |
24 | const char *v, // I - Value |
25 | bool loc) // I - Localize this attribute? | |
ac884b6a MS |
26 | : ppdcShared() |
27 | { | |
94da7e34 MS |
28 | PPDC_NEW; |
29 | ||
bdd6c45b MS |
30 | name = new ppdcString(n); |
31 | selector = new ppdcString(s); | |
32 | text = new ppdcString(t); | |
33 | value = new ppdcString(v); | |
34 | localizable = loc; | |
ac884b6a MS |
35 | } |
36 | ||
37 | ||
38 | // | |
39 | // 'ppdcAttr::~ppdcAttr()' - Destroy an attribute. | |
40 | // | |
41 | ||
42 | ppdcAttr::~ppdcAttr() | |
43 | { | |
94da7e34 MS |
44 | PPDC_DELETE; |
45 | ||
ac884b6a MS |
46 | name->release(); |
47 | selector->release(); | |
48 | text->release(); | |
49 | value->release(); | |
50 | } |