8 typedef unsigned int uint;
10 #define NONRET __attribute__((noreturn))
11 #define UNUSED __attribute__((unused))
21 AT_TYPE_MASK = 0xffff,
22 AT_MANDATORY = 0x10000,
23 AT_POSITIONAL = 0x20000,
33 virtual bool given() { return false; }
34 virtual int as_int(int def) { return def; }
35 virtual double as_double(double def) { return def; }
36 virtual const string as_string(const string def) { return def; }
37 virtual string dump() { return "<undef>"; }
41 QPDFObjectHandle resources;
42 QPDFObjectHandle xobjects;
45 string new_resource(const string type);
46 page_out() { res_cnt = 0; }
53 virtual void render(page_out *out UNUSED, pdf_matrix xform UNUSED) { abort(); }
54 page(double _w=0, double _h=0) : width(_w), height(_h) { }
57 struct empty_page : public page {
58 void render(page_out *out UNUSED, pdf_matrix xform UNUSED) { }
59 empty_page(double _w=0, double _h=0) : page(_w, _h) { };
63 virtual vector<page *> process(vector <page *> &pages UNUSED) { abort(); }
68 const arg_def *arg_defs;
70 cmd_exec *(*constructor)(cmd *cmd);
75 vector<arg_val *> args;
80 struct pipeline_selector {
85 struct pipeline_branch {
86 vector<pipeline_selector> selectors;
91 vector<pipeline_branch *> branches;
96 vector<page *> run_command_list(list<cmd *> &cmds, vector<page *> &pages);
100 void parse(const char *in, list<cmd *> &cmds);
104 extern const cmd_def cmd_table[];