8 typedef unsigned int uint;
10 #define NONRET __attribute__((noreturn))
11 #define UNUSED __attribute__((unused))
22 AT_TYPE_MASK = 0xffff,
23 AT_MANDATORY = 0x10000,
24 AT_POSITIONAL = 0x20000,
34 virtual bool given() { return false; }
35 virtual int as_int(int def) { return def; }
36 virtual double as_double(double def) { return def; }
37 virtual const string as_string(const string def) { return def; }
38 virtual string dump() { return "<undef>"; }
42 QPDFObjectHandle resources;
43 QPDFObjectHandle xobjects;
46 string new_resource(const string type);
47 out_context() { res_cnt = 0; }
52 double width; // Physical dimensions of media
54 BBox bbox; // Bounds useful contents
55 virtual void render(out_context *out UNUSED, pdf_matrix xform UNUSED) { abort(); }
56 page(double _w=0, double _h=0) : width(_w), height(_h) { }
65 struct empty_page : public page {
66 void render(out_context *out UNUSED, pdf_matrix xform UNUSED) { }
67 empty_page(double _w=0, double _h=0) : page(_w, _h) { };
71 virtual vector<page *> process(vector <page *> &pages UNUSED) { abort(); }
76 const arg_def *arg_defs;
78 cmd_exec *(*constructor)(cmd *cmd);
83 vector<arg_val *> args;
88 struct pipeline_selector {
93 struct pipeline_branch {
94 vector<pipeline_selector> selectors;
99 vector<pipeline_branch *> branches;
104 vector<page *> run_command_list(list<cmd *> &cmds, vector<page *> &pages);
108 void parse(const char *in, list<cmd *> &cmds);
113 extern const cmd_def cmd_table[];
117 vector<BBox> gs_bboxes(const char *in);