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) { }
58 virtual vector<page *> process(vector <page *> &pages UNUSED) { abort(); }
63 const arg_def *arg_defs;
65 cmd_exec *(*constructor)(cmd *cmd);
70 vector<arg_val *> args;
75 struct pipeline_selector {
80 struct pipeline_branch {
81 vector<pipeline_selector> selectors;
86 vector<pipeline_branch *> branches;
91 vector<page *> run_command_list(list<cmd *> &cmds, vector<page *> &pages);
95 void parse(const char *in, list<cmd *> &cmds);
99 extern const cmd_def cmd_table[];