MCPcopy Create free account
hub / github.com/OpenPrinting/cups / ppdcDriver

Method ppdcDriver

ppdc/ppdc-driver.cxx:23–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21//
22
23ppdcDriver::ppdcDriver(ppdcDriver *d) // I - Printer driver template
24 : ppdcShared()
25{
26 ppdcGroup *g; // Current group
27
28
29 PPDC_NEW;
30
31 if (d)
32 {
33 // Bump the use count of any strings we inherit...
34 if (d->manufacturer)
35 d->manufacturer->retain();
36 if (d->version)
37 d->version->retain();
38 if (d->default_font)
39 d->default_font->retain();
40 if (d->default_size)
41 d->default_size->retain();
42 if (d->custom_size_code)
43 d->custom_size_code->retain();
44
45 // Copy all of the data from the driver template...
46 copyright = new ppdcArray(d->copyright);
47 manufacturer = d->manufacturer;
48 model_name = 0;
49 file_name = 0;
50 pc_file_name = 0;
51 type = d->type;
52 version = d->version;
53 model_number = d->model_number;
54 manual_copies = d->manual_copies;
55 color_device = d->color_device;
56 throughput = d->throughput;
57 attrs = new ppdcArray(d->attrs);
58 constraints = new ppdcArray(d->constraints);
59 filters = new ppdcArray(d->filters);
60 fonts = new ppdcArray(d->fonts);
61 profiles = new ppdcArray(d->profiles);
62 sizes = new ppdcArray(d->sizes);
63 default_font = d->default_font;
64 default_size = d->default_size;
65 variable_paper_size = d->variable_paper_size;
66 custom_size_code = d->custom_size_code;
67 left_margin = d->left_margin;
68 bottom_margin = d->bottom_margin;
69 right_margin = d->right_margin;
70 top_margin = d->top_margin;
71 max_width = d->max_width;
72 max_length = d->max_length;
73 min_width = d->min_width;
74 min_length = d->min_length;
75
76 // Then copy the groups manually, since we want separate copies
77 // of the groups and options...
78 groups = new ppdcArray();
79
80 for (g = (ppdcGroup *)d->groups->first(); g; g = (ppdcGroup *)d->groups->next())

Callers

nothing calls this directly

Calls 4

retainMethod · 0.80
firstMethod · 0.80
nextMethod · 0.80
addMethod · 0.80

Tested by

no test coverage detected