Mako 7.5.0 API
Loading...
Searching...
No Matches
JawsMako::IPJLParser Class Referenceabstract

A PJL (Printer Job Language) parser for Mako. More...

#include <pjl.h>

Inheritance diagram for JawsMako::IPJLParser:

Classes

class  CPjlAttributeValue
 A captured PJL attribute. More...
 

Public Types

enum  ePjlResult {
  ePREnterPclXl , ePREnterPcl , ePREnterPostScript , ePREnterPdf ,
  ePREnterHpgl2 , ePREndOfFile
}
 Result code for PJL parsing. More...
 
enum  eDuplexBindingMode { eDBMLongEdge , eDBMShortEdge }
 Duplex binding mode enumeration. More...
 

Public Member Functions

virtual IPJLParserPtr clone ()=0
 Clone the parser and the PJL environment.
 
virtual ePjlResult parse (const IInputPushbackStreamPtr &stream)=0
 Parse from the given stream, until another language is encountered or the end of the stream is reached.
 
virtual CPjlAttributeVect getAttributes (const RawString &command, const RawString &key=RawString())=0
 Retrieves all attributes set with the given PJL command and key.
 
virtual void setDefaultPaperSize (const U8String &paperSize)=0
 Set the default paper size in the PJL Environment. Equivalent to having parsed "@PJL SET PAPER = <papersize>".
 
virtual void setDefaultLandscape (bool defaultLandscape)=0
 Set the default orientation in the PJL Environment. Equivalent to having parsed "@PJL SET ORIENTATION = <PORTRAIT or LANDSCAPE>".
 
virtual void setDefaultCopies (uint32 defaultCopies)=0
 Set the default number of copies in the PJL Environment. Equivalent to having parsed "@PJL SET COPIES = <default copies>".
 
virtual void setDefaultDuplex (bool defaultDuplex)=0
 Set the default duplex in the PJL Environment. Equivalent to having parsed "@PJL SET DUPLEX = <ON or OFF>".
 
virtual void setDefaultDuplexBindingMode (eDuplexBindingMode defaultDuplexBinding)=0
 Set the default binding mode in the PJL Environment. Equivalent to having parsed "@PJL SET BINDING = <LONGEDGE or SHORTEDGE>".
 
virtual void setDefaultManualFeed (bool defaultManualFeed)=0
 Set the default manual feed mode in the PJL Environment. Equivalent to having parsed "@PJL SET MANUALFEED = <ON or OFF>".
 
- Public Member Functions inherited from IRCObject
virtual void addRef () const =0
 Increases the reference count of the actual object pointed to. This would take place during an assignment or copying.
 
virtual bool decRef () const =0
 Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to.
 
virtual int32 getRefCount () const =0
 Retrieve the current reference count of the actual object pointed to.
 

Static Public Member Functions

static JAWSMAKO_API IPJLParserPtr create (const IJawsMakoPtr &jawsMako)
 Create a PJL parser instance.
 

Additional Inherited Members

- Protected Member Functions inherited from IRCObject
virtual ~IRCObject ()
 Virtual destructor.
 

Detailed Description

A PJL (Printer Job Language) parser for Mako.

Member Enumeration Documentation

◆ eDuplexBindingMode

Duplex binding mode enumeration.

Enumerator
eDBMLongEdge 

Bind on long edge.

eDBMShortEdge 

Bind on short edge.

◆ ePjlResult

Result code for PJL parsing.

Enumerator
ePREnterPclXl 

Parse content that follows as PCL/XL.

ePREnterPcl 

Parse content that follows as PCL5.

ePREnterPostScript 

Parse content that follows as PostScript.

ePREnterPdf 

Parse content that follows as PDF.

ePREnterHpgl2 

Parse content that follows as HPGL/2.

ePREndOfFile 

An end of file was encountered.

Member Function Documentation

◆ create()

static JAWSMAKO_API IPJLParserPtr JawsMako::IPJLParser::create ( const IJawsMakoPtr & jawsMako)
static

Create a PJL parser instance.

Returns
IPJLParserPtr The PJL input

◆ getAttributes()

virtual CPjlAttributeVect JawsMako::IPJLParser::getAttributes ( const RawString & command,
const RawString & key = RawString() )
pure virtual

Retrieves all attributes set with the given PJL command and key.


If the key is empty, all attributes set with the given command will be returned.

◆ parse()

virtual ePjlResult JawsMako::IPJLParser::parse ( const IInputPushbackStreamPtr & stream)
pure virtual

Parse from the given stream, until another language is encountered or the end of the stream is reached.

Exceptions of type IError are thrown on error.

Parameters
streamThe stream to parse. This must be a pushback-capable stream, as the parser must be able to sniff ahead. The stream must be open; the parser will neither open nor close the stream.
Returns
ePjlResult The result of parsing.

The documentation for this class was generated from the following file: