w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

PostScriptFunction Class Reference

#include <Function.h>

Inheritance diagram for PostScriptFunction:
[legend]
Collaboration diagram for PostScriptFunction:
[legend]

Public Member Functions

 PostScriptFunction (Object *funcObj, Dict *dict)
 
virtual ~PostScriptFunction ()
 
virtual Functioncopy ()
 
virtual int getType ()
 
virtual void transform (double *in, double *out)
 
virtual GBool isOk ()
 
GStringgetCodeString ()
 
 PostScriptFunction (Object *funcObj, Dict *dict)
 
 ~PostScriptFunction () override
 
Functioncopy () const override
 
int getType () const override
 
void transform (const double *in, double *out) const override
 
bool isOk () const override
 
const GooStringgetCodeString () const
 
 PostScriptFunction (Object *funcObj, Dict *dict)
 
 ~PostScriptFunction () override
 
Functioncopy () const override
 
int getType () const override
 
void transform (const double *in, double *out) const override
 
bool isOk () const override
 
const GooStringgetCodeString () const
 
- Public Member Functions inherited from Function
 Function ()
 
virtual ~Function ()
 
GBool init (Dict *dict)
 
int getInputSize ()
 
int getOutputSize ()
 
double getDomainMin (int i)
 
double getDomainMax (int i)
 
double getRangeMin (int i)
 
double getRangeMax (int i)
 
GBool getHasRange ()
 
 Function ()
 
virtual ~Function ()
 
 Function (const Function &)=delete
 
Functionoperator= (const Function &other)=delete
 
bool init (Dict *dict)
 
int getInputSize () const
 
int getOutputSize () const
 
double getDomainMin (int i) const
 
double getDomainMax (int i) const
 
double getRangeMin (int i) const
 
double getRangeMax (int i) const
 
bool getHasRange () const
 
virtual bool hasDifferentResultSet (const Function *func) const
 
 Function ()
 
virtual ~Function ()
 
 Function (const Function &)=delete
 
Functionoperator= (const Function &other)=delete
 
bool init (Dict *dict)
 
int getInputSize () const
 
int getOutputSize () const
 
double getDomainMin (int i) const
 
double getDomainMax (int i) const
 
double getRangeMin (int i) const
 
double getRangeMax (int i) const
 
bool getHasRange () const
 
virtual bool hasDifferentResultSet (const Function *func) const
 

Private Member Functions

 PostScriptFunction (PostScriptFunction *func)
 
GBool parseCode (GList *tokens, int *tokPtr, int *codePtr)
 
void addCode (int *codePtr, int op)
 
void addCodeI (int *codePtr, int op, int x)
 
void addCodeD (int *codePtr, int op, double x)
 
GStringgetToken (Stream *str)
 
int exec (double *stack, int sp0)
 
 PostScriptFunction (const PostScriptFunction *func)
 
bool parseCode (Stream *str, int *codePtr)
 
GooString getToken (Stream *str)
 
void resizeCode (int newSize)
 
void exec (PSStack *stack, int codePtr) const
 
 PostScriptFunction (const PostScriptFunction *func)
 
bool parseCode (Stream *str, int *codePtr)
 
GooString getToken (Stream *str)
 
void resizeCode (int newSize)
 
void exec (PSStack *stack, int codePtr) const
 

Private Attributes

GStringcodeString
 
PSCodecode
 
int codeLen
 
int codeSize
 
double cacheIn [32]
 
double cacheOut [32]
 
GBool ok
 
GooStringcodeString
 
PSObjectcode
 
bool ok
 

Additional Inherited Members

- Static Public Member Functions inherited from Function
static Functionparse (Object *funcObj, int expectedInputs, int expectedOutputs, int recursion=0)
 
static Functionparse (Object *funcObj)
 
static Functionparse (Object *funcObj)
 
- Protected Member Functions inherited from Function
 Function (const Function *func)
 
 Function (const Function *func)
 
- Static Protected Member Functions inherited from Function
static Functionparse (Object *funcObj, std::set< int > *usedParents)
 
static Functionparse (Object *funcObj, std::set< int > *usedParents)
 
- Protected Attributes inherited from Function
int m
 
