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

#include <IccCmmConfig.h>

+ Collaboration diagram for CIccCfgCreateLink:

Public Member Functions

 CIccCfgCreateLink ()
 
int fromArgs (const char **args, int nArg, bool bReset=false)
 
bool fromJson (json obj, bool bReset=false)
 
void reset ()
 
void toJson (json &obj) const
 
virtual ~CIccCfgCreateLink ()
 

Public Attributes

std::string m_linkFile
 
icUInt8Number m_linkGridSize
 
icFloatNumber m_linkMaxRange
 
icFloatNumber m_linkMinRange
 
icUInt8Number m_linkPrecision
 
std::string m_linkTitle
 
icCfgLinkType m_linkType
 
bool m_useSourceTransform
 

Detailed Description

Definition at line 78 of file IccCmmConfig.h.

Constructor & Destructor Documentation

◆ CIccCfgCreateLink()

CIccCfgCreateLink::CIccCfgCreateLink ( )

Definition at line 432 of file IccCmmConfig.cpp.

433{
434 reset();
435}

References reset().

+ Here is the call graph for this function:

◆ ~CIccCfgCreateLink()

virtual CIccCfgCreateLink::~CIccCfgCreateLink ( )
inlinevirtual

Definition at line 82 of file IccCmmConfig.h.

82{}

Member Function Documentation

◆ fromArgs()

int CIccCfgCreateLink::fromArgs ( const char ** args,
int nArg,
bool bReset = false )

Definition at line 449 of file IccCmmConfig.cpp.

450{
451 if (nArg < 8) {
452 return 0;
453 }
454
455 if (bReset)
456 reset();
457
458 m_linkFile = args[0];
459
460 int n = atoi(args[1]);
461 m_linkGridSize = atoi(args[2]);
462 int o = atoi(args[3]);
463
464 switch (n)
465 {
466 case 0:
468 break;
469
470 case 1:
473 break;
474
475 default:
477 break;
478 }
479
480 m_linkTitle = args[4];
481
482 m_linkMinRange = (icFloatNumber)atof(args[5]);
483 m_linkMaxRange = (icFloatNumber)atof(args[6]);
484
485 m_useSourceTransform = atoi(args[7]) != 0;
486
487 return 8;
488}
@ icCfgCreateIccLinkV5
@ icCfgCreateTextCube
@ icCfgCreateIccLinkV4
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100
unsigned char icUInt8Number
Number definitions.

References icCfgCreateIccLinkV4, icCfgCreateIccLinkV5, icCfgCreateTextCube, m_linkFile, m_linkGridSize, m_linkMaxRange, m_linkMinRange, m_linkPrecision, m_linkTitle, m_linkType, m_useSourceTransform, and reset().

+ Here is the call graph for this function:

◆ fromJson()

bool CIccCfgCreateLink::fromJson ( json obj,
bool bReset = false )

stricmp(linkType.c_str(), "iccDeviceLinkV4")

Definition at line 490 of file IccCmmConfig.cpp.

491{
492 if (!j.is_object())
493 return false;
494
495 if (bReset)
496 reset();
497
498 jsonToValue(j["linkFile"], m_linkFile);
499
500 std::string linkType;
501 jsonToValue(j["linkType"], linkType);
502 if (!stricmp(linkType.c_str(), "cubeFile"))
504 else if (!stricmp(linkType.c_str(), "iccDeviceLinkV5"))
506 else /*!stricmp(linkType.c_str(), "iccDeviceLinkV4")*/
508
509 jsonToValue(j["linkGridSize"], m_linkGridSize);
510 jsonToValue(j["linkPrecision"], m_linkPrecision);
511 jsonToValue(j["linkTitle"], m_linkTitle);
512 jsonToValue(j["linkMinRange"], m_linkMinRange);
513 jsonToValue(j["linkMaxRange"], m_linkMaxRange);
514 jsonToValue(j["useSourceTransform"], m_useSourceTransform);
515
516 return true;
517}
bool jsonToValue(const json &j, icFloatColorEncoding &v)
#define stricmp

