20 #ifndef PRINTCAPENTRY_H
21 #define PRINTCAPENTRY_H
23 #if !defined( _TDEPRINT_COMPILE ) && defined( __GNUC__ )
24 #warning internal header, do not use except if you are a TDEPrint developer
29 #include <tqstringlist.h>
30 #include <tqtextstream.h>
42 enum Type { String, Integer, Boolean };
43 Field() : type(String) {}
44 Field(
const Field &f) : type(f.type), name(f.name), value(f.value) {}
45 Field& operator= (
const Field& f)
52 TQString toString()
const;
72 TQMap<TQString,Field> fields;
75 bool has(
const TQString& f)
const {
return fields.contains(f); }
76 TQString field(
const TQString& f)
const {
return fields[f].value; }
77 bool writeEntry(TQTextStream&);
78 void addField(
const TQString& name, Field::Type type = Field::Boolean,
const TQString& value = TQString::null);