int n
 
double domain [32][2]
 
double range [32][2]
 
GBool hasRange
 
bool hasRange
 

Detailed Description

Definition at line 209 of file Function.h.

Constructor & Destructor Documentation

◆ PostScriptFunction() [1/6]

◆ ~PostScriptFunction() [1/3]

PostScriptFunction::~PostScriptFunction ( )
virtual

Definition at line 991 of file Function.cc.

References codeString, and gfree.

◆ PostScriptFunction() [2/6]

PostScriptFunction::PostScriptFunction ( PostScriptFunction func)
private

Definition at line 984 of file Function.cc.

References codeSize, codeString, func, gmallocn(), and memcpy.

◆ PostScriptFunction() [3/6]

PostScriptFunction::PostScriptFunction ( Object funcObj,
Dict dict 
)

◆ ~PostScriptFunction() [2/3]

PostScriptFunction::~PostScriptFunction ( )
override

◆ PostScriptFunction() [4/6]

PostScriptFunction::PostScriptFunction ( const PostScriptFunction func)
private

Definition at line 1156 of file Function.cc.

References cacheIn, cacheOut, codeSize, codeString, func, funcMaxInputs, funcMaxOutputs, gmallocn(), memcpy, and ok.

◆ PostScriptFunction() [5/6]

PostScriptFunction::PostScriptFunction ( Object funcObj,
Dict dict 
)

◆ ~PostScriptFunction() [3/3]

PostScriptFunction::~PostScriptFunction ( )
override

◆ PostScriptFunction() [6/6]

PostScriptFunction::PostScriptFunction ( const PostScriptFunction func)
private

Member Function Documentation

◆ addCode()

void PostScriptFunction::addCode ( int codePtr,
int  op 
)
private

Definition at line 1141 of file Function.cc.

References codeSize, greallocn(), code::op, and op.

Referenced by parseCode().

◆ addCodeD()

void PostScriptFunction::addCodeD ( int codePtr,
int  op,
double  x 
)
private

Definition at line 1168 of file Function.cc.

References codeSize, greallocn(), code::op, op, code::val, and cordic::x.

Referenced by parseCode().

◆ addCodeI()

void PostScriptFunction::addCodeI ( int codePtr,
int  op,
int  x 
)
private

Definition at line 1154 of file Function.cc.

References codeSize, greallocn(), code::op, op, code::val, and cordic::x.

Referenced by parseCode().

◆ copy() [1/3]

virtual Function* PostScriptFunction::copy ( )
inlinevirtual

Implements Function.

Definition at line 214 of file Function.h.

References PostScriptFunction().

◆ copy() [2/3]

Function* PostScriptFunction::copy ( ) const
inlineoverridevirtual

Implements Function.

Definition at line 229 of file Function.h.

References PostScriptFunction().

◆ copy() [3/3]

Function* PostScriptFunction::copy ( ) const
inlineoverridevirtual

Implements Function.

Definition at line 229 of file Function.h.

References PostScriptFunction().

◆ exec() [1/3]

◆ exec() [2/3]

◆ exec() [3/3]

void PostScriptFunction::exec ( PSStack stack,
int  codePtr 
) const
private

◆ getCodeString() [1/3]

GString* PostScriptFunction::getCodeString ( )
inline

Definition at line 219 of file Function.h.

References codeString.

Referenced by PSOutputDev::cvtFunction().

◆ getCodeString() [2/3]

const GooString* PostScriptFunction::getCodeString ( ) const
inline

Definition at line 234 of file Function.h.

References codeString.

◆ getCodeString() [3/3]

const GooString* PostScriptFunction::getCodeString ( ) const
inline

Definition at line 234 of file Function.h.

References codeString.

◆ getToken() [1/3]

GooString PostScriptFunction::getToken ( Stream str)
private

Definition at line 1182 of file Function.cc.

References GString::append(), c, codeString, comment, EOF, gFalse, gTrue, isalnum, isdigit, isspace, NULL, s, and str.

Referenced by parseCode(), and PostScriptFunction().

◆ getToken() [2/3]

GooString PostScriptFunction::getToken ( Stream str)
private

◆ getToken() [3/3]

