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

#include <IccCmmConfig.h>

Public Member Functions

 CIccCfgDataEntry ()
 
virtual ~CIccCfgDataEntry ()
 
bool fromJson (json obj, bool bReset=false)
 
void reset ()
 
void toJson (json &obj)
 

Data Fields

std::list< std::string > m_debugInfo
 
int m_index
 
std::string m_label
 
std::string m_name
 
std::string m_srcName
 
std::vector< icFloatNumberm_srcValues
 
std::vector< icFloatNumberm_values
 

Detailed Description

Constructor & Destructor Documentation

◆ CIccCfgDataEntry()

CIccCfgDataEntry::CIccCfgDataEntry ( )
1779{
1780 reset();
1781}
void reset()
Definition IccCmmConfig.cpp:1783

References reset().

Referenced by CIccCfgColorData::fromLegacy(), and main().

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

◆ ~CIccCfgDataEntry()

virtual CIccCfgDataEntry::~CIccCfgDataEntry ( )
inlinevirtual
149{}

Member Function Documentation

◆ fromJson()

bool CIccCfgDataEntry::fromJson ( json  obj,
bool  bReset = false 
)
1795{
1796 if (!j.is_object())
1797 return false;
1798
1799 if (bReset)
1800 reset();
1801
1802 jsonToValue(j["n"], m_name);
1803 jsonToArray(j["v"], m_values);
1804
1805 jsonToValue(j["sn"], m_srcName);
1806 jsonToArray(j["sv"], m_srcValues);
1807
1808 jsonToValue(j["i"], m_index);
1809 jsonToValue(j["l"], m_label);
1810
1811 jsonToList(j["d"], m_debugInfo);
1812
1813 return true;
1814}
bool jsonToArray(const json &v, T *vals, int n)
Definition IccJsonUtil.cpp:263
bool jsonToList(const json &v, std::list< std::string > &vals)
Definition IccJsonUtil.cpp:314
bool jsonToValue(const json &j, T &nValue)
Definition IccJsonUtil.cpp:200
std::vector< icFloatNumber > m_srcValues
Definition IccCmmConfig.h:158
std::string m_srcName
Definition IccCmmConfig.h:157
int m_index
Definition IccCmmConfig.h:159
std::string m_label
Definition IccCmmConfig.h:160
std::vector< icFloatNumber > m_values
Definition IccCmmConfig.h:156
std::list< std::string > m_debugInfo
Definition IccCmmConfig.h:161
std::string m_name
Definition IccCmmConfig.h:155

References jsonToArray(), jsonToList(), jsonToValue(), m_debugInfo, m_index, m_label, m_name, m_srcName, m_srcValues, m_values, and reset().

Referenced by CIccCfgColorData::fromJson().

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

◆ reset()

void CIccCfgDataEntry::reset ( )
1784{
1785 m_name.clear();
1786 m_values.clear();
1787 m_srcName.clear();
1788 m_srcValues.clear();
1789 m_index = -1;
1790 m_label.clear();
1791 m_debugInfo.clear();
1792}

References m_debugInfo, m_index, m_label, m_name, m_srcName, m_srcValues, and m_values.

Referenced by CIccCfgDataEntry(), and fromJson().

+ Here is the caller graph for this function:

◆ toJson()

void CIccCfgDataEntry::toJson ( json obj)
1817{
1818 if (m_name.size())
1819 obj["n"] = m_name;
1820 if (m_values.size())
1821 obj["v"] = m_values;
1822
1823 if (m_srcName.size())
1824 obj["sn"] = m_srcName;
1825 if (m_srcValues.size())
1826 obj["sv"] = m_srcValues;
1827
1828 if (m_label.size())
1829 obj["l"] = m_label;
1830
1831 if (m_index >= 0)
1832 obj["i"] = m_index;
1833
1834 if (m_debugInfo.size())
1835 obj["d"] = m_debugInfo;
1836}

References m_debugInfo, m_index, m_label, m_name, m_srcName, m_srcValues, and m_values.

Referenced by CIccCfgColorData::toJson().

+ Here is the caller graph for this function:

Field Documentation

◆ m_debugInfo

std::list<std::string> CIccCfgDataEntry::m_debugInfo

◆ m_index

int CIccCfgDataEntry::m_index

◆ m_label

std::string CIccCfgDataEntry::m_label

◆ m_name

◆ m_srcName

◆ m_srcValues

◆ m_values


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