IccMAX 2.1.27
Color Profile Tools
Loading...
Searching...
No Matches
CIccMpeXmlCalculator Class Reference

#include <IccMpeXml.h>

+ Inheritance diagram for CIccMpeXmlCalculator:
+ Collaboration diagram for CIccMpeXmlCalculator:

Public Member Functions

 CIccMpeXmlCalculator ()
 
virtual ~CIccMpeXmlCalculator ()
 
virtual void Apply (CIccApplyMpe *pApply, icFloatNumber *pDestPixel, const icFloatNumber *pSrcPixel) const
 
virtual bool Begin (icElemInterp nInterp, CIccTagMultiProcessElement *pMPE)
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 
virtual icAcsSignature GetBAcsSig ()
 
virtual const char * GetClassName () const
 
virtual icAcsSignature GetEAcsSig ()
 
CIccMultiProcessElementGetElem (icSigCalcOp op, icUInt16Number index)
 
virtual const char * GetExtClassName ()
 
virtual IIccExtensionMpeGetExtension ()
 
virtual CIccApplyMpeGetNewApply (CIccApplyTagMpe *pApplyTag)
 
virtual icElemTypeSignature GetType () const
 
virtual bool IsAcs ()
 
virtual bool IsLateBinding () const
 
virtual bool IsLateBindingReflectance () const
 
virtual bool IsSupported ()
 
virtual CIccMpeCalculatorNewCopy () const
 
virtual icUInt16Number NumInputChannels () const
 
virtual icUInt16Number NumOutputChannels () const
 
bool ParseImport (xmlNode *pNode, std::string importPath, std::string &parseStr)
 
virtual bool ParseXml (xmlNode *pNode, std::string &parseStr)
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 
void Reset ()
 
icFuncParseStatus SetCalcFunc (const char *szFuncDef, std::string &sReport)
 
icFuncParseStatus SetCalcFunc (icCalculatorFuncPtr newFunc)
 
void SetSize (icUInt16Number nInputChannels, icUInt16Number nOutputChannels)
 
bool SetSubElem (icUInt32Number idx, CIccMultiProcessElement *pElem)
 
virtual bool ToXml (std::string &xml, std::string blanks="")
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
 
virtual bool Write (CIccIO *pIO)
 

Static Public Member Functions

static CIccMultiProcessElementCreate (icElemTypeSignature sig)
 

Data Fields

icUInt32Number m_nReserved
 

Protected Member Functions

void clean ()
 
bool Flatten (std::string &flatStr, std::string macroName, const char *szFunc, std::string &parseStr, icUInt32Number nLocalsOffset=0)
 
bool ParseChanMap (ChanVarMap &chanMap, const char *szNames, int nChannels)
 
bool SetElem (icUInt32Number idx, CIccMultiProcessElement *pElem, icUInt32Number &count, CIccMultiProcessElement ***pArray)
 
bool UpdateLocals (std::string &func, std::string szFunc, std::string &parseStr, int nLocalsOffset)
 
bool ValidateMacroCalls (std::string &parseStr) const
 
bool ValidMacroCalls (const char *szMacroText, std::string macroStack, std::string &parseStr) const
 

Static Protected Member Functions

static bool validName (const char *saName)
 
static bool validNameChar (char c, bool bFirst)
 

Protected Attributes

bool m_bNeedTempReset
 
icCalculatorFuncPtr m_calcFunc
 
TempDeclVarMap m_declVarMap
 
ChanVarMap m_inputMap
 
TempDeclVarMap m_macroLocalMap
 
MacroMap m_macroMap
 
MpePtrList m_mpeList
 
MpePtrMap m_mpeMap
 
icUInt16Number m_nInputChannels
 
int m_nNextMpe
 
int m_nNextVar
 
icUInt16Number m_nOutputChannels
 
icUInt32Number m_nSubElem
 
icUInt32Number m_nTempChannels
 
ChanVarMap m_outputMap
 
IIccCmmEnvVarLookupm_pCmmEnvVarLookup
 
std::string m_sImport
 
CIccMultiProcessElement ** m_SubElem
 
TempVarMap m_varMap
 

Detailed Description

Constructor & Destructor Documentation

◆ CIccMpeXmlCalculator()

CIccMpeXmlCalculator::CIccMpeXmlCalculator ( )
inline
304{ m_sImport = "*"; }
std::string m_sImport
Definition IccMpeXml.h:329

References m_sImport.

Referenced by CIccMpeXmlFactory::CreateElement(), and CIccSampledCalculatorCurveXml::ParseXml().

+ Here is the caller graph for this function:

◆ ~CIccMpeXmlCalculator()

virtual CIccMpeXmlCalculator::~CIccMpeXmlCalculator ( )
inlinevirtual
305{ clean(); }
void clean()
Definition IccMpeXml.cpp:3005

References clean().

+ Here is the call graph for this function:

Member Function Documentation

◆ Apply()

void CIccMpeCalculator::Apply ( CIccApplyMpe pApply,
icFloatNumber pDestPixel,
const icFloatNumber pSrcPixel 
) const
virtualinherited

Name: CIccMpeCalculator::Apply

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

4783{
4784 CIccApplyMpeCalculator *pApplyCalc = (CIccApplyMpeCalculator*)pApply;
4785 icFloatNumber *pSrcTemp = pApplyCalc->m_temp;
4786 bool rv;
4787
4788 pApplyCalc->m_temp = pSrcTemp;
4789 pApplyCalc->m_input = pSrcPixel;
4790 pApplyCalc->m_output = pDestPixel;
4791
4792 if (m_bNeedTempReset) {
4793 memset(pSrcTemp, 0, m_nTempChannels*sizeof(icFloatNumber));
4794 }
4795
4796 if (g_pDebugger) {
4798 rv = m_calcFunc->Apply(pApplyCalc);
4799 if (!rv)
4800 g_pDebugger->Error("Calc Function Apply Terminated with an error!");
4801
4803 }
4804 else {
4805 rv = m_calcFunc->Apply(pApplyCalc);
4806 }
4807}
static IIccCalcDebugger * g_pDebugger
Definition IccMpeCalc.cpp:154
float icFloatNumber
Definition IccDefs.h:101
virtual bool Apply(CIccApplyMpeCalculator *pApply) const
Definition IccMpeCalc.cpp:3685
bool m_bNeedTempReset
Definition IccMpeCalc.h:486
icUInt32Number m_nTempChannels
Definition IccMpeCalc.h:485
icCalculatorFuncPtr m_calcFunc
Definition IccMpeCalc.h:491
Definition IccMpeCalc.h:505
icFloatNumber * m_output
Definition IccMpeCalc.h:533
const icFloatNumber * m_input
Definition IccMpeCalc.h:532
icFloatNumber * m_temp
Definition IccMpeCalc.h:534
virtual void EndApply()=0
virtual void Error(const char *msg)=0
virtual void BeginApply()=0

References CIccCalculatorFunc::Apply(), IIccCalcDebugger::BeginApply(), IIccCalcDebugger::EndApply(), IIccCalcDebugger::Error(), g_pDebugger, CIccMpeCalculator::m_bNeedTempReset, CIccMpeCalculator::m_calcFunc, CIccApplyMpeCalculator::m_input, CIccMpeCalculator::m_nTempChannels, CIccApplyMpeCalculator::m_output, and CIccApplyMpeCalculator::m_temp.

Referenced by CIccSampledCalculatorCurve::Begin().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Begin()

bool CIccMpeCalculator::Begin ( icElemInterp  nInterp,
CIccTagMultiProcessElement pMPE 
)
virtualinherited

Name: CIccMpeCalculator::Begin

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

4688{
4689 if (!m_calcFunc)
4690 return false;
4691
4693
4695
4696 if (m_nTempChannels>65536)
4697 return false;
4698
4699 if (m_nTempChannels) {
4700 icUInt8Number *tempUsage = (icUInt8Number *)calloc(m_nTempChannels, sizeof(icUInt8Number));
4701 if (tempUsage) {
4703 free(tempUsage);
4704 }
4705 else
4706 m_bNeedTempReset = true;
4707 }
4708 else {
4709 m_bNeedTempReset = false;
4710 }
4711
4712 if (!m_calcFunc->Begin(this, pMPE))
4713 return false;
4714
4716 for (n=0; n<m_nSubElem; n++) {
4717 if (m_SubElem[n] && !m_SubElem[n]->Begin(nInterp, pMPE))
4718 return false;
4719 }
4720
4721 return true;
4722}
unsigned char icUInt8Number
Definition icProfileHeader.h:250
unsigned long icUInt32Number
Definition icProfileHeader.h:262
IIccCmmEnvVarLookup * GetCmmEnvLookup()
Definition IccTagMPE.h:405
virtual bool Begin(const CIccMpeCalculator *pChannelMux, CIccTagMultiProcessElement *pMPE)
Definition IccMpeCalc.cpp:3462
icUInt32Number GetMaxTemp() const
Definition IccMpeCalc.cpp:3786
bool NeedTempReset(icUInt8Number *tempUsage, icUInt32Number nMaxTemp)
Definition IccMpeCalc.cpp:3810
virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE)
Definition IccMpeCalc.cpp:4687
IIccCmmEnvVarLookup * m_pCmmEnvVarLookup
Definition IccMpeCalc.h:493
icUInt32Number m_nSubElem
Definition IccMpeCalc.h:488
CIccMultiProcessElement ** m_SubElem
Definition IccMpeCalc.h:489

References CIccCalculatorFunc::Begin(), CIccMultiProcessElement::Begin(), CIccTagMultiProcessElement::GetCmmEnvLookup(), CIccCalculatorFunc::GetMaxTemp(), CIccMpeCalculator::m_bNeedTempReset, CIccMpeCalculator::m_calcFunc, CIccMpeCalculator::m_nSubElem, CIccMpeCalculator::m_nTempChannels, CIccMpeCalculator::m_pCmmEnvVarLookup, CIccMpeCalculator::m_SubElem, and CIccCalculatorFunc::NeedTempReset().

Referenced by CIccSampledCalculatorCurve::Begin().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clean()

void CIccMpeXmlCalculator::clean ( )
protected
3006{
3007 m_sImport = "*";
3008 m_declVarMap.clear();
3009 m_varMap.clear();
3010 m_macroMap.clear();
3011
3012 MpePtrList::iterator ml;
3013 for (ml = m_mpeList.begin(); ml != m_mpeList.end(); ml++) {
3014 if (ml->m_ptr)
3015 delete ml->m_ptr;
3016 }
3017 m_mpeList.clear();
3018
3019 MpePtrMap::iterator mm;
3020 for (mm = m_mpeMap.begin(); mm != m_mpeMap.end(); mm++) {
3021 if (mm->second.m_ptr)
3022 delete mm->second.m_ptr;
3023 }
3024 m_mpeMap.clear();
3025 m_nNextVar = 0;
3026 m_nNextMpe = 0;
3027}
TempDeclVarMap m_declVarMap
Definition IccMpeXml.h:331
MpePtrMap m_mpeMap
Definition IccMpeXml.h:335
MacroMap m_macroMap
Definition IccMpeXml.h:339
TempVarMap m_varMap
Definition IccMpeXml.h:333
int m_nNextVar
Definition IccMpeXml.h:332
int m_nNextMpe
Definition IccMpeXml.h:336
MpePtrList m_mpeList
Definition IccMpeXml.h:337

References m_declVarMap, m_macroMap, m_mpeList, m_mpeMap, m_nNextMpe, m_nNextVar, CIccMpePtr::m_ptr, m_sImport, and m_varMap.

Referenced by ~CIccMpeXmlCalculator(), and ParseXml().

+ Here is the caller graph for this function:

◆ Create()

CIccMultiProcessElement * CIccMultiProcessElement::Create ( icElemTypeSignature  sig)
staticinherited

Name: CIccMultiProcessElement::Create

Purpose:

Args:

Return:

132{
134}
static CIccMultiProcessElement * CreateElement(icElemTypeSignature elemTypeSig)
Definition IccMpeFactory.h:213

References CIccMpeCreator::CreateElement().

Referenced by CIccDefaultEncProfileConverter::ConvertFromParams(), CIccSampledCalculatorCurve::Read(), CIccMpeCalculator::Read(), and CIccTagMultiProcessElement::Read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Describe()

void CIccMpeCalculator::Describe ( std::string &  sDescription,
int  nVerboseness 
)
virtualinherited

