Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
IccMpeCalc.cpp File Reference

File: IccMpeCalc.cpp. More...

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include "IccMpeBasic.h"
#include "IccMpeCalc.h"
#include "IccIO.h"
#include <map>
#include "IccUtil.h"
+ Include dependency graph for IccMpeCalc.cpp:

Go to the source code of this file.

Classes

class  CIccCalcOpMgr
 
class  CIccConsoleDebugger
 
class  CIccOpDefAbsoluteVal
 
class  CIccOpDefAdd
 
class  CIccOpDefAnd
 
class  CIccOpDefArcCosine
 
class  CIccOpDefArcSine
 
class  CIccOpDefArcTan2
 
class  CIccOpDefArcTangent
 
class  CIccOpDefCartesianToPolar
 
class  CIccOpDefCeiling
 
class  CIccOpDefCopy
 
class  CIccOpDefCosine
 
class  CIccOpDefCube
 
class  CIccOpDefCubeRoot
 
class  CIccOpDefData
 
class  CIccOpDefDivide
 
class  CIccOpDefEnvVar
 
class  CIccOpDefEqual
 
class  CIccOpDefExp
 
class  CIccOpDefFlip
 
class  CIccOpDefFloor
 
class  CIccOpDefFromLab
 
class  CIccOpDefGamma
 
class  CIccOpDefGreaterThan
 
class  CIccOpDefGreaterThanEqual
 
class  CIccOpDefInputChan
 
class  CIccOpDefInvalid
 
class  CIccOpDefLessThan
 
class  CIccOpDefLessThanEqual
 
class  CIccOpDefLogrithm
 
class  CIccOpDefMaximum
 
class  CIccOpDefMinimum
 
class  CIccOpDefModulus
 
class  CIccOpDefMultiply
 
class  CIccOpDefNaturalLog
 
class  CIccOpDefNear
 
class  CIccOpDefNeg
 
class  CIccOpDefNegInfinity
 
class  CIccOpDefNot
 
class  CIccOpDefNotANumber
 
class  CIccOpDefNotEqual
 
class  CIccOpDefOr
 
class  CIccOpDefOutputChan
 
class  CIccOpDefPi
 
class  CIccOpDefPolarToCartesian
 
class  CIccOpDefPop
 
class  CIccOpDefPosInfinity
 
class  CIccOpDefPositionDup
 
class  CIccOpDefPow
 
class  CIccOpDefProduct
 
class  CIccOpDefRealNumber
 
class  CIccOpDefRotateLeft
 
class  CIccOpDefRotateRight
 
class  CIccOpDefRound
 
class  CIccOpDefScalarAdd
 
class  CIccOpDefScalarDivide
 
class  CIccOpDefScalarMultiply
 
class  CIccOpDefScalarSubtract
 
class  CIccOpDefSign
 
class  CIccOpDefSine
 
class  CIccOpDefSolve
 
class  CIccOpDefSquare
 
class  CIccOpDefSquareRoot
 
class  CIccOpDefSubElement
 
class  CIccOpDefSubtract
 
class  CIccOpDefSum
 
class  CIccOpDefTangent
 
class  CIccOpDefTempGetChan
 
class  CIccOpDefTempPutChan
 
class  CIccOpDefTempSaveChan
 
class  CIccOpDefToLab
 
class  CIccOpDefTranspose
 
class  CIccOpDefTruncate
 
class  CIccOpDefVectorAnd
 
class  CIccOpDefVectorMaximum
 
class  CIccOpDefVectorMinimum
 
class  CIccOpDefVectorOr
 

Macros

#define OsExtendArgs(N)
 
#define OsPopArg(X)
 
#define OsPopArgs(X, N)
 
#define OsPushArg(X)
 
#define OsPushArgs(X, N)
 
#define OsShrinkArgs(N)
 

Typedefs

typedef std::map< icSigCalcOp, IIccOpDef * > icCalcOpMap
 
typedef std::map< icUInt32Number, CIccCalculatorFunc * > icChannelFuncOffsetMap
 
typedef std::map< CIccCalculatorFunc *, icPositionNumbericChannelFuncPtrMap
 

Functions

static void AppendOpList (CIccCalcOpList &toList, const CIccCalcOpList &fromList)
 

Variables

static CIccConsoleDebugger g_ConsoleDebugger
 
static IIccCalcDebuggerg_pDebugger = ((IIccCalcDebugger*)0)
 

Detailed Description

File: IccMpeCalc.cpp.

Contains: Implementation of Calculator Element

Version: V1

Copyright: (c) see ICC Software License

Definition in file IccMpeCalc.cpp.

Macro Definition Documentation

◆ OsExtendArgs

#define OsExtendArgs ( N)
Value:
{ \
size_t ss = os.pStack->size(); \
os.pStack->resize(ss+(N)); \
}

