Mako 8.1.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

◆ clone()

virtual IPJLParserPtr JawsMako::IPJLParser::clone ( )
pure virtual

Clone the parser and the PJL environment.

Returns
IPJLParserPtr A new parser instance with the same environment.

◆ create()

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

Create a PJL parser instance.

Parameters
jawsMakoThe IJawsMako object
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.

Parameters
commandThe PJL command to retrieve attributes for.
keyThe key to retrieve attributes for. If empty, all attributes.
Returns
CPjlAttributeVect A vector of attributes for the given command and key.

◆ 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.

◆ setDefaultCopies()

virtual void JawsMako::IPJLParser::setDefaultCopies ( uint32 defaultCopies)
pure virtual

Set the default number of copies in the PJL Environment. Equivalent to having parsed "@PJL SET COPIES = <default copies>".

Parameters
defaultCopiesThe number of copies to set. Must be greater than 0.

◆ setDefaultDuplex()

virtual void JawsMako::IPJLParser::setDefaultDuplex ( bool defaultDuplex)
pure virtual

Set the default duplex in the PJL Environment. Equivalent to having parsed "@PJL SET DUPLEX = <ON or OFF>".

Parameters
defaultDuplexIf true, the default duplex will be on (i.e. double-sided printing).

◆ setDefaultDuplexBindingMode()

virtual void JawsMako::IPJLParser::setDefaultDuplexBindingMode ( eDuplexBindingMode defaultDuplexBinding)
pure virtual

Set the default binding mode in the PJL Environment. Equivalent to having parsed "@PJL SET BINDING = <LONGEDGE or SHORTEDGE>".

Parameters
defaultDuplexBindingThe duplex binding mode to set.

◆ setDefaultLandscape()

virtual void JawsMako::IPJLParser::setDefaultLandscape ( bool defaultLandscape)
pure virtual

Set the default orientation in the PJL Environment. Equivalent to having parsed "@PJL SET ORIENTATION = <PORTRAIT or LANDSCAPE>".

Parameters
defaultLandscapeIf true, the default orientation will be landscape.

◆ setDefaultManualFeed()

virtual void JawsMako::IPJLParser::setDefaultManualFeed ( bool defaultManualFeed)
pure virtual

Set the default manual feed mode in the PJL Environment. Equivalent to having parsed "@PJL SET MANUALFEED = <ON or OFF>".

Parameters
defaultManualFeedIf true, the default manual feed will be on.

◆ setDefaultPaperSize()

virtual void JawsMako::IPJLParser::setDefaultPaperSize ( const U8String & paperSize)
pure virtual

Set the default paper size in the PJL Environment. Equivalent to having parsed "@PJL SET PAPER = <papersize>".

Parameters
paperSizeThe paper size to set, e.g., "A4", "Letter", etc.

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