Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
CIccSegmentedCurveXml Class Reference

#include <IccMpeXml.h>

+ Inheritance diagram for CIccSegmentedCurveXml:
+ Collaboration diagram for CIccSegmentedCurveXml:

Public Member Functions

bool ParseXml (xmlNode *pNode, std::string &parseStr)
 
bool ToXml (std::string &xml, std::string blanks)
 
- Public Member Functions inherited from CIccSegmentedCurve
virtual icFloatNumber Apply (icFloatNumber v) const
 Name: CIccSegmentedCurve::Apply.
 
virtual bool Begin (icElemInterp nInterp, CIccTagMultiProcessElement *pMPE)
 Name: CIccSegmentedCurve::Begin.
 
 CIccSegmentedCurve ()
 Name: CIccSegmentedCurve::CIccSegmentedCurve.
 
 CIccSegmentedCurve (const CIccSegmentedCurve &ITPC)
 Name: CIccSegmentedCurve::CIccSegmentedCurve.
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 Name: CIccSegmentedCurve::Describe.
 
virtual const icCharGetClassName () const
 
virtual icCurveElemSignature GetType () const
 
bool Insert (CIccCurveSegment *pCurveSegment)
 Name: CIccSegmentedCurve::Insert.
 
virtual CIccCurveSetCurveNewCopy () const
 
CIccSegmentedCurveoperator= (const CIccSegmentedCurve &ParamCurveTag)
 Name: &CIccSegmentedCurve::operator=.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 Name: CIccSegmentedCurve::Read.
 
void Reset ()
 Name: CIccSegmentedCurve::Reset.
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
 Name: CIccSegmentedCurve::Validate.
 
virtual bool Write (CIccIO *pIO)
 Name: CIccSegmentedCurve::Write.
 
virtual ~CIccSegmentedCurve ()
 Name: CIccSegmentedCurve::~CIccSegmentedCurve.
 
- Public Member Functions inherited from CIccCurveSetCurve
virtual ~CIccCurveSetCurve ()
 

Additional Inherited Members

- Static Public Member Functions inherited from CIccCurveSetCurve
static CIccCurveSetCurveCreate (icCurveElemSignature sig)
 Name: CIccCurveSetCurve::Create.
 
- Protected Attributes inherited from CIccSegmentedCurve
CIccCurveSegmentListm_list
 
icUInt32Number m_nReserved1
 
icUInt32Number m_nReserved2
 

Detailed Description

Definition at line 101 of file IccMpeXml.h.

Member Function Documentation

◆ ParseXml()

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

Definition at line 984 of file IccMpeXml.cpp.

985{
986 m_list->clear();
987 for (pNode=pNode->children; pNode; pNode=pNode->next) {
988 if (pNode->type == XML_ELEMENT_NODE) {
989 icFloatNumber start = icGetSegPos(icXmlAttrValue(pNode, "Start"));
990 icFloatNumber end = icGetSegPos(icXmlAttrValue(pNode, "End"));
991
992 if (!icXmlStrCmp(pNode->name, "FormulaSegment")) {
994
995 if (!pSegXml->ParseXml(pNode, parseStr)) {
996 parseStr += "Unable to parse FormulaSegment\n";
997 delete pSegXml;
998 return false;
999 }
1000 m_list->push_back(pSegXml);
1001 }
1002 else if (!icXmlStrCmp(pNode->name, "SampledSegment")) {
1003 CIccSampledCurveSegmentXml *pSegXml = new CIccSampledCurveSegmentXml(start, end);
1004
1005 if (!pSegXml->ParseXml(pNode, parseStr)) {
1006 parseStr += "Unable to parse SampledSegment\n";
1007 delete pSegXml;
1008 return false;
1009 }
1010 m_list->push_back(pSegXml);
1011 }
1012 else {
1013 parseStr += "Bad Segment Type\n";
1014 return false;
1015 }
1016 }
1017 }
1018 return true;
1019}
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100
icFloatNumber icGetSegPos(const char *str)
const char * icXmlAttrValue(xmlAttr *attr, const char *szDefault)
#define icXmlStrCmp(x, y)
Definition IccUtilXml.h:134
bool ParseXml(xmlNode *pNode, std::string &parseStr)
bool ParseXml(xmlNode *pNode, std::string &parseStr)
CIccCurveSegmentList * m_list

References icGetSegPos(), icXmlAttrValue(), icXmlStrCmp, CIccFormulaCurveSegmentXml::ParseXml(), and CIccSampledCurveSegmentXml::ParseXml().

Referenced by CIccTagXmlSegmentedCurve::ParseXml(), and ParseXmlCurve().

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

◆ ToXml()

bool CIccSegmentedCurveXml::ToXml ( std::string & xml,
std::string blanks )

Definition at line 962 of file IccMpeXml.cpp.

963{
964 CIccCurveSegmentList::iterator seg;
965 xml += blanks + "<SegmentedCurve>\n";
966 for (seg = m_list->begin(); seg!=m_list->end(); seg++) {
967 CIccCurveSegment* pSeg = *seg;
968 if (pSeg && pSeg->GetType() == icSigFormulaCurveSeg) {
969 if (!((CIccFormulaCurveSegmentXml*)pSeg)->ToXml(xml, blanks+" "))
970 return false;
971 }
972 else if (pSeg && pSeg->GetType() == icSigSampledCurveSeg) {
973 if (!((CIccSampledCurveSegmentXml*)pSeg)->ToXml(xml, blanks+" "))
974 return false;
975 }
976 else
977 return false;
978 }
979 xml += blanks + "</SegmentedCurve>\n";
980 return true;
981}
Class: CIccCurveSegment.
Definition IccMpeBasic.h:95
virtual icCurveSegSignature GetType() const =0
virtual icCurveSegSignature GetType() const
@ icSigSampledCurveSeg
@ icSigFormulaCurveSeg

References CIccCurveSegment::GetType(), icSigFormulaCurveSeg, and icSigSampledCurveSeg.

Referenced by ToXmlCurve().

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

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