Definition at line 204 of file IccMpeCalc.cpp.

204#define OsExtendArgs(N) { \
205 size_t ss = os.pStack->size(); \
206 os.pStack->resize(ss+(N)); \
207}

Referenced by CIccOpDefCopy::Exec(), and CIccOpDefPositionDup::Exec().

◆ OsPopArg

#define OsPopArg ( X)
Value:
{ \
if (!os.pStack->size()) \
return false; \
X = *(os.pStack->rbegin()); \
os.pStack->pop_back(); \
}

Definition at line 165 of file IccMpeCalc.cpp.

165#define OsPopArg(X) { \
166 if (!os.pStack->size()) \
167 return false; \
168 X = *(os.pStack->rbegin()); \
169 os.pStack->pop_back(); \
170}

Referenced by CIccCalculatorFunc::ApplySequence().

◆ OsPopArgs

#define OsPopArgs ( X,
N )
Value:
{ \
icUInt32Number nv=(N); \
size_t ss = os.pStack->size(); \
if (nv>ss) \
return false; \
icFloatNumber *sv = &(*os.pStack)[ss-nv]; \
memcpy((X), sv, nv*sizeof(icFloatNumber)); \
os.pStack->resize(ss-nv); \
}
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100
unsigned int icUInt32Number

Definition at line 172 of file IccMpeCalc.cpp.

172#define OsPopArgs(X, N) { \
173 icUInt32Number nv=(N); \
174 size_t ss = os.pStack->size(); \
175 if (nv>ss) \
176 return false; \
177 icFloatNumber *sv = &(*os.pStack)[ss-nv]; \
178 memcpy((X), sv, nv*sizeof(icFloatNumber)); \
179 os.pStack->resize(ss-nv); \
180}

Referenced by CIccOpDefOutputChan::Exec(), CIccOpDefRotateLeft::Exec(), CIccOpDefRotateRight::Exec(), and CIccOpDefTempPutChan::Exec().

◆ OsPushArg

#define OsPushArg ( X)
Value:
{ \
icFloatNumber V = (X); \
os.pStack->push_back(V); \
}

Definition at line 183 of file IccMpeCalc.cpp.

183#define OsPushArg(X) { \
184 icFloatNumber V = (X); \
185 os.pStack->push_back(V); \
186}

Referenced by CIccOpDefEnvVar::Exec(), CIccOpDefNegInfinity::Exec(), CIccOpDefNotANumber::Exec(), CIccOpDefPi::Exec(), CIccOpDefPosInfinity::Exec(), CIccOpDefRotateLeft::Exec(), and CIccOpDefRotateRight::Exec().

◆ OsPushArgs

#define OsPushArgs ( X,
N )
Value:
{ \
size_t ss = os.pStack->size(); \
icUInt32Number nv=(N); \
os.pStack->resize(ss+nv); \
icFloatNumber *sv = &(*os.pStack)[ss]; \
memcpy(sv, (X), nv*sizeof(icFloatNumber)); \
}

Definition at line 188 of file IccMpeCalc.cpp.

188#define OsPushArgs(X, N) { \
189 size_t ss = os.pStack->size(); \
190 icUInt32Number nv=(N); \
191 os.pStack->resize(ss+nv); \
192 icFloatNumber *sv = &(*os.pStack)[ss]; \
193 memcpy(sv, (X), nv*sizeof(icFloatNumber)); \
194}

Referenced by CIccOpDefInputChan::Exec(), and CIccOpDefTempGetChan::Exec().

◆ OsShrinkArgs

Typedef Documentation

◆ icCalcOpMap

typedef std::map<icSigCalcOp, IIccOpDef*> icCalcOpMap

Definition at line 1953 of file IccMpeCalc.cpp.

◆ icChannelFuncOffsetMap

Definition at line 4460 of file IccMpeCalc.cpp.

◆ icChannelFuncPtrMap

Definition at line 4461 of file IccMpeCalc.cpp.

Function Documentation

◆ AppendOpList()

static void AppendOpList ( CIccCalcOpList & toList,
const CIccCalcOpList & fromList )
static

Definition at line 2966 of file IccMpeCalc.cpp.

2967{
2968 CIccCalcOpList::const_iterator o;
2969
2970 for (o=fromList.begin(); o!=fromList.end(); o++) {
2971 toList.push_back(*o);
2972 }
2973}

Referenced by CIccCalculatorFunc::ParseFuncDef().

+ Here is the caller graph for this function:

Variable Documentation

◆ g_ConsoleDebugger

CIccConsoleDebugger g_ConsoleDebugger
static

Definition at line 149 of file IccMpeCalc.cpp.

Referenced by IIccCalcDebugger::SetDebugger().

◆ g_pDebugger