Name: CIccMpeCalculator::Describe

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

4431{
4432 if (m_calcFunc) {
4433 icChar buf[81];
4434
4435 sprintf(buf, "BEGIN_CALC_ELEMENT %u %u\n", m_nInputChannels, m_nOutputChannels);
4436 sDescription += buf;
4437
4438 if (m_nSubElem && m_SubElem) {
4440 for (i=0; i<m_nSubElem; i++) {
4441 sprintf(buf, "BEGIN_SUBCALCELEM %u\n", i);
4442 sDescription += buf;
4443 m_SubElem[i]->Describe(sDescription, nVerboseness);
4444 sprintf(buf, "END_SUBCALCELEM %u\n\n", i);
4445 sDescription += buf;
4446 }
4447 }
4448
4449 if (m_calcFunc) {
4450 sDescription += "BEGIN_CALC_FUNCTION\n";
4451 m_calcFunc->Describe(sDescription, nVerboseness);
4452 sDescription += "END_CALC_FUNCTION\n";
4453 }
4454
4455 sprintf(buf, "END_CALC_ELEMENT\n");
4456 sDescription += buf;
4457
4458 }
4459}
char icChar
Definition IccDefs.h:110
icUInt16Number m_nOutputChannels
Definition IccTagMPE.h:192
icUInt16Number m_nInputChannels
Definition IccTagMPE.h:191
virtual void Describe(std::string &sDescription, int nVerboseness)=0
virtual void Describe(std::string &sDescription, int nVerboseness=0, int nBlanks=0)
Definition IccMpeCalc.cpp:2956

References CIccMultiProcessElement::Describe(), CIccCalculatorFunc::Describe(), CIccMpeCalculator::m_calcFunc, CIccMultiProcessElement::m_nInputChannels, CIccMultiProcessElement::m_nOutputChannels, CIccMpeCalculator::m_nSubElem, and CIccMpeCalculator::m_SubElem.

Referenced by CIccSampledCalculatorCurve::Describe().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Flatten()

bool CIccMpeXmlCalculator::Flatten ( std::string &  flatStr,
std::string  macroName,
const char *  szFunc,
std::string &  parseStr,
icUInt32Number  nLocalsOffset = 0 
)
protected
2660{
2661 CIccFuncTokenizer parse(szFunc, true);
2662
2663 while (parse.GetNext()) {
2664 std::string token = parse.GetLast();
2665 const char *tok = token.c_str();
2666 if (!strncmp(tok, "call{", 5) ||
2667 tok[0] == '#') {
2668 std::string nameiter;
2669 std::string name;
2670
2671 if (tok[0] == '#')
2672 nameiter = token.substr(1);
2673 else
2674 nameiter = parse.GetReference();
2675
2676 const char *ptr;
2677 for (ptr = nameiter.c_str(); *ptr && *ptr != '[' && *ptr != '('; ptr++) name += *ptr;
2678 int iter = 1;
2679// if (*ptr) {
2680// iter = atoi(ptr + 1);
2681// if (iter < 1)
2682// iter = 1;
2683// else if (iter>1024)
2684// iter = 1024;
2685// }
2686
2687 MacroMap::iterator m = m_macroMap.find(name.c_str());
2688 if (m != m_macroMap.end()) {
2689 icUInt16Number nLocalsSize = 0;
2690 TempDeclVarMap::iterator locals = m_macroLocalMap.find(macroName);
2691 if (locals != m_macroLocalMap.end()) {
2692 nLocalsSize = locals->second.m_size;
2693 }
2694
2695 int i;
2696 for (i = 0; i < iter; i++) {
2697 Flatten(flatStr, name, m->second.c_str(), parseStr, nLocalsOffset+nLocalsSize);
2698 }
2699 }
2700 else {
2701 parseStr += "Call to undefined macro '" + name + "'\n";
2702 return false;
2703 }
2704 }
2705 else if (!strncmp(tok, "in{", 3) ||
2706 !strncmp(tok, "out{", 4)) {
2707 std::string op = parse.GetName();
2708 std::string ref = parse.GetReference();
2709 std::string refroot;
2710 for (const char *ptr = ref.c_str(); *ptr && *ptr != ',' && *ptr != '(' && *ptr != '['; ptr++) refroot += *ptr;
2711
2712 ChanVarMap *pMap;
2713 int nChan;
2714 if (op == "in") {
2715 pMap = &m_inputMap;
2716 nChan = m_nInputChannels;
2717 }
2718 else {
2719 pMap = &m_outputMap;
2720 nChan = m_nOutputChannels;
2721 }
2722
2723 ChanVarMap::iterator ci = pMap->find(refroot);
2724 if (ci == pMap->end()) {
2725 parseStr += "Invalid '" + op + "' operation channel reference '" + refroot + "'\n";
2726 return false;
2727 }
2728 if (refroot != ref) {
2729 std::string select = ref.substr(refroot.size());
2730 int offset = 0;
2731 int size = 1;
2732
2733 if (select[0] == '[' || select[1] == '(') {
2734 const char *ptr;
2735 offset = atoi(select.c_str() + 1);
2736 for (ptr = select.c_str() + 1; *ptr && *ptr != ')' && *ptr != ']'; ptr++);
2737 select = ptr + 1;
2738 }
2739
2740 if (select[0]==',')
2741 size = atoi(select.c_str() + 1);
2742
2743 if (size < 0 || offset<0 || ci->second.first + offset + size > m_nInputChannels) {
2744 parseStr += "Invalid '" + op + "' operation channel offset or size '" + refroot + "'\n";
2745 return false;
2746 }
2747 char index[80];
2748 sprintf(index, "(%d,%d)", ci->second.first+offset, size);
2749 flatStr += op + index + " ";
2750 }
2751 else if (ci->second.second>1) {
2752 char index[80];
2753 sprintf(index, "(%d,%d)", ci->second.first, ci->second.second);
2754 flatStr += op + index + " ";
2755 }
2756 else {
2757 char index[80];
2758 sprintf(index, "(%d)", ci->second.first);
2759 flatStr += op + index + " ";
2760 }
2761 }
2762 else if (!strncmp(tok, "tget{", 5) ||
2763 !strncmp(tok, "tput{", 5) ||
2764 !strncmp(tok, "tsav{", 5)) {
2765 std::string op = parse.GetName();
2766 std::string ref = parse.GetReference();
2767 std::string refroot;
2768 for (const char *ptr = ref.c_str(); *ptr && *ptr != '[' && *ptr != '('; ptr++) refroot += *ptr;
2769
2770 if (macroName.size() && refroot.size() && refroot[0] == '@') {
2771 std::string localName = refroot.substr(1);
2772 TempDeclVarMap::iterator locals = m_macroLocalMap.find(macroName);
2773 if (locals == m_macroLocalMap.end()) {
2774 parseStr += "Reference to undeclared local variable '" + localName + "' in macro '" + macroName + "'\n";
2775 return false;
2776 }
2777
2778 unsigned long nLocalOffset = 0;
2779 unsigned long nLocalSize = 0;
2780 TempVarList::iterator m = locals->second.m_members.begin();
2781 for (; m != locals->second.m_members.end(); m++) {
2782 if (localName == m->m_name) {
2783 nLocalOffset = m->m_pos;
2784 nLocalSize = m->m_size;
2785 break;
2786 }
2787 }
2788 if (m == locals->second.m_members.end()) {
2789 parseStr += "Reference to undeclared local variable '" + localName + "' in macro '" + macroName + "'\n";
2790 return false;
2791 }
2792 int voffset, vsize;
2793
2794 if (ref != refroot) {
2795 CIccFuncTokenizer p2(ref.c_str());
2796 p2.GetNext();
2797 icUInt16Number _voffset = 0, _vsize = 1;
2798 p2.GetIndex(_voffset, _vsize, 0, 1);
2799 voffset = _voffset;
2800 vsize = _vsize + 1;
2801 }
2802 else {
2803 voffset = 0;
2804 vsize = (int)nLocalSize;
2805 }
2806
2807 if (voffset + vsize > (int)nLocalSize) {
2808 parseStr += "Out of bounds indexing of local '" + refroot + "' in macro '" + macroName + "'\n";
2809 return false;
2810 }
2811
2812 if (nLocalsOffset + nLocalOffset + voffset + vsize > 65536) {
2813 parseStr += "Temporary variable addressing out of bounds\n";
2814 return false;
2815 }
2816 char idx[80];
2817 if (vsize == 1) {
2818 sprintf(idx, "[%lu]", nLocalsOffset + nLocalOffset + voffset);
2819 }
2820 else {
2821 sprintf(idx, "[%lu,%d]", nLocalsOffset + nLocalOffset + voffset, vsize);
2822 }
2823 flatStr += "l";
2824 flatStr += op.substr(1);
2825 flatStr += idx;
2826 flatStr += " ";
2827 }
2828 else {
2829 TempVarMap::iterator var = m_varMap.find(refroot);
2830 if (var == m_varMap.end()) {
2831 std::string root;
2832 for (const char *ptr = refroot.c_str(); *ptr && *ptr != '.'; ptr++) root += *ptr;
2833
2834 TempVarMap::iterator rootVar = m_varMap.find(root);
2835 if (refroot != root && rootVar == m_varMap.end()) {
2836 parseStr += "Reference to undeclared variable '" + ref + "'\n";
2837 return false;
2838 }
2839
2840 TempDeclVarMap::iterator decl = m_declVarMap.find(root);
2841 if (decl == m_declVarMap.end()) {
2842 parseStr += "Reference to undeclared variable '" + ref + "'\n";
2843 return false;
2844 }
2845
2846 if (decl->second.m_pos < 0) {
2847 m_varMap[root] = CIccTempVar(root, m_nNextVar, decl->second.m_size);
2848 decl->second.m_pos = m_nNextVar;
2849
2850 if (strchr(refroot.c_str(), '.')) {
2851 TempVarList::iterator m = decl->second.m_members.begin();
2852 for (; m != decl->second.m_members.end(); m++) {
2853 std::string vm = root + "." + m->m_name;
2854 m_varMap[vm] = CIccTempVar(vm, m_nNextVar + m->m_pos, m->m_size);
2855 }
2856 }
2857
2858 if (m_nNextVar + decl->second.m_size > 65536) {
2859 parseStr += "Temporary variable addressing out of bounds\n";
2860 return false;
2861 }
2862 m_nNextVar += decl->second.m_size;
2863 }
2864 else {
2865 m_varMap[root] = CIccTempVar(root, decl->second.m_pos, decl->second.m_size);
2866
2867 if (strchr(refroot.c_str(), '.')) {
2868 TempVarList::iterator m = decl->second.m_members.begin();
2869 for (; m != decl->second.m_members.end(); m++) {
2870 std::string vm = root + "." + m->m_name;
2871 m_varMap[vm] = CIccTempVar(vm, decl->second.m_pos + m->m_pos, m->m_size);
2872 }
2873 }
2874 if (decl->second.m_pos + decl->second.m_size > 65536) {
2875 parseStr += "Temporary variable addressing out of bounds\n";
2876 return false;
2877 }
2878 }
2879
2880 var = m_varMap.find(refroot);
2881 if (var == m_varMap.end()) {
2882 parseStr += "Reference to undeclared variable '" + refroot + "'\n";
2883 return false;
2884 }
2885 }
2886 int voffset, vsize;
2887
2888 if (ref != refroot) {
2889 CIccFuncTokenizer p2(ref.c_str());
2890 p2.GetNext();
2891 icUInt16Number _voffset = 0, _vsize = 1;
2892 p2.GetIndex(_voffset, _vsize, 0, 1);
2893 voffset = _voffset;
2894 vsize = _vsize + 1;
2895 }
2896 else {
2897 voffset = 0;
2898 vsize = var->second.m_size;
2899 }
2900
2901 if (voffset + vsize > var->second.m_size) {
2902 parseStr += "Out of bounds indexing of '" + refroot + "'\n";
2903 return false;
2904 }
2905 if (var->second.m_pos + voffset + vsize > 65536) {
2906 parseStr += "Temporary variable addressing out of bounds\n";
2907 return false;
2908 }
2909 char idx[80];
2910 if (vsize == 1) {
2911 sprintf(idx, "[%d]", var->second.m_pos + voffset);
2912 }
2913 else {
2914 sprintf(idx, "[%d,%d]", var->second.m_pos + voffset, vsize);
2915 }
2916 flatStr += op + idx + " ";
2917 }
2918 }
2919 else if (!strncmp(tok, "elem{", 5) ||
2920 !strncmp(tok, "curv{", 5) ||
2921 !strncmp(tok, "clut{", 5) ||
2922 !strncmp(tok, "mtx{", 4) ||
2923 !strncmp(tok, "fJab{", 5) ||
2924 !strncmp(tok, "tJab{", 5) ||
2925 !strncmp(tok, "calc{", 5) ||
2926 !strncmp(tok, "tint{", 5)) {
2927 std::string op = parse.GetName();
2928 std::string ref = parse.GetReference();
2929 MpePtrMap::iterator e = m_mpeMap.find(ref);
2930 if (e == m_mpeMap.end()) {
2931 parseStr += "Unknown sub element reference to " + token + "\n";
2932 return false;
2933 }
2934 if (e->second.m_nIndex<0) {
2935 if (e->second.m_ptr) {
2936 m_mpeList.push_back(CIccMpePtr(e->second.m_ptr, m_nNextMpe));
2937 e->second.m_ptr = NULL;
2938 e->second.m_nIndex = m_nNextMpe;
2939 m_nNextMpe++;
2940 }
2941 else {
2942 parseStr += "Invalid sub-element reference: " + token + "\n";
2943 return false;
2944 }
2945 }
2946 char idx[80];
2947 sprintf(idx, "(%d)", e->second.m_nIndex);
2948 flatStr += op + idx + " ";
2949 }
2950 else {
2951 flatStr += tok;
2952 flatStr += " ";
2953 }
2954 }
2955
2956 return true;
2957}
unsigned short icUInt16Number
Definition icProfileHeader.h:256
std::map< std::string, IndexSizePair > ChanVarMap
Definition IccMpeXml.h:283
Definition IccMpeCalc.h:323
Definition IccMpeXml.h:258
Definition IccMpeXml.h:271
ChanVarMap m_outputMap
Definition IccMpeXml.h:327
TempDeclVarMap m_macroLocalMap
Definition IccMpeXml.h:340
bool Flatten(std::string &flatStr, std::string macroName, const char *szFunc, std::string &parseStr, icUInt32Number nLocalsOffset=0)
Definition IccMpeXml.cpp:2659
ChanVarMap m_inputMap
Definition IccMpeXml.h:326

