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 out_context() { res_cnt = 0; }
51 double width; // Physical dimensions of media
53 BBox bbox; // Bounds useful contents
54 virtual void render(out_context *out UNUSED, pdf_matrix xform UNUSED) { abort(); }
55 page(double _w=0, double _h=0) : width(_w), height(_h) { }
64 struct empty_page : public page {
65 void render(out_context *out UNUSED, pdf_matrix xform UNUSED) { }
66 empty_page(double _w=0, double _h=0) : page(_w, _h) { };
70 virtual vector<page *> process(vector <page *> &pages UNUSED) { abort(); }
75 const arg_def *arg_defs;
77 cmd_exec *(*constructor)(cmd *cmd);
82 vector<arg_val *> args;
87 struct pipeline_selector {
92 struct pipeline_branch {
93 vector<pipeline_selector> selectors;
98 vector<pipeline_branch *> branches;
103 vector<page *> run_command_list(list<cmd *> &cmds, vector<page *> &pages);
107 void parse(const char *in, list<cmd *> &cmds);
112 extern const cmd_def cmd_table[];