GooString PostScriptFunction::getToken ( Stream str)
private

◆ getType() [1/3]

virtual int PostScriptFunction::getType ( )
inlinevirtual

Implements Function.

Definition at line 215 of file Function.h.

◆ getType() [2/3]

int PostScriptFunction::getType ( ) const
inlineoverridevirtual

Implements Function.

Definition at line 230 of file Function.h.

◆ getType() [3/3]

int PostScriptFunction::getType ( ) const
inlineoverridevirtual

Implements Function.

Definition at line 230 of file Function.h.

◆ isOk() [1/3]

virtual GBool PostScriptFunction::isOk ( )
inlinevirtual

Implements Function.

Definition at line 217 of file Function.h.

References ok.

◆ isOk() [2/3]

bool PostScriptFunction::isOk ( ) const
inlineoverridevirtual

Implements Function.

Definition at line 232 of file Function.h.

References ok.

◆ isOk() [3/3]

bool PostScriptFunction::isOk ( ) const
inlineoverridevirtual

Implements Function.

Definition at line 232 of file Function.h.

References ok.

◆ parseCode() [1/3]

GBool PostScriptFunction::parseCode ( GList tokens,
int tokPtr,
int codePtr 
)
private

◆ parseCode() [2/3]

bool PostScriptFunction::parseCode ( Stream str,
int codePtr 
)
private

◆ parseCode() [3/3]

bool PostScriptFunction::parseCode ( Stream str,
int codePtr 
)
private

◆ resizeCode() [1/2]

void PostScriptFunction::resizeCode ( int  newSize)
private

Definition at line 1374 of file Function.cc.

References codeSize, and greallocn().

Referenced by parseCode().

◆ resizeCode() [2/2]

void PostScriptFunction::resizeCode ( int  newSize)
private

◆ transform() [1/3]

void PostScriptFunction::transform ( const double *  in,
double *  out 
) const
overridevirtual

Implements Function.

Definition at line 1177 of file Function.cc.

References cacheIn, cacheOut, exec(), i, in, Function::m, Function::n, out, Function::range, and stack.

◆ transform() [2/3]

void PostScriptFunction::transform ( const double *  in,
double *  out 
) const
overridevirtual

Implements Function.

◆ transform() [3/3]

void PostScriptFunction::transform ( double *  in,
double *  out 
)
virtual

Implements Function.

Definition at line 998 of file Function.cc.

References cacheIn, cacheOut, error, errSyntaxError, exec(), i, in, Function::m, Function::n, out, psStackSize, Function::range, sp, and cordic::x.

Referenced by PostScriptFunction().

Member Data Documentation

◆ cacheIn

double PostScriptFunction::cacheIn
mutableprivate

Definition at line 235 of file Function.h.

Referenced by PostScriptFunction(), and transform().

◆ cacheOut

double PostScriptFunction::cacheOut
mutableprivate

Definition at line 236 of file Function.h.

Referenced by PostScriptFunction(), and transform().

◆ code [1/2]

PSObject * PostScriptFunction::code
private

Definition at line 232 of file Function.h.

◆ code [2/2]

PSObject* PostScriptFunction::code
private

Definition at line 244 of file Function.h.

◆ codeLen

int PostScriptFunction::codeLen
private

Definition at line 233 of file Function.h.

Referenced by exec(), and PostScriptFunction().

◆ codeSize

int PostScriptFunction::codeSize
private

Definition at line 234 of file Function.h.

Referenced by addCode(), addCodeD(), addCodeI(), PostScriptFunction(), and resizeCode().

◆ codeString [1/2]

GooString * PostScriptFunction::codeString
private

Definition at line 231 of file Function.h.

Referenced by getCodeString(), getToken(), PostScriptFunction(), and ~PostScriptFunction().

◆ codeString [2/2]

GooString* PostScriptFunction::codeString
private

Definition at line 243 of file Function.h.

◆ ok [1/2]

bool PostScriptFunction::ok
private

Definition at line 237 of file Function.h.

Referenced by isOk(), and PostScriptFunction().

◆ ok [2/2]

bool PostScriptFunction::ok
private

Definition at line 248 of file Function.h.


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