References CIccFuncTokenizer::CIccFuncTokenizer(), CIccMpePtr::CIccMpePtr(), CIccTempVar::CIccTempVar(), Flatten(), CIccFuncTokenizer::GetIndex(), CIccFuncTokenizer::GetLast(), CIccFuncTokenizer::GetName(), CIccFuncTokenizer::GetNext(), CIccFuncTokenizer::GetReference(), m_declVarMap, m_inputMap, m_macroLocalMap, m_macroMap, CIccTempDeclVar::m_members, m_mpeList, m_mpeMap, CIccTempVar::m_name, CIccMpePtr::m_nIndex, CIccMultiProcessElement::m_nInputChannels, m_nNextMpe, m_nNextVar, CIccMultiProcessElement::m_nOutputChannels, m_outputMap, CIccTempVar::m_pos, CIccTempDeclVar::m_pos, CIccMpePtr::m_ptr, CIccTempVar::m_size, CIccTempDeclVar::m_size, and m_varMap.

Referenced by Flatten(), and ParseXml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetBAcsSig()

virtual icAcsSignature CIccMultiProcessElement::GetBAcsSig ( )
inlinevirtualinherited

Reimplemented in CIccMpeBAcs.

178{ return icSigAcsZero; }
#define icSigAcsZero
Definition icProfileHeader.h:1100

Referenced by CIccMpeAcs::Describe().

+ Here is the caller graph for this function:

◆ GetClassName()

virtual const char * CIccMpeXmlCalculator::GetClassName ( ) const
inlinevirtual

Reimplemented from CIccMpeCalculator.

307{ return "CIccMpeXmlCalculator"; }

◆ GetEAcsSig()

virtual icAcsSignature CIccMultiProcessElement::GetEAcsSig ( )
inlinevirtualinherited

Reimplemented in CIccMpeEAcs.

179{ return icSigAcsZero; }

◆ GetElem()

CIccMultiProcessElement * CIccMpeCalculator::GetElem ( icSigCalcOp  opsig,
icUInt16Number  index 
)
inherited

Name: CIccMpeCalculator::GetSubApply

Purpose:

Args:

Return:

4914{
4915 if (m_SubElem && index<m_nSubElem) {
4916 CIccMultiProcessElement *pMpe = m_SubElem[index];
4917 if (opsig==icSigApplyElemOp)
4918 return pMpe;
4919
4920 if ((opsig==icSigApplyCurvesOp && pMpe->GetType() != icSigCurveSetElemType) ||
4921 (opsig==icSigApplyMatrixOp && pMpe->GetType() != icSigMatrixElemType) ||
4922 (opsig==icSigApplyCLutOp && !(pMpe->GetType() == icSigCLutElemType || pMpe->GetType() == icSigExtCLutElemType)) ||
4923 (opsig==icSigApplyTintOp && pMpe->GetType() != icSigTintArrayElemType) ||
4924 (opsig==icSigApplyToJabOp && pMpe->GetType() != icSigXYZToJabElemType) ||
4925 (opsig==icSigApplyFromJabOp && pMpe->GetType() != icSigJabToXYZElemType) ||
4926 (opsig==icSigApplyCalcOp && pMpe->GetType() != icSigCalculatorElemType))
4927 return NULL;
4928
4929 return pMpe;
4930 }
4931
4932 return NULL;
4933}
@ icSigCurveSetElemType
Definition icProfileHeader.h:643
@ icSigCLutElemType
Definition icProfileHeader.h:645
@ icSigExtCLutElemType
Definition icProfileHeader.h:650
@ icSigTintArrayElemType
Definition icProfileHeader.h:654
@ icSigXYZToJabElemType
Definition icProfileHeader.h:651
@ icSigJabToXYZElemType
Definition icProfileHeader.h:652
@ icSigMatrixElemType
Definition icProfileHeader.h:644
@ icSigCalculatorElemType
Definition icProfileHeader.h:649
@ icSigApplyFromJabOp
Definition IccMpeCalc.h:134
@ icSigApplyCLutOp
Definition IccMpeCalc.h:131
@ icSigApplyCurvesOp
Definition IccMpeCalc.h:129
@ icSigApplyElemOp
Definition IccMpeCalc.h:136
@ icSigApplyToJabOp
Definition IccMpeCalc.h:133
@ icSigApplyTintOp
Definition IccMpeCalc.h:132
@ icSigApplyCalcOp
Definition IccMpeCalc.h:135
@ icSigApplyMatrixOp
Definition IccMpeCalc.h:130
Definition IccTagMPE.h:146
virtual icElemTypeSignature GetType() const =0

References CIccMultiProcessElement::GetType(), icSigApplyCalcOp, icSigApplyCLutOp, icSigApplyCurvesOp, icSigApplyElemOp, icSigApplyFromJabOp, icSigApplyMatrixOp, icSigApplyTintOp, icSigApplyToJabOp, icSigCalculatorElemType, icSigCLutElemType, icSigCurveSetElemType, icSigExtCLutElemType, icSigJabToXYZElemType, icSigMatrixElemType, icSigTintArrayElemType, icSigXYZToJabElemType, CIccMpeCalculator::m_nSubElem, and CIccMpeCalculator::m_SubElem.

Referenced by SIccCalcOp::ArgsPushed(), SIccCalcOp::ArgsUsed(), and SIccCalcOp::IsValidOp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetExtClassName()

virtual const char * CIccMpeXml::GetExtClassName ( )
inlinevirtualinherited

Implements IIccExtensionMpe.

84{ return "CIccMpeXml"; }

◆ GetExtension()

virtual IIccExtensionMpe * CIccMpeXmlCalculator::GetExtension ( )
inlinevirtual

Reimplemented from CIccMultiProcessElement.

309{ return this; }

◆ GetNewApply()

CIccApplyMpe * CIccMpeCalculator::GetNewApply ( CIccApplyTagMpe pApplyTag)
virtualinherited

Name: CIccMpeCalculator::Begin

Purpose:

Args:

Return:

Reimplemented from CIccMultiProcessElement.

4735{
4736 CIccApplyTagMpe *pApplyTagEx = (CIccApplyTagMpe*)pApplyTag;
4737
4739
4740 if (!pApply)
4741 return NULL;
4742
4743 if (m_nTempChannels) {
4744 pApply->m_temp = (icFloatNumber*)malloc(m_nTempChannels*sizeof(icFloatNumber));
4745 }
4746 pApply->m_stack = new CIccFloatVector;
4747 pApply->m_scratch = new CIccFloatVector;
4748 pApply->m_scratch->resize(50);
4750
4752
4753 pApply->m_nSubElem = m_nSubElem;
4754 if(m_nSubElem) {
4755 pApply->m_SubElem = (CIccSubCalcApply **)calloc(m_nSubElem, sizeof(CIccSubCalcApply*));
4756
4757 if (m_SubElem) {
4758 for (i=0; i<m_nSubElem; i++) {
4759 if (m_SubElem[i]) {
4760 pApply->m_SubElem[i] = new CIccSubCalcApply(m_SubElem[i]->GetNewApply(pApplyTag));
4761 }
4762 }
4763 }
4764 }
4765 else {
4766 m_SubElem=NULL;
4767 }
4768 return pApply;
4769}
std::vector< icFloatNumber > CIccFloatVector
Definition IccMpeCalc.h:263
Definition IccTagMPE.h:321
Definition IccMpeCalc.h:424
virtual CIccApplyMpe * GetNewApply(CIccApplyTagMpe *pApplyTag)
Definition IccMpeCalc.cpp:4734
icUInt32Number m_nSubElem
Definition IccMpeCalc.h:537
CIccSubCalcApply ** m_SubElem
Definition IccMpeCalc.h:538
CIccFloatVector * m_stack
Definition IccMpeCalc.h:528
CIccFloatVector * m_scratch
Definition IccMpeCalc.h:529
IIccCmmEnvVarLookup * m_pCmmEnvVarLookup
Definition IccMpeCalc.h:540

References CIccApplyMpeCalculator::CIccApplyMpeCalculator(), CIccSubCalcApply::CIccSubCalcApply(), CIccMultiProcessElement::GetNewApply(), CIccMpeCalculator::m_nSubElem, CIccApplyMpeCalculator::m_nSubElem, CIccMpeCalculator::m_nTempChannels, CIccMpeCalculator::m_pCmmEnvVarLookup, CIccApplyMpeCalculator::m_pCmmEnvVarLookup, CIccApplyMpeCalculator::m_scratch, CIccApplyMpeCalculator::m_stack, CIccMpeCalculator::m_SubElem, CIccApplyMpeCalculator::m_SubElem, and CIccApplyMpeCalculator::m_temp.

Referenced by CIccSampledCalculatorCurve::Begin().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetType()

virtual icElemTypeSignature CIccMpeCalculator::GetType ( ) const
inlinevirtualinherited

Implements CIccMultiProcessElement.

463{ return icSigCalculatorElemType; }

References icSigCalculatorElemType.

Referenced by CIccMpeCalculator::Validate(), and CIccMpeCalculator::Write().

+ Here is the caller graph for this function:

◆ IsAcs()

virtual bool CIccMultiProcessElement::IsAcs ( )
inlinevirtualinherited

Reimplemented in CIccMpeAcs.

177{ return false; }

Referenced by CIccTagMultiProcessElement::Apply().

+ Here is the caller graph for this function:

◆ IsLateBinding()

bool CIccMpeCalculator::IsLateBinding ( ) const
virtualinherited

Name: CIccMpeCalculator::IsLateBinding

Purpose:

Args:

Return:

Reimplemented from CIccMultiProcessElement.

4865{
4867
4868 if (m_SubElem) {
4869 for (i=0; i<m_nSubElem; i++) {
4870 if (m_SubElem[i] && m_SubElem[i]->IsLateBinding())
4871 return true;
4872 }
4873 }
4874
4875 return false;
4876}
virtual bool IsLateBinding() const
Definition IccMpeCalc.cpp:4864

References CIccMultiProcessElement::IsLateBinding(), CIccMpeCalculator::m_nSubElem, and CIccMpeCalculator::m_SubElem.

