70#include "libxml/parser.h"
95 bool FromUtf8(
const char *szStr,
size_t sizeSrc=0);
96 const char *
ToUtf8(std::string &buf);
97 const wchar_t *
ToWString(std::wstring &buf);
102 static size_t AllocSize(
size_t n) {
return (((n+64)/64)*64); }
109const char *
icFixXml(
char *szDest,
const char *szStr);
110const char *
icFixXml(std::string &buf,
const char *szStr);
111const char *
icAnsiToUtf8(std::string &buf,
const char *szSrc);
112const char *
icUtf8ToAnsi(std::string &buf,
const char *szSrc);
118 bool bSaveGridPoints=
false);
120 bool bSaveGridPoints=
false,
const char *szExtraAttrs=
"",
const char *
szName=
"CLUT");
123const char *
icXmlAttrValue(xmlAttr *attr,
const char *szDefault=
"");
134#define icXmlStrCmp(x, y) strcmp((const char *)(x), (const char*)(y))
136xmlAttr *
icXmlFindAttr(xmlNode *pNode,
const char *szAttrName);
137xmlNode *
icXmlFindNode(xmlNode *pNode,
const char *szNodeName);
143template <
class T, icTagTypeSignature Tsig>
173#define icSigFloatArrayType ((icTagTypeSignature)0x66637420)
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
icMeasurementGeometry icGeNamedtMeasurementGeometryValue(const icChar *str)
const char * icUtf8ToAnsi(std::string &buf, const char *szSrc)
CIccXmlArrayType< icUInt32Number, icSigUInt32ArrayType > CIccUInt32Array
const std::string icGetDeviceAttrName(icUInt64Number devAttr)
icUInt32Number icXmlNodeCount3(xmlNode *pNode, const char *szNodeName1, const char *szNodeName2, const char *szNodeName3)
icColorantEncoding icGetColorantValue(const icChar *str)
CIccXmlArrayType< icUInt16Number, icSigUInt16ArrayType > CIccUInt16Array
icUInt32Number icXmlNodeCount(xmlNode *pNode, const char *szNodeName)
icUInt32Number icXmlGetHexDataSize(const char *szText)
CIccXmlArrayType< icUInt64Number, icSigUInt64ArrayType > CIccUInt64Array
icDateTimeNumber icGetDateTimeValue(const icChar *str)
xmlAttr * icXmlFindAttr(xmlNode *pNode, const char *szAttrName)
icUInt32Number icXmlNodeCount2(xmlNode *pNode, const char *szNodeName1, const char *szNodeName2)
xmlNode * icXmlFindNode(xmlNode *pNode, const char *szNodeName)
const icChar * icGetTagSigName(icTagSignature tagSig)
icUInt32Number icXmlGetHexData(void *pBuf, const char *szText, icUInt32Number nBufSize)
icTagTypeSignature icGetTypeNameTagSig(const icChar *szTagType)
const char * icXmlAttrValue(xmlAttr *attr, const char *szDefault="")
icUInt32Number icXmlGetChildSigVal(xmlNode *pNode)
bool icCLUTToXml(std::string &xml, CIccCLUT *pCLUT, icConvertType nType, std::string blanks, bool bSaveGridPoints=false, const char *szExtraAttrs="", const char *szName="CLUT")
CIccXmlArrayType< icFloatNumber,((icTagTypeSignature) 0x66637420) > CIccFloatArray
icMeasurementFlare icGetNamedMeasurementFlareValue(const icChar *str)
const icChar * icGetStandardObserverName(icStandardObserver str)
const icChar * icGetTagSigTypeName(icTagTypeSignature tagTypeSig)
const char * icUtf16ToUtf8(std::string &buf, const icUInt16Number *szSrc, int sizeSrc=0)
icUInt32Number icXmlDumpHexData(std::string &xml, std::string blanks, void *pBuf, icUInt32Number nBufSize)
icUInt64Number icGetDeviceAttrValue(xmlNode *pNode)
const std::string icGetPadSpace(double value)
icIlluminant icGetIlluminantValue(const icChar *str)
icMeasurementUnitSig icGetMeasurementValue(const icChar *str)
icStandardObserver icGetNamedStandardObserverValue(const icChar *str)
const std::string icGetHeaderFlagsName(icUInt32Number flags, bool bUsesMCS=false)
CIccXmlArrayType< icFloat32Number, icSigFloat32ArrayType > CIccFloat32Array
icRenderingIntent icGetRenderingIntentValue(const icChar *szRenderingIntent)
CIccXmlArrayType< icUInt8Number, icSigUInt8ArrayType > CIccUInt8Array
bool icCLUTDataToXml(std::string &xml, CIccCLUT *pCLUT, icConvertType nType, std::string blanks, bool bSaveGridPoints=false)
icTagSignature icGetTagNameSig(const icChar *szTagName)
icFloatNumber icXmlStrToFloat(const xmlChar *szStr)
const char * icFixXml(char *szDest, const char *szStr)
const unsigned short * icUtf8ToUtf16(CIccUTF16String &buf, const char *szSrc, int sizeSrc=0)
icSignature icXmlStrToSig(const char *szStr)
CIccXmlArrayType< icFloat64Number, icSigFloat64ArrayType > CIccFloat64Array
const char * icAnsiToUtf8(std::string &buf, const char *szSrc)
unsigned int icUInt32Number
static size_t AllocSize(size_t n)
const char * ToUtf8(std::string &buf)
static size_t WStrlen(const icUInt16Number *uzStr)
bool FromUtf8(const char *szStr, size_t sizeSrc=0)
virtual ~CIccUTF16String()
icUInt16Number operator[](size_t m_nIndex)
const icUInt16Number * c_str()
CIccUTF16String & operator=(const CIccUTF16String &wstr)
const wchar_t * ToWString(std::wstring &buf)
bool ParseTextArray(const char *szText)
bool SetSize(icUInt32Number nSize)
static bool ParseArray(T *buf, icUInt32Number nBufSize, xmlNode *pNode)
bool ParseTextArrayNum(const char *szText, icUInt32Number num, std::string &parseStr)
static icUInt32Number ParseText(T *buf, icUInt32Number nBufSize, const char *szText)
static bool DumpArray(std::string &xml, std::string blanks, T *buf, icUInt32Number nBufSize, icConvertType nType, icUInt8Number nColumns)
static icUInt32Number ParseTextCountNum(const char *szText, icUInt32Number num, std::string &parseStr)
static icUInt32Number ParseTextCount(const char *szText)
The base date time number.