Mako 8.2.0 API
MakoCore SDK API Documentation
Loading...
Searching...
No Matches
pjl.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019-2025 Global Graphics Software Ltd. All rights reserved.
3 */
4
5#ifndef JAWSMAKO_PJL_H
6#define JAWSMAKO_PJL_H
7
8#include <jawsmako/types.h>
9#include <jawsmako/jawsmako.h>
10
11namespace JawsMako
12{
13 using namespace EDL;
14
20 class IPJLParser : public IRCObject
21 {
22 public:
23 virtual ~IPJLParser() {}
24
30 static JAWSMAKO_API IPJLParserPtr create(const IJawsMakoPtr &jawsMako);
31
36 virtual IPJLParserPtr clone() = 0;
37
50
62 virtual ePjlResult parse(const IInputPushbackStreamPtr &stream) = 0;
63
68 {
69 public:
77
78 bool operator== (const CPjlAttributeValue &other) const
79 {
80 return (other.modifier == modifier)
81 && (other.key == key)
82 && (other.value == value);
83 }
84
85 bool operator!= (const CPjlAttributeValue &other) const
86 {
87 return ! (*this == other);
88 }
89 };
91
101 virtual CPjlAttributeVect getAttributes(const RawString &command, const RawString &key = RawString()) = 0;
102
103 /*
104 * Functions to manipulate the PJL environment
105 */
106
112 virtual void setDefaultPaperSize(const U8String &paperSize) = 0;
113
119 virtual void setDefaultLandscape(bool defaultLandscape) = 0;
120
126 virtual void setDefaultCopies(uint32 defaultCopies) = 0;
127
133 virtual void setDefaultDuplex(bool defaultDuplex) = 0;
134
143
149 virtual void setDefaultDuplexBindingMode(eDuplexBindingMode defaultDuplexBinding) = 0;
150
156 virtual void setDefaultManualFeed(bool defaultManualFeed) = 0;
157 };
158 #define obj2IPJLParser(obj) IPJLParserPtr(dynamic_cast<IPJLParser *>((IRCObject *) (obj)), true)
159}
160
161#endif
Definition edlvector.h:30
Base class Interface for all Reference Counted objects.
Definition ircobject.h:35
A captured PJL attribute.
Definition pjl.h:68
bool operator!=(const CPjlAttributeValue &other) const
Definition pjl.h:85
RawString key
Definition pjl.h:73
bool operator==(const CPjlAttributeValue &other) const
Definition pjl.h:78
RawString modifier
Definition pjl.h:70
RawString value
Definition pjl.h:76
A PJL (Printer Job Language) parser for Mako.
Definition pjl.h:21
virtual ~IPJLParser()
Definition pjl.h:23
virtual ePjlResult parse(const IInputPushbackStreamPtr &stream)=0
Parse from the given stream, until another language is encountered or the end of the stream is reache...
virtual void setDefaultDuplexBindingMode(eDuplexBindingMode defaultDuplexBinding)=0
Set the default binding mode in the PJL Environment. Equivalent to having parsed "@PJL SET BINDING = ...
virtual void setDefaultDuplex(bool defaultDuplex)=0
Set the default duplex in the PJL Environment. Equivalent to having parsed "@PJL SET DUPLEX = <ON or ...
CEDLVector< CPjlAttributeValue > CPjlAttributeVect
Definition pjl.h:90
virtual void setDefaultLandscape(bool defaultLandscape)=0
Set the default orientation in the PJL Environment. Equivalent to having parsed "@PJL SET ORIENTATION...
virtual CPjlAttributeVect getAttributes(const RawString &command, const RawString &key=RawString())=0
Retrieves all attributes set with the given PJL command and key.
virtual IPJLParserPtr clone()=0
Clone the parser and the PJL environment.
eDuplexBindingMode
Duplex binding mode enumeration.
Definition pjl.h:139
@ eDBMShortEdge
Bind on short edge.
Definition pjl.h:141
@ eDBMLongEdge
Bind on long edge.
Definition pjl.h:140
virtual void setDefaultCopies(uint32 defaultCopies)=0
Set the default number of copies in the PJL Environment. Equivalent to having parsed "@PJL SET COPIES...
virtual void setDefaultPaperSize(const U8String &paperSize)=0
Set the default paper size in the PJL Environment. Equivalent to having parsed "@PJL SET PAPER = <pap...
static JAWSMAKO_API IPJLParserPtr create(const IJawsMakoPtr &jawsMako)
Create a PJL parser instance.
ePjlResult
Result code for PJL parsing.
Definition pjl.h:42
@ ePREnterPdf
Parse content that follows as PDF.
Definition pjl.h:46
@ ePREndOfFile
An end of file was encountered.
Definition pjl.h:48
@ ePREnterHpgl2
Parse content that follows as HPGL/2.
Definition pjl.h:47
@ ePREnterPostScript
Parse content that follows as PostScript.
Definition pjl.h:45
@ ePREnterPclXl
Parse content that follows as PCL/XL.
Definition pjl.h:43
@ ePREnterPcl
Parse content that follows as PCL5.
Definition pjl.h:44
virtual void setDefaultManualFeed(bool defaultManualFeed)=0
Set the default manual feed mode in the PJL Environment. Equivalent to having parsed "@PJL SET MANUAL...
unsigned int uint32
Definition edltypes.h:34
EDLSysString U8String
A UTF-8 String.
Definition types.h:144
EDLSysString RawString
A raw, 8 bit string. Encoding depends on context.
Definition types.h:150
Definition apexcustompostprocess.h:17
#define JAWSMAKO_API
Definition types.h:29