+ Here is the call graph for this function:

◆ IsLateBindingReflectance()

bool CIccMpeCalculator::IsLateBindingReflectance ( ) const
virtualinherited

Name: CIccMpeCalculator::IsLateBindingReflectance

Purpose:

Args:

Return:

Reimplemented from CIccMultiProcessElement.

4889{
4891
4892 if (m_SubElem) {
4893 for (i=0; i<m_nSubElem; i++) {
4895 return true;
4896 }
4897 }
4898
4899 return false;
4900}
virtual bool IsLateBindingReflectance() const
Definition IccMpeCalc.cpp:4888

References CIccMultiProcessElement::IsLateBindingReflectance(), CIccMpeCalculator::m_nSubElem, and CIccMpeCalculator::m_SubElem.

+ Here is the call graph for this function:

◆ IsSupported()

virtual bool CIccMultiProcessElement::IsSupported ( )
inlinevirtualinherited

Reimplemented in CIccMpeUnknown.

162{ return true; }

Referenced by CIccTagMultiProcessElement::IsSupported().

+ Here is the caller graph for this function:

◆ NewCopy()

virtual CIccMpeCalculator * CIccMpeCalculator::NewCopy ( ) const
inlinevirtualinherited

Implements CIccMultiProcessElement.

452{ return new CIccMpeCalculator(*this);}
Definition IccMpeCalc.h:447

References CIccMpeCalculator::CIccMpeCalculator().

Referenced by CIccSampledCalculatorCurve::CIccSampledCalculatorCurve(), and CIccSampledCalculatorCurve::operator=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NumInputChannels()

◆ NumOutputChannels()

◆ ParseChanMap()

bool CIccMpeXmlCalculator::ParseChanMap ( ChanVarMap chanMap,
const char *  szNames,
int  nChannels 
)
protected
3030{
3031 chanMap.clear();
3032
3033 if (!szNames)
3034 return false;
3035
3036 int i;
3037 const char *ptr;
3038 std::string name;
3039 IndexSizePair isp;
3040 int size = 1;
3041
3042 for (i = 0, ptr = szNames; *ptr && i < nChannels; ptr++) {
3043 bool bFirst = name.empty();
3044 if (*ptr == ' ') {
3045 if (!bFirst) {
3046 isp.first = i;
3047 isp.second = size;
3048 chanMap[name] = isp;
3049 name.clear();
3050 i += size;
3051 size = 1;
3052 }
3053 }
3054 else if (*ptr == '[' || *ptr == '(') {
3055 size = atoi(ptr + 1);
3056 if (size<0 || i + size>nChannels)
3057 return 0;
3058
3059 for (; *ptr && *ptr != ']' && *ptr != ')'; ptr++);
3060 if (!*ptr)
3061 ptr--;
3062 }
3063 else if (validNameChar(*ptr, bFirst)) {
3064 name += *ptr;
3065 }
3066 else {
3067 return false;
3068 }
3069 }
3070
3071 if (!name.empty() && i < nChannels) {
3072 isp.first = i;
3073 isp.second = size;
3074 chanMap[name] = isp;
3075 }
3076
3077 return true;
3078}
std::pair< int, int > IndexSizePair
Definition IccMpeXml.h:282
static bool validNameChar(char c, bool bFirst)
Definition IccMpeXml.cpp:2316

References validNameChar().

Referenced by ParseXml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseImport()

bool CIccMpeXmlCalculator::ParseImport ( xmlNode *  pNode,
std::string  importPath,
std::string &  parseStr 
)
2342{
2343 xmlNode *pChild, *pNext;
2344 xmlAttr *attr;
2345
2346 pChild = icXmlFindNode(pNode->children, "Imports");
2347 if (pChild) {
2348 for (pNext = pChild->children; pNext; pNext = pNext->next) {
2349 if (pNext->type == XML_ELEMENT_NODE) {
2350 if (!strcmp((icChar*)pNext->name, "Import")) {
2351 if ((attr = icXmlFindAttr(pNext, "Filename"))) {
2352 std::string file = icXmlAttrValue(attr);
2353 xmlDoc *doc = NULL;
2354 xmlNode *root_element = NULL;
2355
2356 std::string look = "*";
2357 look += file;
2358 look += "*";
2359
2360 if (strstr(importPath.c_str(), look.c_str())) {
2361 //Already imported this file
2362 continue;
2363 }
2364
2365 /*parse the file and get the DOM */
2366 doc = xmlReadFile(file.c_str(), NULL, 0);
2367
2368 if (doc == NULL) {
2369 parseStr += "Unable to import '";
2370 parseStr += file;
2371 parseStr += '\n';
2372 return false;
2373 }
2374
2375 /*Get the root element node */
2376 root_element = xmlDocGetRootElement(doc);
2377 if (strcmp((icChar*)root_element->name, "IccCalcImport")) {
2378 parseStr += "Invalid calc element import file '" + file + "'\n";
2379 return false;
2380 }
2381
2382 bool rv = ParseImport(root_element, importPath+file+"*", parseStr);
2383
2384 xmlFreeDoc(doc);
2385 }
2386 else {
2387 parseStr += "Missing import file specifier\n";
2388 return false;
2389 }
2390 }
2391 else {
2392 parseStr += "Invalid import specifier\n";
2393 return false;
2394 }
2395 }
2396 }
2397 }
2398
2399 pChild = icXmlFindNode(pNode->children, "Variables");
2400 if (pChild) {
2401 for (pNext = pChild->children; pNext; pNext = pNext->next) {
2402 if (pNext->type == XML_ELEMENT_NODE) {
2403 if (!strcmp((icChar*)pNext->name, "Declare")) {
2404 if ((attr = icXmlFindAttr(pNext, "Name"))) {
2405 std::string name = icXmlAttrValue(attr);
2406 if (!validName(name.c_str())) {
2407 parseStr += "Invalid calc element variable name '" + name + "'\n'";
2408 return false;
2409 }
2410
2411 TempDeclVarMap::iterator v = m_declVarMap.find(name);
2412 if (v != m_declVarMap.end()) {
2413 parseStr += "Calc element variable '" + name + "' was previously declared\n";
2414 return false;
2415 }
2416 int offset = -1;
2417 icUInt16Number size = 1;
2418
2419 if ((attr = icXmlFindAttr(pNext, "Position"))) {
2420 offset = atoi(icXmlAttrValue(attr));
2421 if (offset && importPath != "*") {
2422 parseStr += "Position cannot be specified for imported variables";
2423 return false;
2424 }
2425 }
2426 if ((attr = icXmlFindAttr(pNext, "Size"))) {
2427 size = (icUInt16Number)atoi(icXmlAttrValue(attr));
2428 }
2429 if (size < 1) size = 1;
2430
2431 CIccTempDeclVar var = CIccTempDeclVar(name, offset, size);
2432 if (pNext->children && pNext->children->content) {
2433 CIccFuncTokenizer parse((icChar*)pNext->children->content);
2434 offset = 0;
2435
2436 while (parse.GetNext()) {
2437 icUInt16Number extra = 0;
2438 std::string member = parse.GetName();
2439 if (!validName(member.c_str())) {
2440 parseStr += "Invalid member name '" + member + "' for calc element variable '" + name + "'\n";
2441 return false;
2442 }
2443 size = 0; extra = 0;
2444 parse.GetIndex(size, extra, 1, 0);
2445 size++;
2446 if (size < 1)
2447 size = 1;
2448
2449 var.m_members.push_back(CIccTempVar(member, offset, size));
2450 offset += size;
2451 }
2452 if (var.m_size < offset)
2453 var.m_size = offset;
2454 }
2455 m_declVarMap[name] = var;
2456 }
2457 else {
2458 parseStr += "Missing calc element variable name definition\n";
2459 return false;
2460 }
2461 }
2462 else {
2463 parseStr += "Invalid calc element variable declaration\n";
2464 return false;
2465 }
2466 }
2467 }
2468 }
2469
2470 pChild = icXmlFindNode(pNode->children, "Macros");
2471 if (pChild) {
2472 for (pNext = pChild->children; pNext; pNext = pNext->next) {
2473 if (pNext->type == XML_ELEMENT_NODE) {
2474 if (!strcmp((icChar*)pNext->name, "Macro")) {
2475 if ((attr = icXmlFindAttr(pNext, "Name"))) {
2476 std::string name = icXmlAttrValue(attr);
2477 if (!validName(name.c_str())) {
2478 parseStr += "Invalid Macro name '" + name + "'\n'";
2479 return false;
2480 }
2481 if (!pNext->children || !pNext->children->content || !pNext->children->content[0]) {
2482 parseStr += "Missing content for macro '" + name + "'\n'";
2483 return false;
2484 }
2485 MacroMap::iterator m = m_macroMap.find(name);
2486 if (m != m_macroMap.end()) {
2487 if (!strcmp(m->second.c_str(), (icChar*)pNext->children->content))
2488 continue;
2489 parseStr += "Calc Element macro '" + name + "' was previously defined differently\n";
2490 return false;
2491 }
2492 m_macroMap[name] = (icChar*)(pNext->children->content);
2493
2494 if ((attr = icXmlFindAttr(pNext, "Local"))) {
2495 icUInt16Number offset, size;
2496 CIccTempDeclVar var = CIccTempDeclVar(name, 0, 0);
2497 std::string locals = icXmlAttrValue(attr);
2498 CIccFuncTokenizer parse(locals.c_str());
2499 offset = 0;
2500
2501 while (parse.GetNext()) {
2502 icUInt16Number extra = 0;
2503 std::string member = parse.GetName();
2504 if (!validName(member.c_str())) {
2505 parseStr += "Invalid local name '" + member + "' for calc element macro '" + name + "'\n";
2506 return false;
2507 }
2508 size = 0; extra = 0;
2509 parse.GetIndex(size, extra, 1, 0);
2510 size++;
2511 if (size < 1)
2512 size = 1;
2513
2514 var.m_members.push_back(CIccTempVar(member, offset, size));
2515 offset += size;
2516 }
2517 if (var.m_size < offset)
2518 var.m_size = offset;
2519
2520 m_macroLocalMap[name] = var;
2521 }
2522 }
2523 else {
2524 parseStr += "Missing macro name\n";
2525 return false;
2526 }
2527 }
2528 else {
2529 parseStr += "Invalid macro declaration\n";
2530 return false;
2531 }
2532 }
2533 }
2534 }
2535
2536 pChild = icXmlFindNode(pNode->children, "SubElements");
2537 if (pChild) {
2538 for (pNext = pChild->children; pNext; pNext = pNext->next) {
2539 if (pNext->type == XML_ELEMENT_NODE) {
2540 std::string name;
2541
2542 if ((attr = icXmlFindAttr(pNext, "Name"))) {
2543 name = icXmlAttrValue(attr);
2544 if (!validName(name.c_str())) {
2545 parseStr += "Invalid SubElement name '" + name + "'\n'";
2546 return false;
2547 }
2548 }
2549 if (name.empty()) {
2550 if (importPath != "*") {
2551 parseStr += "Imported Calc SubElments must be named.";
2552 return false;
2553 }
2554 }
2555 else {
2556 MpePtrMap::iterator se = m_mpeMap.find(name);
2557 if (se != m_mpeMap.end()) {
2558 parseStr += "Duplicate declaration of SubElement '" + name + "'\n";
2559 return false;
2560 }
2561 }
2562
2564
2565 if (!pMpe) {
2566 parseStr += std::string("Unknown Sub-Element Type (") + (const icChar*)pNext->name + ")\n";
2567 return false;
2568 }
2569
2570 if (!strcmp(pMpe->GetClassName(), "CIccMpeXmlCalculator")) {
2571 CIccMpeXmlCalculator *pSubCalc = (CIccMpeXmlCalculator*)pMpe;
2572 pSubCalc->m_sImport = importPath;
2573 }
2574
2575 xmlAttr *attr;
2576 IIccExtensionMpe *pExt = pMpe->GetExtension();
2577
2578 if (pExt) {
2579 if (!strcmp(pExt->GetExtClassName(), "CIccMpeXml")) {
2580 CIccMpeXml* pXmlMpe = (CIccMpeXml*)pExt;
2581
2582 if (pXmlMpe->ParseXml(pNext, parseStr)) {
2583 if ((attr = icXmlFindAttr(pNode, "Reserved"))) {
2584 sscanf(icXmlAttrValue(attr), "%u", &pMpe->m_nReserved);
2585 }
2586
2587 if (name.empty()) {
2588 m_mpeList.push_back(CIccMpePtr(pMpe, m_nNextMpe));
2589 m_nNextMpe++;
2590 }
2591 else {
2592 m_mpeMap[name] = CIccMpePtr(pMpe);
2593 }
2594 }
2595 else {
2596 char str[100];
2597 sprintf(str, " starting on line %d", pNext->line);
2598 parseStr += std::string("Unable to parse element of type ") + pMpe->GetClassName() + str + "\n";
2599 delete pMpe;
2600 return false;
2601 }
2602 }
2603 else {
2604 parseStr += std::string("Element ") + pMpe->GetClassName() + "isn't of type CIccMpeXml\n";
2605 delete pMpe;
2606 return false;
2607 }
2608 }
2609 else {
2610 parseStr += std::string("Element ") + pMpe->GetClassName() + "isn't of type CIccMpeXml\n";
2611 delete pMpe;
2612 return false;
2613 }
2614 }
2615 }
2616 }
2617 return true;
2618}
xmlAttr * icXmlFindAttr(xmlNode *pNode, const char *szAttrName)
Definition IccUtilXml.cpp:669
xmlNode * icXmlFindNode(xmlNode *pNode, const char *szNodeName)
Definition IccUtilXml.cpp:687
const char * icXmlAttrValue(xmlAttr *attr, const char *szDefault="")
Definition IccUtilXml.cpp:572
Definition IccTagMPE.h:133
virtual const char * GetExtClassName()=0
virtual IIccExtensionMpe * GetExtension()
Definition IccTagMPE.h:182
virtual const icChar * GetClassName() const =0
icUInt32Number m_nReserved
Definition IccTagMPE.h:188
static CIccMultiProcessElement * CreateElement(const icChar *szElementNodeName)
Definition IccTagXml.cpp:3976
Definition IccMpeXml.h:77
virtual bool ParseXml(xmlNode *pNode, std::string &parseStr)=0
Definition IccMpeXml.h:286
icUInt16Number m_size
Definition IccMpeXml.h:292
TempVarList m_members
Definition IccMpeXml.h:294
Definition IccMpeXml.h:302
bool ParseImport(xmlNode *pNode, std::string importPath, std::string &parseStr)
Definition IccMpeXml.cpp:2341
static bool validName(const char *saName)
Definition IccMpeXml.cpp:2326