References icCfgCreateIccLinkV4, icCfgCreateIccLinkV5, icCfgCreateTextCube, jsonToValue(), m_linkFile, m_linkGridSize, m_linkMaxRange, m_linkMinRange, m_linkPrecision, m_linkTitle, m_linkType, m_useSourceTransform, reset(), and stricmp.

+ Here is the call graph for this function:

◆ reset()

void CIccCfgCreateLink::reset ( )

Definition at line 437 of file IccCmmConfig.cpp.

438{
439 m_linkFile.clear();
441 m_linkGridSize = 19;
442 m_linkPrecision = 4;
443 m_linkTitle.clear();
447}

References icCfgCreateIccLinkV4, m_linkFile, m_linkGridSize, m_linkMaxRange, m_linkMinRange, m_linkPrecision, m_linkTitle, m_linkType, and m_useSourceTransform.

Referenced by CIccCfgCreateLink(), fromArgs(), and fromJson().

+ Here is the caller graph for this function:

◆ toJson()

void CIccCfgCreateLink::toJson ( json & obj) const

Definition at line 519 of file IccCmmConfig.cpp.

520{
521 if (m_linkFile.size())
522 j["linkFile"] = m_linkFile;
523
524 switch (m_linkType) {
526 j["linkType"] = "cubeFile";
527 j["linkPrecision"] = m_linkPrecision;
528 break;
529 default:
531 j["linkType"] = "iccDeviceLinkV4";
532 break;
534 j["linkType"] = "iccDeviceLinkV5";
535 break;
536 }
537
538 j["linkTitle"] = m_linkTitle;
539 j["linkMinRange"] = m_linkMinRange;
540 j["linkMaxRange"] = m_linkMaxRange;
541 j["useSourceTransform"] = m_useSourceTransform;
542}

References icCfgCreateIccLinkV4, icCfgCreateIccLinkV5, icCfgCreateTextCube, m_linkFile, m_linkMaxRange, m_linkMinRange, m_linkPrecision, m_linkTitle, m_linkType, and m_useSourceTransform.

Member Data Documentation

◆ m_linkFile

std::string CIccCfgCreateLink::m_linkFile

Definition at line 89 of file IccCmmConfig.h.

Referenced by fromArgs(), fromJson(), reset(), and toJson().

◆ m_linkGridSize

icUInt8Number CIccCfgCreateLink::m_linkGridSize

Definition at line 91 of file IccCmmConfig.h.

Referenced by fromArgs(), fromJson(), and reset().

◆ m_linkMaxRange

icFloatNumber CIccCfgCreateLink::m_linkMaxRange

Definition at line 95 of file IccCmmConfig.h.

Referenced by fromArgs(), fromJson(), reset(), and toJson().

◆ m_linkMinRange

icFloatNumber CIccCfgCreateLink::m_linkMinRange

Definition at line 94 of file IccCmmConfig.h.

Referenced by fromArgs(), fromJson(), reset(), and toJson().

◆ m_linkPrecision

icUInt8Number CIccCfgCreateLink::m_linkPrecision

Definition at line 92 of file IccCmmConfig.h.

Referenced by fromArgs(), fromJson(), reset(), and toJson().

◆ m_linkTitle

std::string CIccCfgCreateLink::m_linkTitle

Definition at line 93 of file IccCmmConfig.h.

Referenced by fromArgs(), fromJson(), reset(), and toJson().

◆ m_linkType

icCfgLinkType CIccCfgCreateLink::m_linkType

Definition at line 90 of file IccCmmConfig.h.

Referenced by fromArgs(), fromJson(), reset(), and toJson().

◆ m_useSourceTransform

bool CIccCfgCreateLink::m_useSourceTransform

Definition at line 96 of file IccCmmConfig.h.

Referenced by fromArgs(), fromJson(), reset(), and toJson().


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