xref: /aosp_15_r20/external/libcups/ppdc/ppdc-message.cxx (revision 5e7646d21f1134fb0638875d812ef646c12ab91e)
1*5e7646d2SAndroid Build Coastguard Worker //
2*5e7646d2SAndroid Build Coastguard Worker // Shared message class for the CUPS PPD Compiler.
3*5e7646d2SAndroid Build Coastguard Worker //
4*5e7646d2SAndroid Build Coastguard Worker // Copyright 2007-2009 by Apple Inc.
5*5e7646d2SAndroid Build Coastguard Worker // Copyright 2002-2005 by Easy Software Products.
6*5e7646d2SAndroid Build Coastguard Worker //
7*5e7646d2SAndroid Build Coastguard Worker // Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
8*5e7646d2SAndroid Build Coastguard Worker //
9*5e7646d2SAndroid Build Coastguard Worker 
10*5e7646d2SAndroid Build Coastguard Worker //
11*5e7646d2SAndroid Build Coastguard Worker // Include necessary headers...
12*5e7646d2SAndroid Build Coastguard Worker //
13*5e7646d2SAndroid Build Coastguard Worker 
14*5e7646d2SAndroid Build Coastguard Worker #include "ppdc-private.h"
15*5e7646d2SAndroid Build Coastguard Worker 
16*5e7646d2SAndroid Build Coastguard Worker 
17*5e7646d2SAndroid Build Coastguard Worker //
18*5e7646d2SAndroid Build Coastguard Worker // 'ppdcMessage::ppdcMessage()' - Create a shared message.
19*5e7646d2SAndroid Build Coastguard Worker //
20*5e7646d2SAndroid Build Coastguard Worker 
ppdcMessage(const char * i,const char * s)21*5e7646d2SAndroid Build Coastguard Worker ppdcMessage::ppdcMessage(const char *i,	// I - ID
22*5e7646d2SAndroid Build Coastguard Worker                          const char *s)	// I - Text
23*5e7646d2SAndroid Build Coastguard Worker   : ppdcShared()
24*5e7646d2SAndroid Build Coastguard Worker {
25*5e7646d2SAndroid Build Coastguard Worker   PPDC_NEW;
26*5e7646d2SAndroid Build Coastguard Worker 
27*5e7646d2SAndroid Build Coastguard Worker   id     = new ppdcString(i);
28*5e7646d2SAndroid Build Coastguard Worker   string = new ppdcString(s);
29*5e7646d2SAndroid Build Coastguard Worker }
30*5e7646d2SAndroid Build Coastguard Worker 
31*5e7646d2SAndroid Build Coastguard Worker 
32*5e7646d2SAndroid Build Coastguard Worker //
33*5e7646d2SAndroid Build Coastguard Worker // 'ppdcMessage::~ppdcMessage()' - Destroy a shared message.
34*5e7646d2SAndroid Build Coastguard Worker //
35*5e7646d2SAndroid Build Coastguard Worker 
~ppdcMessage()36*5e7646d2SAndroid Build Coastguard Worker ppdcMessage::~ppdcMessage()
37*5e7646d2SAndroid Build Coastguard Worker {
38*5e7646d2SAndroid Build Coastguard Worker   PPDC_DELETE;
39*5e7646d2SAndroid Build Coastguard Worker 
40*5e7646d2SAndroid Build Coastguard Worker   id->release();
41*5e7646d2SAndroid Build Coastguard Worker   string->release();
42*5e7646d2SAndroid Build Coastguard Worker }
43