References CIccFuncTokenizer::CIccFuncTokenizer(), CIccMpePtr::CIccMpePtr(), CIccTempDeclVar::CIccTempDeclVar(), CIccTempVar::CIccTempVar(), CIccTagXmlMultiProcessElement::CreateElement(), CIccMultiProcessElement::GetClassName(), IIccExtensionMpe::GetExtClassName(), CIccMultiProcessElement::GetExtension(), CIccFuncTokenizer::GetIndex(), CIccFuncTokenizer::GetName(), CIccFuncTokenizer::GetNext(), icXmlAttrValue(), icXmlFindAttr(), icXmlFindNode(), m_declVarMap, m_macroLocalMap, m_macroMap, CIccTempDeclVar::m_members, m_mpeList, m_mpeMap, m_nNextMpe, CIccMultiProcessElement::m_nReserved, m_sImport, CIccTempDeclVar::m_size, ParseImport(), CIccMpeXml::ParseXml(), and validName().

Referenced by ParseImport(), and ParseXml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseXml()

bool CIccMpeXmlCalculator::ParseXml ( xmlNode *  pNode,
std::string &  parseStr 
)
virtual

Implements CIccMpeXml.

3081{
3082 xmlNode *pChild;
3083
3084 SetSize(atoi(icXmlAttrValue(pNode, "InputChannels")),
3085 atoi(icXmlAttrValue(pNode, "OutputChannels")));
3086
3087 clean();
3088
3089 if (!ParseChanMap(m_inputMap, icXmlAttrValue(pNode, "InputNames"), m_nInputChannels)) {
3090 parseStr += "Invalid name for InputChannels";
3091 return false;
3092 }
3093
3094 if (!ParseChanMap(m_outputMap, icXmlAttrValue(pNode, "OutputNames"), m_nOutputChannels)) {
3095 parseStr += "Invalid name for InputChannels";
3096 return false;
3097 }
3098
3099 if (!ParseImport(pNode, "*", parseStr))
3100 return false;
3101
3102 if (!ValidateMacroCalls(parseStr)) {
3103 return false;
3104 }
3105
3106 pChild = icXmlFindNode(pNode->children, "MainFunction");
3107 if (pChild && pNode->children && pChild->children->content) {
3108 char *content = (char*)pChild->children->content;
3109 std::string flatFunc;
3110
3111 //Move new variables to after allocated variables
3112 TempDeclVarMap::iterator declVar;
3113 for (declVar = m_declVarMap.begin(); declVar != m_declVarMap.end(); declVar++) {
3114 if (declVar->second.m_pos >= 0) {
3115 int next = declVar->second.m_pos + declVar->second.m_size;
3116 if (next > m_nNextVar)
3117 m_nNextVar = next;
3118 }
3119 }
3120
3121 if (!Flatten(flatFunc, "", content, parseStr, 0)) {
3122 return false;
3123 }
3124
3125 if (m_macroLocalMap.size()) {
3126 std::string localFunc;
3127 if (!UpdateLocals(localFunc, flatFunc, parseStr, m_nNextVar)) {
3128 return false;
3129 }
3130 flatFunc = localFunc;
3131 }
3132 //copy MPE subelmeents used by Main Function to returned object
3133 int n;
3134 MpePtrList::iterator m;
3135 for (m = m_mpeList.begin(), n = 0; m != m_mpeList.end(); m++, n++) {
3136 this->SetSubElem(n, m->m_ptr);
3137 m->m_ptr = NULL;
3138 }
3139
3140#if 0
3141 FILE *ff = fopen("flatfunc.txt", "wb");
3142 fwrite(flatFunc.c_str(), flatFunc.size(), 1, ff);
3143 fclose(ff);
3144#endif
3145
3146 icFuncParseStatus stat = SetCalcFunc(flatFunc.c_str(), parseStr);
3147 if (stat!=icFuncParseNoError) {
3148 char buf[65];
3149 int len = icIntMin(64, (int)strlen(flatFunc.c_str()));
3150 strncpy(buf, flatFunc.c_str(), len);
3151 buf[len]=0;
3152
3153 switch(stat) {
3155 parseStr += "Syntax Error occurred while parsing Main Calculator Function from \"";
3156 break;
3158 parseStr += "Invalid Operation found while parsing Main Calculator Function from \"";
3159 break;
3161 parseStr += "Stack underflow detected while parsing Main Calculator Function from \"";
3162 break;
3164 parseStr += "Invalid Channel detected while parsing Main Calculator Function from \"";
3165 break;
3166 default:
3167 parseStr += "Unable to parse Main Calculator Function from \"";
3168 }
3169 parseStr += buf;
3170 parseStr += "\"\n";
3171 return false;
3172 }
3173 }
3174 clean();
3175
3176 return true;
3177}
icFuncParseStatus
Definition IccMpeCalc.h:308
@ icFuncParseSyntaxError
Definition IccMpeCalc.h:310
@ icFuncParseNoError
Definition IccMpeCalc.h:309
@ icFuncParseStackUnderflow
Definition IccMpeCalc.h:312
@ icFuncParseInvalidOperation
Definition IccMpeCalc.h:311
@ icFuncParseInvalidChannel
Definition IccMpeCalc.h:314
ICCPROFLIB_API icUInt32Number icIntMin(icUInt32Number v1, icUInt32Number v2)
Definition IccUtil.cpp:908
icFuncParseStatus SetCalcFunc(icCalculatorFuncPtr newFunc)
Definition IccMpeCalc.cpp:4376
void SetSize(icUInt16Number nInputChannels, icUInt16Number nOutputChannels)
Definition IccMpeCalc.cpp:4344
bool SetSubElem(icUInt32Number idx, CIccMultiProcessElement *pElem)
Definition IccMpeCalc.h:461
bool ParseChanMap(ChanVarMap &chanMap, const char *szNames, int nChannels)
Definition IccMpeXml.cpp:3029
bool UpdateLocals(std::string &func, std::string szFunc, std::string &parseStr, int nLocalsOffset)
Definition IccMpeXml.cpp:2959
bool ValidateMacroCalls(std::string &parseStr) const
Definition IccMpeXml.cpp:2647

References clean(), Flatten(), icFuncParseInvalidChannel, icFuncParseInvalidOperation, icFuncParseNoError, icFuncParseStackUnderflow, icFuncParseSyntaxError, icIntMin(), icXmlAttrValue(), icXmlFindNode(), m_declVarMap, m_inputMap, m_macroLocalMap, m_mpeList, CIccMultiProcessElement::m_nInputChannels, m_nNextVar, CIccMultiProcessElement::m_nOutputChannels, m_outputMap, CIccTempDeclVar::m_pos, CIccMpePtr::m_ptr, CIccTempDeclVar::m_size, ParseChanMap(), ParseImport(), CIccMpeCalculator::SetCalcFunc(), CIccMpeCalculator::SetSize(), CIccMpeCalculator::SetSubElem(), UpdateLocals(), and ValidateMacroCalls().

Referenced by CIccSampledCalculatorCurveXml::ParseXml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Read()

bool CIccMpeCalculator::Read ( icUInt32Number  size,
CIccIO pIO 
)
virtualinherited

Name: CIccMpeCalculator::Read

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

4475{
4477
4478 icUInt32Number startPos = pIO->Tell();
4479
4480 icUInt32Number headerSize = sizeof(icTagTypeSignature) +
4481 sizeof(icUInt32Number) +
4482 sizeof(icUInt16Number) +
4483 sizeof(icUInt16Number) +
4484 sizeof(icUInt16Number) +
4485 sizeof(icUInt16Number) +
4486 sizeof(icUInt16Number) +
4487 sizeof(icUInt16Number);
4488
4489 if (headerSize > size)
4490 return false;
4491
4492 if (!pIO) {
4493 return false;
4494 }
4495
4496 icUInt16Number nInputChannels, nOutputChannels;
4497
4498 if (!pIO->Read32(&sig))
4499 return false;
4500
4501 if (!pIO->Read32(&m_nReserved))
4502 return false;
4503
4504 if (!pIO->Read16(&nInputChannels))
4505 return false;
4506
4507 if (!pIO->Read16(&nOutputChannels))
4508 return false;
4509
4510 SetSize(nInputChannels, nOutputChannels);
4511
4512 icUInt32Number nSubElem;
4513
4514 if (!pIO->Read32(&nSubElem))
4515 return false;
4516
4517 icUInt32Number nPos = nSubElem + 1;
4518
4519 if (headerSize + (icUInt64Number)nPos*sizeof(icPositionNumber) > size) {
4520 return false;
4521 }
4522
4523 icPositionNumber *pos, *posvals = (icPositionNumber*)malloc(nPos*sizeof(icPositionNumber));
4524 if (!posvals) {
4525 return false;
4526 }
4527
4528 icUInt32Number n = nPos * (sizeof(icPositionNumber)/sizeof(icUInt32Number));
4529 if (pIO->Read32(posvals, n)!=n) {
4530 free(posvals);
4531 return false;
4532 }
4533
4534 pos = &posvals[1];
4535 if (nSubElem) {
4536 icElemTypeSignature elemSig;
4537
4538 SetSubElem(nSubElem-1, NULL); //Initialize array
4539
4540 for (n=0; n<nSubElem; n++) {
4541 if (pos->offset + pos->size > size) {
4542 free(posvals);
4543 return false;
4544 }
4545 pIO->Seek(startPos + pos->offset, icSeekSet);
4546
4547 if (!pIO->Read32(&elemSig)) {
4548 free(posvals);
4549 return false;
4550 }
4551
4553 if (!pElem) {
4554 free(posvals);
4555 return false;
4556 }
4557
4558 pIO->Seek(startPos + pos->offset, icSeekSet);
4559 if (!pElem->Read(pos->size, pIO)) {
4560 free(posvals);
4561 return false;
4562 }
4564 pos++;
4565 }
4566 }
4567
4568 m_calcFunc = new CIccCalculatorFunc(this);
4569 pos = posvals;
4570
4571 if (!m_calcFunc || pos->offset + pos->size > size) {
4572 free(posvals);
4573 return false;
4574 }
4575
4576 pIO->Seek(startPos + pos->offset, icSeekSet);
4577
4578 if (!m_calcFunc->Read(pos->size, pIO)) {
4579 return false;
4580 }
4581 free(posvals);
4582
4583 pIO->Seek(startPos + size, icSeekSet);
4584
4585 return true;
4586}
icElemTypeSignature
Definition icProfileHeader.h:641
icUInt32Number offset
Definition icProfileHeader.h:1461
icTagTypeSignature
Definition icProfileHeader.h:526
icUInt32Number icUInt64Number[2]
Definition icProfileHeader.h:268
icUInt32Number size
Definition icProfileHeader.h:1462
Definition icProfileHeader.h:1460
@ icSeekSet
Definition IccIO.h:83
icInt32Number Read16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:114
virtual icInt32Number Tell()
Definition IccIO.h:133
virtual icInt32Number Seek(icInt32Number nOffset, icSeekVal pos)
Definition IccIO.h:132
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:143
virtual bool Read(icUInt32Number size, CIccIO *pIO)=0
static CIccMultiProcessElement * Create(icElemTypeSignature sig)
Definition IccTagMPE.cpp:131
Definition IccMpeCalc.h:364
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Definition IccMpeCalc.cpp:3335

References CIccCalculatorFunc::CIccCalculatorFunc(), CIccMultiProcessElement::Create(), icSeekSet, CIccMpeCalculator::m_calcFunc, CIccMultiProcessElement::m_nReserved, icPositionNumber::offset, CIccCalculatorFunc::Read(), CIccMultiProcessElement::Read(), CIccIO::Read16(), CIccIO::Read32(), CIccIO::Seek(), CIccMpeCalculator::SetSize(), CIccMpeCalculator::SetSubElem(), icPositionNumber::size, and CIccIO::Tell().

Referenced by CIccSampledCalculatorCurve::Read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Reset()

void CIccMpeCalculator::Reset ( )
inlineinherited
455{ SetSize(0,0); }

References CIccMpeCalculator::SetSize().

+ Here is the call graph for this function:

◆ SetCalcFunc() [1/2]

icFuncParseStatus CIccMpeCalculator::SetCalcFunc ( const char *  szFuncDef,
std::string &  sReport 
)
inherited

Name: CIccMpeCalculator::SetCalcFunc

Purpose:

Args:

Return:

4397{
4398
4399 if (m_calcFunc) {
4400 delete m_calcFunc;
4401 m_calcFunc = NULL;
4402 }
4403
4404 CIccCalculatorFunc *pFunc = new CIccCalculatorFunc(this);
4405 icFuncParseStatus rv = pFunc->SetFunction(szFuncDef, sReport);
4406
4407 if (rv!=icFuncParseNoError) {
4408 delete pFunc;
4409 m_calcFunc = NULL;
4410
4411 return rv;
4412 }
4413
4414 m_calcFunc = pFunc;
4415
4416 return rv;
4417}
icFuncParseStatus SetFunction(const char *szFuncDef, std::string &sReport)
Definition IccMpeCalc.cpp:3276

References CIccCalculatorFunc::CIccCalculatorFunc(), icFuncParseNoError, CIccMpeCalculator::m_calcFunc, and CIccCalculatorFunc::SetFunction().

Referenced by ParseXml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetCalcFunc() [2/2]

icFuncParseStatus CIccMpeCalculator::SetCalcFunc ( icCalculatorFuncPtr  newChannelFunc)
inherited

Name: CIccMpeCalculator::SetCalcFunc

Purpose:

Args:

Return:

4377{
4378 if (m_calcFunc) {
4379 delete m_calcFunc;
4380 }
4381 m_calcFunc = newChannelFunc;
4382
4383 return icFuncParseNoError;
4384}

References icFuncParseNoError, and CIccMpeCalculator::m_calcFunc.

◆ SetElem()

bool CIccMpeCalculator::SetElem ( icUInt32Number  idx,
CIccMultiProcessElement pElem,
icUInt32Number count,
CIccMultiProcessElement ***  pArray 
)
protectedinherited

Name: CIccMpeCalculator::GetSubApply

Purpose:

Args:

Return:

4947{
4948 bool rv = true;
4949
4950 if (idx + 1 > count) {
4951 if (*pArray) {
4952 *pArray = (CIccMultiProcessElement**)icRealloc(*pArray, (idx + 1) * sizeof(CIccMultiProcessElement*));
4953
4954 if (!(*pArray))
4955 return false;
4956
4958 for (i = count; i <= idx; i++) {
4959 (*pArray)[i] = NULL;
4960 }
4961 }
4962 else {
4963 *pArray = (CIccMultiProcessElement**)calloc(idx + 1, sizeof(CIccMultiProcessElement*));
4964
4965 if (!(*pArray))
4966 return false;
4967 }
4968 count = idx + 1;
4969 }
4970 else if (!(*pArray))
4971 return false;
4972
4973 if ((*pArray)[idx]) {
4974 delete (*pArray)[idx];
4975 rv = false;
4976 }
4977
4978 (*pArray)[idx] = pElem;
4979
4980 return rv;
4981}
ICCPROFLIB_API void * icRealloc(void *ptr, size_t size)
Definition IccUtil.cpp:111

References icRealloc().

Referenced by CIccMpeCalculator::SetSubElem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetSize()

void CIccMpeCalculator::SetSize ( icUInt16Number  nInputChannels,
icUInt16Number  nOutputChannels 
)
inherited

Name: CIccMpeCalculator::SetSize

Purpose:

Args:

Return:

4345{
4346 if (m_calcFunc) {
4347 delete m_calcFunc;
4348 m_calcFunc = NULL;
4349 }
4351
4352 if (m_SubElem) {
4353 for (i=0; i<m_nSubElem; i++) {
4354 if (m_SubElem[i])
4355 delete m_SubElem[i];
4356 }
4357 free(m_SubElem);
4358 m_SubElem = NULL;
4359 m_nSubElem = 0;
4360 }
4361
4362 m_nInputChannels = nInputChannels;
4363 m_nOutputChannels = nOutputChannels;
4364}

References CIccMpeCalculator::m_calcFunc, CIccMultiProcessElement::m_nInputChannels, CIccMultiProcessElement::m_nOutputChannels, CIccMpeCalculator::m_nSubElem, and CIccMpeCalculator::m_SubElem.

Referenced by CIccMpeCalculator::~CIccMpeCalculator(), CIccMpeCalculator::operator=(), ParseXml(), CIccMpeCalculator::Read(), and CIccMpeCalculator::Reset().

+ Here is the caller graph for this function:

◆ SetSubElem()

bool CIccMpeCalculator::SetSubElem ( icUInt32Number  idx,
CIccMultiProcessElement pElem 
)
inlineinherited
461{ return SetElem(idx, pElem, m_nSubElem, &m_SubElem); }
bool SetElem(icUInt32Number idx, CIccMultiProcessElement *pElem, icUInt32Number &count, CIccMultiProcessElement ***pArray)
Definition IccMpeCalc.cpp:4946

References CIccMpeCalculator::m_nSubElem, CIccMpeCalculator::m_SubElem, and CIccMpeCalculator::SetElem().

Referenced by ParseXml(), and CIccMpeCalculator::Read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToXml()

bool CIccMpeXmlCalculator::ToXml ( std::string &  xml,
std::string  blanks = "" 
)
virtual

Implements CIccMpeXml.

2266{
2267 char line[256];
2268 std::string blanks2 = blanks + " ";
2269
2270 sprintf(line, "<CalculatorElement InputChannels=\"%d\" OutputChannels=\"%d\"", NumInputChannels(), NumOutputChannels());
2271 xml += blanks + line;
2272
2273 if (m_nReserved) {
2274 sprintf(line, " Reserved=\"%u\"", m_nReserved);
2275 xml += line;
2276 }
2277 xml += ">\n";
2278
2279 int i;
2280
2281 if (m_SubElem && m_nSubElem) {
2282 xml += blanks2 + "<SubElements>\n";
2283 for (i=0; i<(int)m_nSubElem; i++) {
2284 if (m_SubElem[i]) {
2286 if (pExt && !strcmp(pExt->GetExtClassName(), "CIccMpeXml")) {
2287 CIccMpeXml *pMpe = (CIccMpeXml*)pExt;
2288 pMpe->ToXml(xml, blanks2+" ");
2289 }
2290 else {
2291 return false;
2292 }
2293 }
2294 else {
2295 return false;
2296 }
2297 }
2298 xml += blanks2 + "</SubElements>\n";
2299 }
2300
2301 if (m_calcFunc) {
2302 std::string desc;
2303
2304 xml += blanks2 + "<MainFunction>\n";
2305
2306 m_calcFunc->Describe(desc, 100, (int)blanks2.size()+2);
2307 xml += desc;
2308
2309 xml+= blanks2 + "</MainFunction>\n";
2310 }
2311
2312 xml += blanks + "</CalculatorElement>\n";
2313 return true;
2314}
virtual icUInt16Number NumInputChannels() const
Definition IccTagMPE.h:159
virtual icUInt16Number NumOutputChannels() const
Definition IccTagMPE.h:160
virtual bool ToXml(std::string &xml, std::string blanks="")=0

References CIccCalculatorFunc::Describe(), IIccExtensionMpe::GetExtClassName(), CIccMultiProcessElement::GetExtension(), CIccMpeCalculator::m_calcFunc, CIccMultiProcessElement::m_nReserved, CIccMpeCalculator::m_nSubElem, CIccMpeCalculator::m_SubElem, CIccMultiProcessElement::NumInputChannels(), CIccMultiProcessElement::NumOutputChannels(), and CIccMpeXml::ToXml().

Referenced by CIccSampledCalculatorCurveXml::ToXml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateLocals()

bool CIccMpeXmlCalculator::UpdateLocals ( std::string &  func,
std::string  szFunc,
std::string &  parseStr,
int  nLocalsOffset 
)
protected
2960{
2961 func.clear();
2962 CIccFuncTokenizer parse(sFunc.c_str(), true);
2963
2964 while (parse.GetNext()) {
2965 std::string token = parse.GetLast();
2966 const char *tok = token.c_str();
2967
2968 if (!strncmp(tok, "lget[", 5) ||
2969 !strncmp(tok, "lput[", 5) ||
2970 !strncmp(tok, "lsav[", 5)) {
2971 std::string op = parse.GetName();
2972 int voffset, vsize;
2973
2974 CIccFuncTokenizer p2(tok+4);
2975 icUInt16Number _voffset = 0, _vsize = 1;
2976 p2.GetIndex(_voffset, _vsize, 0, 1);
2977 voffset = _voffset + nLocalsOffset;
2978 vsize = _vsize + 1;
2979
2980 if (voffset + vsize > 65535) {
2981 parseStr += "Local variable out of bounds - too many variables.\n";
2982 return false;
2983 }
2984
2985 char idx[80];
2986 if (vsize == 1) {
2987 sprintf(idx, "[%d]", voffset);
2988 }
2989 else {
2990 sprintf(idx, "[%d,%d]", voffset, vsize);
2991 }
2992 func +="t";
2993 func += op.substr(1);
2994 func += idx;
2995 func += " ";
2996 }
2997 else {
2998 func += tok;
2999 func += " ";
3000 }
3001 }
3002
3003 return true;
3004}

References CIccFuncTokenizer::CIccFuncTokenizer(), CIccFuncTokenizer::GetIndex(), CIccFuncTokenizer::GetLast(), CIccFuncTokenizer::GetName(), and CIccFuncTokenizer::GetNext().

Referenced by ParseXml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Validate()

icValidateStatus CIccMpeCalculator::Validate ( std::string  sigPath,
std::string &  sReport,
const CIccTagMultiProcessElement pMPE = NULL,
const CIccProfile pProfile = NULL 
) const
virtualinherited

Name: CIccMpeCalculator::Validate

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

4820{
4821 std::string mpeSigPath = sigPath + icGetSigPath(GetType());
4822 icValidateStatus rv = CIccMultiProcessElement::Validate(sigPath, sReport, pMPE, pProfile);
4823
4825
4826 if (m_SubElem) {
4827 for (i=0; i<m_nSubElem; i++) {
4828 if (m_SubElem[i])
4829 rv = icMaxStatus(rv, m_SubElem[i]->Validate(mpeSigPath, sReport, pMPE, pProfile));
4830 }
4831 }
4832
4833 bool empty=false;
4834 if (m_calcFunc) {
4835 rv = icMaxStatus(rv, m_calcFunc->Validate(mpeSigPath, sReport, this, pProfile));
4836 }
4837 else
4838 empty = true;
4839
4840 if (empty) {
4841 CIccInfo Info;
4842 std::string sSigPathName = Info.GetSigPathName(sigPath);
4843
4844 sReport += icMsgValidateCriticalError;
4845 sReport += sSigPathName;
4846 sReport += " - Has an Empty Calculator Functions!\n";
4848 }
4849
4850 return rv;
4851}
icValidateStatus
Definition IccDefs.h:119
@ icValidateCriticalError
Definition IccDefs.h:123
ICCPROFLIB_API std::string icGetSigPath(icUInt32Number sig)
Definition IccUtil.cpp:1191
ICCPROFLIB_API const char * icMsgValidateCriticalError
Definition IccUtil.cpp:92
ICCPROFLIB_API icValidateStatus icMaxStatus(icValidateStatus s1, icValidateStatus s2)
Definition IccUtil.cpp:244
Definition IccUtil.h:303
std::string GetSigPathName(std::string sigPath)
Definition IccUtil.cpp:1614
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const =0
Definition IccTagMPE.cpp:454
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccMpeCalculator *pChannelCalc=NULL, const CIccProfile *pProfile=NULL) const
Definition IccMpeCalc.cpp:3712
virtual icElemTypeSignature GetType() const
Definition IccMpeCalc.h:463
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
Definition IccMpeCalc.cpp:4819

References CIccInfo::GetSigPathName(), CIccMpeCalculator::GetType(), icGetSigPath(), icMaxStatus(), icMsgValidateCriticalError, icValidateCriticalError, CIccMpeCalculator::m_calcFunc, CIccMpeCalculator::m_nSubElem, CIccMpeCalculator::m_SubElem, CIccCalculatorFunc::Validate(), and CIccMultiProcessElement::Validate().

Referenced by CIccSampledCalculatorCurve::Validate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ValidateMacroCalls()

bool CIccMpeXmlCalculator::ValidateMacroCalls ( std::string &  parseStr) const
protected
2648{
2649 MacroMap::const_iterator m;
2650
2651 for (m = m_macroMap.begin(); m != m_macroMap.end(); m++) {
2652 if (!ValidMacroCalls(m->second.c_str(), "*", parseStr)) {
2653 return false;
2654 }
2655 }
2656 return true;
2657}
bool ValidMacroCalls(const char *szMacroText, std::string macroStack, std::string &parseStr) const
Definition IccMpeXml.cpp:2620

References m_macroMap, and ValidMacroCalls().

Referenced by ParseXml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ValidMacroCalls()

bool CIccMpeXmlCalculator::ValidMacroCalls ( const char *  szMacroText,
std::string  macroStack,
std::string &  parseStr 
) const
protected
2621{
2622 const char *ptr;
2623 for (ptr = strstr(szMacroText, "call{"); ptr; ptr = strstr(ptr, "call{")) {
2624 CIccFuncTokenizer parse(ptr, true);
2625 parse.GetNext();
2626
2627 std::string name = parse.GetReference();
2628 MacroMap::const_iterator m = m_macroMap.find(name);
2629 if (m == m_macroMap.end()) {
2630 parseStr += "Call to undefined macro '" + name + "'\n";
2631 return false;
2632 }
2633 std::string sm = "*";
2634 sm += name + "*";
2635 if (strstr(macroStack.c_str(), sm.c_str())) {
2636 parseStr += "Macro recursion detected in call to '" + name + "'\n";
2637 return false;
2638 }
2639 if (!ValidMacroCalls(m->second.c_str(), macroStack + name + "*", parseStr)) {
2640 return false;
2641 }
2642 ptr++;
2643 }
2644 return true;
2645}

References CIccFuncTokenizer::CIccFuncTokenizer(), CIccFuncTokenizer::GetNext(), CIccFuncTokenizer::GetReference(), m_macroMap, and ValidMacroCalls().

Referenced by ValidateMacroCalls(), and ValidMacroCalls().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validName()

bool CIccMpeXmlCalculator::validName ( const char *  saName)
staticprotected
2327{
2328 const char *ptr;
2329 if (!szName || !*szName) {
2330 return false;
2331 }
2332
2333 for (ptr = szName; *ptr; ptr++) {
2334 if (!validNameChar(*ptr, ptr == szName))
2335 return false;
2336 }
2337
2338 return true;
2339}

References validNameChar().

Referenced by ParseImport().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validNameChar()

bool CIccMpeXmlCalculator::validNameChar ( char  c,
bool  bFirst 
)
staticprotected
2317{
2318 if (bFirst && !((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c == '_')))
2319 return false;
2320 else if (!((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || (c == '_')))
2321 return false;
2322
2323 return true;
2324}

Referenced by ParseChanMap(), and validName().

+ Here is the caller graph for this function:

◆ Write()

bool CIccMpeCalculator::Write ( CIccIO pIO)
virtualinherited

Name: CIccMpeCalculator::Write

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

4599{
4601
4602 if (!pIO)
4603 return false;
4604
4605 icUInt32Number elemStart = pIO->Tell();
4606
4607 if (!pIO->Write32(&sig))
4608 return false;
4609
4610 if (!pIO->Write32(&m_nReserved))
4611 return false;
4612
4613 if (!pIO->Write16(&m_nInputChannels))
4614 return false;
4615
4616 if (!pIO->Write16(&m_nOutputChannels))
4617 return false;
4618
4619 if (!pIO->Write32(&m_nSubElem))
4620 return false;
4621
4622 icUInt32Number nPos = m_nSubElem + 1;
4623
4624 icPositionNumber *pos, *posvals = (icPositionNumber*)calloc(nPos, sizeof(icPositionNumber));
4625 if (!posvals) {
4626 return false;
4627 }
4628 icUInt32Number nPositionStart = pIO->Tell();
4629
4630 icUInt32Number n, np = nPos * (sizeof(icPositionNumber)/sizeof(icUInt32Number));
4631 if (pIO->Write32(posvals, np)!=np) {
4632 free(posvals);
4633 return false;
4634 }
4635
4636 if (m_calcFunc) {
4637 posvals[0].offset = pIO->Tell()-elemStart;
4638 if (!m_calcFunc->Write(pIO)) {
4639 free(posvals);
4640 return false;
4641 }
4642 posvals[0].size = pIO->Tell()-elemStart - posvals[nPos-1].offset;
4643 pIO->Align32();
4644 }
4645
4646 pos = &posvals[1];
4647
4648 if (m_nSubElem) {
4649 for(n=0; n<m_nSubElem; n++) {
4650 if (m_SubElem[n]) {
4651 pos->offset = pIO->Tell()-elemStart;
4652 if (!m_SubElem[n]->Write(pIO)) {
4653 free(posvals);
4654 return false;
4655 }
4656 pos->size = pIO->Tell()-elemStart - pos->offset;
4657 pIO->Align32();
4658 }
4659 pos++;
4660 }
4661 }
4662 icUInt32Number endPos = pIO->Tell();
4663
4664 pIO->Seek(nPositionStart, icSeekSet);
4665
4666 if (pIO->Write32(posvals, np)!=np) {
4667 free(posvals);
4668 return false;
4669 }
4670 free(posvals);
4671
4672 pIO->Seek(endPos, icSeekSet);
4673
4674 return true;
4675}
icInt32Number Write16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:122
bool Align32()
Write operation to make sure that filelength is evenly divisible by 4.
Definition IccIO.cpp:341
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:152
virtual bool Write(CIccIO *pIO)
Definition IccMpeCalc.cpp:3399
virtual bool Write(CIccIO *pIO)
Definition IccMpeCalc.cpp:4598

References CIccIO::Align32(), CIccMpeCalculator::GetType(), icSeekSet, CIccMpeCalculator::m_calcFunc, CIccMultiProcessElement::m_nInputChannels, CIccMultiProcessElement::m_nOutputChannels, CIccMultiProcessElement::m_nReserved, CIccMpeCalculator::m_nSubElem, CIccMpeCalculator::m_SubElem, icPositionNumber::offset, CIccIO::Seek(), icPositionNumber::size, CIccIO::Tell(), CIccCalculatorFunc::Write(), CIccMultiProcessElement::Write(), CIccIO::Write16(), and CIccIO::Write32().

Referenced by CIccSampledCalculatorCurve::Write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ m_bNeedTempReset

bool CIccMpeCalculator::m_bNeedTempReset
protectedinherited

◆ m_calcFunc

◆ m_declVarMap

TempDeclVarMap CIccMpeXmlCalculator::m_declVarMap
protected

Referenced by clean(), Flatten(), ParseImport(), and ParseXml().

◆ m_inputMap

ChanVarMap CIccMpeXmlCalculator::m_inputMap
protected

Referenced by Flatten(), and ParseXml().

◆ m_macroLocalMap

TempDeclVarMap CIccMpeXmlCalculator::m_macroLocalMap
protected

Referenced by Flatten(), ParseImport(), and ParseXml().

◆ m_macroMap

MacroMap CIccMpeXmlCalculator::m_macroMap
protected

◆ m_mpeList

MpePtrList CIccMpeXmlCalculator::m_mpeList
protected

Referenced by clean(), Flatten(), ParseImport(), and ParseXml().

◆ m_mpeMap

MpePtrMap CIccMpeXmlCalculator::m_mpeMap
protected

Referenced by clean(), Flatten(), and ParseImport().

◆ m_nInputChannels

icUInt16Number CIccMultiProcessElement::m_nInputChannels
protectedinherited

Referenced by CIccMpeBAcs::CIccMpeBAcs(), CIccMpeBAcs::CIccMpeBAcs(), CIccMpeCalculator::CIccMpeCalculator(), CIccMpeCalculator::CIccMpeCalculator(), CIccMpeCAM::CIccMpeCAM(), CIccMpeCLUT::CIccMpeCLUT(), CIccMpeCLUT::CIccMpeCLUT(), CIccMpeCurveSet::CIccMpeCurveSet(), CIccMpeCurveSet::CIccMpeCurveSet(), CIccMpeEAcs::CIccMpeEAcs(), CIccMpeEAcs::CIccMpeEAcs(), CIccMpeExtCLUT::CIccMpeExtCLUT(), CIccMpeMatrix::CIccMpeMatrix(), CIccMpeMatrix::CIccMpeMatrix(), CIccMpeSpectralCLUT::CIccMpeSpectralCLUT(), CIccMpeSpectralCLUT::CIccMpeSpectralCLUT(), CIccMpeSpectralMatrix::CIccMpeSpectralMatrix(), CIccMpeSpectralMatrix::CIccMpeSpectralMatrix(), CIccMpeSpectralObserver::CIccMpeSpectralObserver(), CIccMpeSpectralObserver::CIccMpeSpectralObserver(), CIccMpeTintArray::CIccMpeTintArray(), CIccMpeTintArray::CIccMpeTintArray(), CIccMpeToneMap::CIccMpeToneMap(), CIccMpeToneMap::CIccMpeToneMap(), CIccMultiProcessElement::CIccMultiProcessElement(), CIccMpeAcs::Apply(), CIccMpeCurveSet::Apply(), CIccMpeMatrix::Apply(), CIccMpeAcs::Begin(), CIccMpeCurveSet::Begin(), CIccMpeMatrix::Begin(), CIccMpeCLUT::Begin(), CIccMpeEmissionMatrix::Begin(), CIccMpeInvEmissionMatrix::Begin(), CIccMpeEmissionCLUT::Begin(), CIccMpeReflectanceCLUT::Begin(), CIccMpeEmissionObserver::Begin(), CIccMpeReflectanceObserver::Begin(), CIccMpeSpectralCLUT::copyData(), CIccMpeSpectralMatrix::copyData(), CIccMpeSpectralObserver::copyData(), CIccMpeCurveSet::Describe(), CIccMpeMatrix::Describe(), CIccMpeCalculator::Describe(), CIccMpeSpectralMatrix::Describe(), CIccMpeSpectralObserver::Describe(), Flatten(), CIccMultiProcessElement::NumInputChannels(), CIccMpeEmissionMatrix::numVectors(), CIccMpeBAcs::operator=(), CIccMpeCalculator::operator=(), CIccMpeCLUT::operator=(), CIccMpeCurveSet::operator=(), CIccMpeEAcs::operator=(), CIccMpeMatrix::operator=(), CIccMpeTintArray::operator=(), CIccMpeToneMap::operator=(), CIccMpeXmlTintArray::ParseXml(), CIccMpeXmlToneMap::ParseXml(), CIccMpeXmlMatrix::ParseXml(), CIccMpeXmlCLUT::ParseXml(), CIccMpeXmlExtCLUT::ParseXml(), CIccMpeXmlBAcs::ParseXml(), CIccMpeXmlEAcs::ParseXml(), CIccMpeXmlJabToXYZ::ParseXml(), CIccMpeXmlXYZToJab::ParseXml(), ParseXml(), CIccMpeXmlEmissionCLUT::ParseXml(), CIccMpeXmlReflectanceCLUT::ParseXml(), CIccMpeAcs::Read(), CIccMpeCurveSet::Read(), CIccMpeTintArray::Read(), CIccMpeToneMap::Read(), CIccMpeMatrix::Read(), CIccMpeCLUT::Read(), CIccMpeExtCLUT::Read(), CIccMpeCAM::Read(), CIccMpeSpectralCLUT::Read(), CIccMpeCLUT::SetCLUT(), CIccMpeCurveSet::SetCurve(), CIccMpeSpectralCLUT::SetData(), CIccMpeCalculator::SetSize(), CIccMpeMatrix::SetSize(), CIccMpeSpectralMatrix::SetSize(), CIccMpeSpectralObserver::SetSize(), CIccMpeCurveSet::SetSize(), CIccMpeCurveSet::Validate(), CIccMpeTintArray::Validate(), CIccMpeToneMap::Validate(), CIccMpeCAM::Validate(), CIccMpeInvEmissionMatrix::Validate(), CIccMpeAcs::Write(), CIccMpeCurveSet::Write(), CIccMpeTintArray::Write(), CIccMpeToneMap::Write(), CIccMpeMatrix::Write(), CIccMpeCLUT::Write(), CIccMpeExtCLUT::Write(), CIccMpeCAM::Write(), CIccMpeCalculator::Write(), CIccMpeSpectralMatrix::Write(), CIccMpeSpectralCLUT::Write(), and CIccMpeSpectralObserver::Write().

◆ m_nNextMpe

int CIccMpeXmlCalculator::m_nNextMpe
protected

Referenced by clean(), Flatten(), and ParseImport().

◆ m_nNextVar

int CIccMpeXmlCalculator::m_nNextVar
protected

Referenced by clean(), Flatten(), and ParseXml().

◆ m_nOutputChannels

icUInt16Number CIccMultiProcessElement::m_nOutputChannels
protectedinherited

Referenced by CIccMpeBAcs::CIccMpeBAcs(), CIccMpeBAcs::CIccMpeBAcs(), CIccMpeCalculator::CIccMpeCalculator(), CIccMpeCalculator::CIccMpeCalculator(), CIccMpeCAM::CIccMpeCAM(), CIccMpeCLUT::CIccMpeCLUT(), CIccMpeCLUT::CIccMpeCLUT(), CIccMpeCurveSet::CIccMpeCurveSet(), CIccMpeCurveSet::CIccMpeCurveSet(), CIccMpeEAcs::CIccMpeEAcs(), CIccMpeEAcs::CIccMpeEAcs(), CIccMpeExtCLUT::CIccMpeExtCLUT(), CIccMpeMatrix::CIccMpeMatrix(), CIccMpeMatrix::CIccMpeMatrix(), CIccMpeSpectralCLUT::CIccMpeSpectralCLUT(), CIccMpeSpectralCLUT::CIccMpeSpectralCLUT(), CIccMpeSpectralMatrix::CIccMpeSpectralMatrix(), CIccMpeSpectralMatrix::CIccMpeSpectralMatrix(), CIccMpeSpectralObserver::CIccMpeSpectralObserver(), CIccMpeSpectralObserver::CIccMpeSpectralObserver(), CIccMpeTintArray::CIccMpeTintArray(), CIccMpeTintArray::CIccMpeTintArray(), CIccMpeToneMap::CIccMpeToneMap(), CIccMpeToneMap::CIccMpeToneMap(), CIccMultiProcessElement::CIccMultiProcessElement(), CIccMpeTintArray::Apply(), CIccMpeToneMap::Apply(), CIccMpeMatrix::Apply(), CIccMpeAcs::Begin(), CIccMpeTintArray::Begin(), CIccMpeToneMap::Begin(), CIccMpeMatrix::Begin(), CIccMpeEmissionMatrix::Begin(), CIccMpeInvEmissionMatrix::Begin(), CIccMpeEmissionCLUT::Begin(), CIccMpeReflectanceCLUT::Begin(), CIccMpeEmissionObserver::Begin(), CIccMpeReflectanceObserver::Begin(), CIccMpeToneMap::ClearToneFuncs(), CIccMpeSpectralCLUT::copyData(), CIccMpeSpectralMatrix::copyData(), CIccMpeSpectralObserver::copyData(), CIccMpeToneMap::CopyToneFuncs(), CIccMpeMatrix::Describe(), CIccMpeCalculator::Describe(), CIccMpeSpectralMatrix::Describe(), CIccMpeSpectralObserver::Describe(), CIccMpeTintArray::Describe(), CIccMpeToneMap::Describe(), Flatten(), CIccMpeToneMap::Insert(), CIccMultiProcessElement::NumOutputChannels(), CIccMpeInvEmissionMatrix::numVectors(), CIccMpeBAcs::operator=(), CIccMpeCalculator::operator=(), CIccMpeCLUT::operator=(), CIccMpeCurveSet::operator=(), CIccMpeEAcs::operator=(), CIccMpeMatrix::operator=(), CIccMpeTintArray::operator=(), CIccMpeToneMap::operator=(), CIccMpeXmlTintArray::ParseXml(), CIccMpeXmlToneMap::ParseXml(), CIccMpeXmlMatrix::ParseXml(), CIccMpeXmlCLUT::ParseXml(), CIccMpeXmlExtCLUT::ParseXml(), CIccMpeXmlBAcs::ParseXml(), CIccMpeXmlEAcs::ParseXml(), CIccMpeXmlJabToXYZ::ParseXml(), CIccMpeXmlXYZToJab::ParseXml(), ParseXml(), CIccMpeXmlEmissionCLUT::ParseXml(), CIccMpeXmlReflectanceCLUT::ParseXml(), CIccMpeAcs::Read(), CIccMpeTintArray::Read(), CIccMpeToneMap::Read(), CIccMpeMatrix::Read(), CIccMpeCLUT::Read(), CIccMpeExtCLUT::Read(), CIccMpeCAM::Read(), CIccMpeSpectralCLUT::Read(), CIccMpeCLUT::SetCLUT(), CIccMpeSpectralCLUT::SetData(), CIccMpeToneMap::SetNumOutputChannels(), CIccMpeCalculator::SetSize(), CIccMpeMatrix::SetSize(), CIccMpeSpectralMatrix::SetSize(), CIccMpeSpectralObserver::SetSize(), CIccMpeCurveSet::SetSize(), CIccMpeTintArray::SetVectorSize(), CIccMpeTintArray::Validate(), CIccMpeToneMap::Validate(), CIccMpeCAM::Validate(), CIccMpeSpectralMatrix::Validate(), CIccMpeSpectralObserver::Validate(), CIccMpeAcs::Write(), CIccMpeTintArray::Write(), CIccMpeToneMap::Write(), CIccMpeMatrix::Write(), CIccMpeCLUT::Write(), CIccMpeExtCLUT::Write(), CIccMpeCAM::Write(), CIccMpeCalculator::Write(), CIccMpeSpectralMatrix::Write(), CIccMpeSpectralCLUT::Write(), and CIccMpeSpectralObserver::Write().

◆ m_nReserved

icUInt32Number CIccMultiProcessElement::m_nReserved
inherited

Referenced by CIccMpeAcs::CIccMpeAcs(), CIccMpeBAcs::CIccMpeBAcs(), CIccMpeCalculator::CIccMpeCalculator(), CIccMpeCalculator::CIccMpeCalculator(), CIccMpeCAM::CIccMpeCAM(), CIccMpeCLUT::CIccMpeCLUT(), CIccMpeCLUT::CIccMpeCLUT(), CIccMpeCurveSet::CIccMpeCurveSet(), CIccMpeCurveSet::CIccMpeCurveSet(), CIccMpeEAcs::CIccMpeEAcs(), CIccMpeExtCLUT::CIccMpeExtCLUT(), CIccMpeMatrix::CIccMpeMatrix(), CIccMpeMatrix::CIccMpeMatrix(), CIccMpeSpectralCLUT::CIccMpeSpectralCLUT(), CIccMpeSpectralCLUT::CIccMpeSpectralCLUT(), CIccMpeSpectralMatrix::CIccMpeSpectralMatrix(), CIccMpeSpectralMatrix::CIccMpeSpectralMatrix(), CIccMpeSpectralObserver::CIccMpeSpectralObserver(), CIccMpeSpectralObserver::CIccMpeSpectralObserver(), CIccMpeTintArray::CIccMpeTintArray(), CIccMpeTintArray::CIccMpeTintArray(), CIccMpeToneMap::CIccMpeToneMap(), CIccMpeToneMap::CIccMpeToneMap(), CIccMultiProcessElement::CIccMultiProcessElement(), CIccMpeSpectralCLUT::copyData(), CIccMpeSpectralMatrix::copyData(), CIccMpeSpectralObserver::copyData(), CIccMpeBAcs::operator=(), CIccMpeCalculator::operator=(), CIccMpeCLUT::operator=(), CIccMpeCurveSet::operator=(), CIccMpeEAcs::operator=(), CIccMpeMatrix::operator=(), CIccMpeTintArray::operator=(), CIccMpeToneMap::operator=(), CIccTagXmlMultiProcessElement::ParseElement(), ParseImport(), CIccMpeAcs::Read(), CIccMpeCurveSet::Read(), CIccMpeTintArray::Read(), CIccMpeToneMap::Read(), CIccMpeMatrix::Read(), CIccMpeCLUT::Read(), CIccMpeExtCLUT::Read(), CIccMpeCAM::Read(), CIccMpeCalculator::Read(), CIccMpeSpectralMatrix::Read(), CIccMpeSpectralCLUT::Read(), CIccMpeSpectralObserver::Read(), CIccMpeXmlCurveSet::ToXml(), CIccMpeXmlTintArray::ToXml(), CIccMpeXmlToneMap::ToXml(), CIccMpeXmlMatrix::ToXml(), CIccMpeXmlCLUT::ToXml(), CIccMpeXmlExtCLUT::ToXml(), CIccMpeXmlBAcs::ToXml(), CIccMpeXmlEAcs::ToXml(), CIccMpeXmlJabToXYZ::ToXml(), CIccMpeXmlXYZToJab::ToXml(), ToXml(), CIccMpeXmlEmissionMatrix::ToXml(), CIccMpeXmlInvEmissionMatrix::ToXml(), CIccMpeXmlEmissionCLUT::ToXml(), CIccMpeXmlReflectanceCLUT::ToXml(), CIccMpeXmlEmissionObserver::ToXml(), CIccMpeXmlReflectanceObserver::ToXml(), CIccMultiProcessElement::Validate(), CIccMpeAcs::Write(), CIccMpeCurveSet::Write(), CIccMpeTintArray::Write(), CIccMpeToneMap::Write(), CIccMpeMatrix::Write(), CIccMpeCLUT::Write(), CIccMpeExtCLUT::Write(), CIccMpeCAM::Write(), CIccMpeCalculator::Write(), CIccMpeSpectralMatrix::Write(), CIccMpeSpectralCLUT::Write(), and CIccMpeSpectralObserver::Write().

◆ m_nSubElem

◆ m_nTempChannels

◆ m_outputMap

ChanVarMap CIccMpeXmlCalculator::m_outputMap
protected

Referenced by Flatten(), and ParseXml().

◆ m_pCmmEnvVarLookup

◆ m_sImport

std::string CIccMpeXmlCalculator::m_sImport
protected

◆ m_SubElem

◆ m_varMap

TempVarMap CIccMpeXmlCalculator::m_varMap
protected

Referenced by clean(), and Flatten().


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