Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
CIccTagFloatNum< T, Tsig > Class Template Reference

Class: CIccTagFloatNum. More...

#include <IccTagBasic.h>

+ Inheritance diagram for CIccTagFloatNum< T, Tsig >:
+ Collaboration diagram for CIccTagFloatNum< T, Tsig >:

Public Member Functions

 CIccTagFloatNum (const CIccTagFloatNum< T, Tsig > &ITNum)
 Name: CIccTagFloatNum::CIccTagFloatNum.
 
 CIccTagFloatNum (int nSize=1)
 Name: CIccTagFloatNum::CIccTagFloatNum.
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 Name: CIccTagFloatNum::Describe.
 
virtual const icCharGetClassName () const
 Name: CIccTagFloatNum::GetClassName.
 
virtual icUInt32Number GetNumValues () const
 
icUInt32Number GetSize () const
 Returns the size of the data array.
 
virtual icTagTypeSignature GetType () const
 Function: GetType()
 
virtual bool GetValues (icFloatNumber *DstVector, icUInt32Number nStart=0, icUInt32Number nVectorSize=1) const
 Name: CIccTagFloatNum::GetValues.
 
virtual bool Interpolate (icFloatNumber *DstVector, icFloatNumber val, icUInt32Number nVectorSize=1, icFloatNumber *zeroVals=NULL) const
 Name: CIccTagFloatNum::Interpolate.
 
virtual bool IsArrayType ()
 
virtual bool IsMatrixArray () const
 
virtual bool IsNumArrayType () const
 
virtual CIccTagNewCopy () const
 Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.
 
CIccTagFloatNumoperator= (const CIccTagFloatNum< T, Tsig > &NumTag)
 Name: CIccTagFloatNum::operator=.
 
T & operator[] (icUInt32Number index)
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 Name: CIccTagFloatNum::Read.
 
bool SetSize (icUInt32Number nSize, bool bZeroNew=true)
 Name: CIccTagFloatNum::SetSize.
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
 Name: CIccTagFloatNum::Interpolate.
 
virtual bool ValuePos (icFloatNumber &DstPos, icFloatNumber val, bool &bNoZero) const
 Name: CIccTagFloatNum::ValuePos.
 
virtual bool Write (CIccIO *pIO)
 Name: CIccTagFloatNum::Write.
 
virtual ~CIccTagFloatNum ()
 Name: CIccTagFloatNum::~CIccTagFloatNum.
 
- Public Member Functions inherited from CIccTag
 CIccTag ()
 Name: CIccTag::CIccTag.
 
virtual void DetachIO ()
 Function: ReadAll() - Read All sub data for tag from file.
 
virtual IIccExtensionTagGetExtension ()
 
virtual icArraySignature GetTagArrayType () const
 
virtual icStructSignature GetTagStructType () const
 
virtual bool IsMBBType ()
 
virtual bool IsSupported ()
 Function: IsSupported(size, pIO) - Check if tag fully supported for apply purposes.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO, CIccProfile *pProfile)
 Function: Read(size, pIO) - Read tag from file.
 
virtual bool ReadAll ()
 Function: ReadAll() - Read All sub data for tag from file.
 
virtual ~CIccTag ()
 Name: CIccTag::CIccTag.
 

Protected Attributes

icUInt32Number m_nSize
 
T * m_Num
 

Additional Inherited Members

- Static Public Member Functions inherited from CIccTag
static CIccTagCreate (icTagTypeSignature sig)
 Name: CIccTag::Create.
 
- Public Attributes inherited from CIccTag
icUInt32Number m_nReserved
 

Detailed Description

template<class T, icTagTypeSignature Tsig>
class CIccTagFloatNum< T, Tsig >

Class: CIccTagFloatNum.

Purpose: A template class for arrays of floating point numbers

Derived Tags: CIccTagFloat32 and CIccTagFloat64

Definition at line 1057 of file IccTagBasic.h.

Constructor & Destructor Documentation

◆ CIccTagFloatNum() [1/2]

template<class T , icTagTypeSignature Tsig>
CIccTagFloatNum< T, Tsig >::CIccTagFloatNum ( int nSize = 1)

Name: CIccTagFloatNum::CIccTagFloatNum.

Purpose: Constructor

Args: nSize = number of data entries

Definition at line 6162 of file IccTagBasic.cpp.

6163{
6164 m_nSize = nSize;
6165 if (m_nSize <1)
6166 m_nSize = 1;
6167 m_Num = (T*)calloc(nSize, sizeof(T));
6168}
icUInt32Number m_nSize

◆ CIccTagFloatNum() [2/2]

template<class T , icTagTypeSignature Tsig>
CIccTagFloatNum< T, Tsig >::CIccTagFloatNum ( const CIccTagFloatNum< T, Tsig > & ITNum)

Name: CIccTagFloatNum::CIccTagFloatNum.

Purpose: Copy Constructor

Args: ITNum = The CIccTagNum object to be copied

Definition at line 6182 of file IccTagBasic.cpp.

6183{
6184 m_nSize = ITNum.m_nSize;
6185
6186 m_Num = (T*)calloc(m_nSize, sizeof(T));
6187 memcpy(m_Num, ITNum.m_Num, m_nSize * sizeof(T));
6188}

References CIccTagFloatNum< T, Tsig >::m_nSize, and CIccTagFloatNum< T, Tsig >::m_Num.

◆ ~CIccTagFloatNum()

template<class T , icTagTypeSignature Tsig>
CIccTagFloatNum< T, Tsig >::~CIccTagFloatNum ( )
virtual

Name: CIccTagFloatNum::~CIccTagFloatNum.

Purpose: Destructor

Definition at line 6226 of file IccTagBasic.cpp.

6227{
6228 if (m_Num)
6229 free(m_Num);
6230}

Member Function Documentation

◆ Describe()

template<class T , icTagTypeSignature Tsig>
void CIccTagFloatNum< T, Tsig >::Describe ( std::string & sDescription,
int nVerboseness )
virtual

Name: CIccTagFloatNum::Describe.

Purpose: Dump data associated with the tag to a string

Args: sDescription - string to concatenate tag dump to

Reimplemented from CIccTag.

Definition at line 6387 of file IccTagBasic.cpp.

6388{
6389 icChar buf[128] = {0};
6390
6391 if (m_nSize == 1 ) {
6392 switch (sizeof(T)) {
6393 case 4:
6394 sprintf(buf, "Value = %.8f\n", m_Num[0]);
6395 break;
6396 case 8:
6397 sprintf(buf, "Value = %.16f\n", m_Num[0]);
6398 break;
6399 default:
6400 sprintf(buf, "Value = %.f\n", m_Num[0]);
6401 break;
6402 }
6403 sDescription += buf;
6404 }
6405 else {
6406 icUInt32Number i, n;
6407 sDescription.reserve(sDescription.size() + m_nSize*79);
6408
6409 sprintf(buf, "Begin_Value_Array[%d]\n", m_nSize);
6410 sDescription += buf;
6411
6412 if (sizeof(T)!=8)
6413 n=8;
6414 else
6415 n=4;
6416
6417 for (i=0; i<m_nSize; i++) {
6418 if (i&& !(i%n))
6419 sDescription += "\n";
6420
6421 switch (sizeof(T)) {
6422 case 4:
6423 sprintf(buf, " %.8f", m_Num[i]);
6424 break;
6425 case 8:
6426 sprintf(buf, " %.16f", m_Num[i]);
6427 break;
6428 default:
6429 sprintf(buf, " %f", m_Num[i]);
6430 }
6431 sDescription += buf;
6432 }
6433 if ((i%n)!=1)
6434 sDescription += "\n";
6435 sDescription += "End_Value_Array\n";
6436 }
6437}
char icChar
Definition IccDefs.h:109
unsigned int icUInt32Number

◆ GetClassName()

template<class T , icTagTypeSignature Tsig>
const icChar * CIccTagFloatNum< T, Tsig >::GetClassName ( ) const
virtual

Name: CIccTagFloatNum::GetClassName.

Purpose: Returns the tag type class name

Reimplemented from CIccTag.

Reimplemented in CIccTagXmlFloatNum< T, A, Tsig >.

Definition at line 6241 of file IccTagBasic.cpp.

6242{
6243 if (Tsig==icSigFloat16ArrayType)
6244 return "CIccFlaot16";
6245 if (Tsig==icSigFloat32ArrayType)
6246 return "CIccFloat32";
6247 else if (Tsig==icSigFloat64ArrayType)
6248 return "CIccFloat64";
6249 else
6250 return "CIccTagFloatNum<>";
6251}
@ icSigFloat16ArrayType
@ icSigFloat64ArrayType
@ icSigFloat32ArrayType

References icSigFloat16ArrayType, icSigFloat32ArrayType, and icSigFloat64ArrayType.

◆ GetNumValues()

template<class T , icTagTypeSignature Tsig>
virtual icUInt32Number CIccTagFloatNum< T, Tsig >::GetNumValues ( ) const
inlinevirtual

Implements CIccTagNumArray.

Definition at line 1085 of file IccTagBasic.h.

1085{ return GetSize(); }
icUInt32Number GetSize() const
Returns the size of the data array.

Referenced by CIccDefaultEncProfileConverter::ConvertFromParams().

+ Here is the caller graph for this function:

◆ GetSize()

template<class T , icTagTypeSignature Tsig>
icUInt32Number CIccTagFloatNum< T, Tsig >::GetSize ( ) const
inline

Returns the size of the data array.

Definition at line 1079 of file IccTagBasic.h.

1079{ return m_nSize; }

Referenced by CIccDefaultEncProfileConverter::ConvertFromParams(), and icGetParamFloatNum().

+ Here is the caller graph for this function:

◆ GetType()

template<class T , icTagTypeSignature Tsig>
virtual icTagTypeSignature CIccTagFloatNum< T, Tsig >::GetType ( ) const
inlinevirtual

Function: GetType()

Purpose: Get Tag Type. Each derived tag will implement it's own GetType() function.

Reimplemented from CIccTag.

Definition at line 1068 of file IccTagBasic.h.

1068{ return Tsig; }

◆ GetValues()

template<class T , icTagTypeSignature Tsig>
bool CIccTagFloatNum< T, Tsig >::GetValues ( icFloatNumber * DstVector,
icUInt32Number nStart = 0,
icUInt32Number nVectorSize = 1 ) const
virtual

Name: CIccTagFloatNum::GetValues.

Purpose: Gets values from the num array tag as floating point numbers

Args: nSize - number of data entries, bZeroNew - flag to zero newly formed values

Implements CIccTagNumArray.

Definition at line 6484 of file IccTagBasic.cpp.

6485{
6486 if (nVectorSize >m_nSize)
6487 return false;
6488
6490
6491 for (i=0; i<m_nSize; i++) {
6492 DstVector[i] = (icFloatNumber)m_Num[i+nStart];
6493 }
6494 return true;
6495}
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100

Referenced by CIccDefaultEncProfileConverter::ConvertFromParams().

+ Here is the caller graph for this function:

◆ Interpolate()

template<class T , icTagTypeSignature Tsig>
bool CIccTagFloatNum< T, Tsig >::Interpolate ( icFloatNumber * DstVector,
icFloatNumber pos,
icUInt32Number nVectorSize = 1,
icFloatNumber * zeroVals = NULL ) const
virtual

Name: CIccTagFloatNum::Interpolate.

Purpose: Gets values from the num array tag as floating point numbers

Args: nSize - number of data entries, bZeroNew - flag to zero newly formed values

Implements CIccTagNumArray.

Definition at line 6545 of file IccTagBasic.cpp.

6547{
6548 icUInt32Number nVector = m_nSize / nVectorSize;
6549
6550 if (!nVector)
6551 return false;
6552
6553 if (zeroVals)
6554 nVector ++;
6555 else if (nVector<=1)
6556 return false;
6557
6558 if (pos<0.0)
6559 pos=0.0;
6560 if (pos>1.0)
6561 pos=1.0;
6562
6563 icFloatNumber fpos = (icFloatNumber)(nVector-1) * pos;
6564 icUInt32Number iPos = (icUInt32Number)fpos;
6565 icFloatNumber x = fpos - iPos;
6566 icFloatNumber invx = (1.0f - x);
6567
6568 if (iPos == nVector-1) {
6569 iPos--;
6570 x = (icFloatNumber)1.0f;
6571 invx = (icFloatNumber)0.0f;
6572 }
6573
6574 T *lo, *hi;
6575
6576 if (zeroVals) {
6577 if (!iPos) {
6578 lo = NULL;
6579 hi = m_Num;
6580 }
6581 else {
6582 lo = &m_Num[(iPos-1)*nVectorSize];
6583 hi = &lo[nVectorSize];
6584 }
6585 }
6586 else {
6587 lo = &m_Num[iPos*nVectorSize];
6588 hi = &lo[nVectorSize];
6589 }
6590
6592
6593 if (!lo) {
6594 for (i=0; i<nVectorSize; i++) {
6595 DstVector[i] = (icFloatNumber)(zeroVals[i]*invx + hi[i]*x);
6596 }
6597 }
6598 else {
6599 for (i=0; i<nVectorSize; i++) {
6600 DstVector[i] = (icFloatNumber)(lo[i]*invx + hi[i]*x);
6601 }
6602 }
6603 return true;
6604}

◆ IsArrayType()

template<class T , icTagTypeSignature Tsig>
virtual bool CIccTagFloatNum< T, Tsig >::IsArrayType ( )
inlinevirtual

Reimplemented from CIccTag.

Definition at line 1066 of file IccTagBasic.h.

1066{ return m_nSize > 1; }

◆ IsMatrixArray()

template<class T , icTagTypeSignature Tsig>
virtual bool CIccTagFloatNum< T, Tsig >::IsMatrixArray ( ) const
inlinevirtual

Implements CIccTagNumArray.

Definition at line 1091 of file IccTagBasic.h.

1091{ return false; }

◆ IsNumArrayType()

template<class T , icTagTypeSignature Tsig>
virtual bool CIccTagFloatNum< T, Tsig >::IsNumArrayType ( ) const
inlinevirtual

Reimplemented from CIccTag.

Definition at line 1082 of file IccTagBasic.h.

1082{ return true; }

◆ NewCopy()

template<class T , icTagTypeSignature Tsig>
virtual CIccTag * CIccTagFloatNum< T, Tsig >::NewCopy ( ) const
inlinevirtual

Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.

Parameter(s): none

Returns a new CIccTag object that is a copy of this object.

Reimplemented from CIccTag.

Definition at line 1063 of file IccTagBasic.h.

1063{ return new CIccTagFloatNum<T, Tsig>(*this); }
CIccTagFloatNum(int nSize=1)
Name: CIccTagFloatNum::CIccTagFloatNum.

◆ operator=()

template<class T , icTagTypeSignature Tsig>
CIccTagFloatNum< T, Tsig > & CIccTagFloatNum< T, Tsig >::operator= ( const CIccTagFloatNum< T, Tsig > & ITNum)

Name: CIccTagFloatNum::operator=.

Purpose: Copy Operator

Args: ITNum = The CIccTagNum object to be copied

Definition at line 6202 of file IccTagBasic.cpp.

6203{
6204 if (&ITNum == this)
6205 return *this;
6206
6207 m_nSize = ITNum.m_nSize;
6208
6209 m_Num = (T*)calloc(m_nSize, sizeof(T));
6210 memcpy(m_Num, ITNum.m_Num, m_nSize * sizeof(T));
6211
6212 return *this;
6213}

References CIccTagFloatNum< T, Tsig >::m_nSize, and CIccTagFloatNum< T, Tsig >::m_Num.

◆ operator[]()

template<class T , icTagTypeSignature Tsig>
T & CIccTagFloatNum< T, Tsig >::operator[] ( icUInt32Number index)
inline

Definition at line 1076 of file IccTagBasic.h.

1076{return m_Num[index];}

◆ Read()

template<class T , icTagTypeSignature Tsig>
bool CIccTagFloatNum< T, Tsig >::Read ( icUInt32Number size,
CIccIO * pIO )
virtual

Name: CIccTagFloatNum::Read.

Purpose: Read in the tag contents into a data block

Args: size - # of bytes in tag, pIO - IO object to read tag from

Return: true = successful, false = failure

Reimplemented from CIccTag.

Definition at line 6269 of file IccTagBasic.cpp.

6270{
6272
6273 if (Tsig==icSigFloat16ArrayType) {
6274 if (sizeof(icTagTypeSignature) +
6275 sizeof(icUInt32Number) +
6276 sizeof(icFloat16Number) > size)
6277 return false;
6278 }
6279 else {
6280 if (sizeof(icTagTypeSignature) +
6281 sizeof(icUInt32Number) +
6282 sizeof(T) > size)
6283 return false;
6284 }
6285
6286 if (!pIO) {
6287 return false;
6288 }
6289
6290 if (!pIO->Read32(&sig))
6291 return false;
6292
6293 if (!pIO->Read32(&m_nReserved))
6294 return false;
6295
6296 if (Tsig==icSigFloat16ArrayType) {
6297 icUInt32Number nSize=((size-2*sizeof(icUInt32Number)) / sizeof(icFloat16Number));
6298
6299 if (!SetSize(nSize))
6300 return false;
6301
6302 if (pIO->ReadFloat16Float(&m_Num[0], nSize) != (icInt32Number)nSize)
6303 return false;
6304 }
6305 else if (Tsig==icSigFloat32ArrayType) {
6306 icUInt32Number nSize=((size-2*sizeof(icUInt32Number)) / sizeof(icFloat32Number));
6307
6308 if (!SetSize(nSize))
6309 return false;
6310
6311 if (pIO->Read32(m_Num, nSize) != (icInt32Number)nSize )
6312 return false;
6313 }
6314 else if (Tsig==icSigFloat64ArrayType) {
6315 icUInt32Number nSize=((size-2*sizeof(icUInt32Number)) / sizeof(icFloat64Number));
6316
6317 if (!SetSize(nSize))
6318 return false;
6319
6320 if (pIO->Read64(m_Num, nSize) != (icInt32Number)nSize )
6321 return false;
6322 }
6323 else
6324 return false;
6325
6326 return true;
6327}
icArraySignature sig
icTagTypeSignature
icInt32Number ReadFloat16Float(void *pBufFloat, icInt32Number nNum=1)
Definition IccIO.cpp:269
icInt32Number Read64(void *pBuf64, icInt32Number nNum=1)
Definition IccIO.cpp:173
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:143
bool SetSize(icUInt32Number nSize, bool bZeroNew=true)
Name: CIccTagFloatNum::SetSize.
icUInt32Number m_nReserved
float icFloat32Number
long icInt32Number
icUInt16Number icFloat16Number
IEEE float storage numbers.
double icFloat64Number

References icSigFloat16ArrayType, icSigFloat32ArrayType, icSigFloat64ArrayType, CIccIO::Read32(), CIccIO::Read64(), CIccIO::ReadFloat16Float(), and sig.

+ Here is the call graph for this function:

◆ SetSize()

template<class T , icTagTypeSignature Tsig>
bool CIccTagFloatNum< T, Tsig >::SetSize ( icUInt32Number nSize,
bool bZeroNew = true )

Name: CIccTagFloatNum::SetSize.

Purpose: Sets the size of the data array.

Args: nSize - number of data entries, bZeroNew - flag to zero newly formed values

Definition at line 6452 of file IccTagBasic.cpp.

6453{
6454 if (nSize==m_nSize)
6455 return true;
6456
6457 m_Num = (T*)icRealloc(m_Num, nSize*sizeof(T));
6458
6459 if (!m_Num) {
6460 m_nSize = 0;
6461 return false;
6462 }
6463
6464 if (bZeroNew && m_nSize < nSize) {
6465 memset(&m_Num[m_nSize], 0, (nSize-m_nSize)*sizeof(T));
6466 }
6467 m_nSize = nSize;
6468
6469 return true;
6470}
void * icRealloc(void *ptr, size_t size)
Name: icRealloc.
Definition IccUtil.cpp:111

References icRealloc().

+ Here is the call graph for this function:

◆ Validate()

template<class T , icTagTypeSignature Tsig>
icValidateStatus CIccTagFloatNum< T, Tsig >::Validate ( std::string sigPath,
std::string & sReport,
const CIccProfile * pProfile = NULL ) const
virtual

Name: CIccTagFloatNum::Interpolate.

Purpose: Gets values from the num array tag as floating point numbers

Args: nSize - number of data entries, bZeroNew - flag to zero newly formed values

Reimplemented from CIccTag.

Definition at line 6510 of file IccTagBasic.cpp.

6511{
6513 //Check # of channels
6515 pProfile &&
6516 m_nSize != icGetMaterialColorSpaceSamples(pProfile->m_Header.mcs)) {
6517 CIccInfo Info;
6518 std::string sSigPathName = Info.GetSigPathName(sigPath);
6519
6520 sReport += icMsgValidateCriticalError;
6521 sReport += sSigPathName;
6522 sReport += " - Number of material default values does not match MCS in header.\n";
6524 }
6525
6526 rv = icMaxStatus(rv, CIccTagNumArray::Validate(sigPath, sReport, pProfile));
6527
6528 return rv;
6529}
icValidateStatus
Definition IccDefs.h:118
@ icValidateOK
Definition IccDefs.h:119
@ icValidateCriticalError
Definition IccDefs.h:122
icValidateStatus icMaxStatus(icValidateStatus s1, icValidateStatus s2)
Name: icMaxStatus.
Definition IccUtil.cpp:244
icUInt32Number icGetMaterialColorSpaceSamples(icMaterialColorSignature sig)
Definition IccUtil.cpp:1391
const char * icMsgValidateCriticalError
Definition IccUtil.cpp:92
icSignature icGetFirstSigPathSig(std::string sigPath)
Definition IccUtil.cpp:1201
Type: Class.
Definition IccUtil.h:303
std::string GetSigPathName(std::string sigPath)
Definition IccUtil.cpp:1614
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
Function: Validate Each derived tag will implement it's own IsValid() function.
@ icSigMaterialDefaultValuesTag

References CIccInfo::GetSigPathName(), icGetFirstSigPathSig(), icGetMaterialColorSpaceSamples(), icMaxStatus(), icMsgValidateCriticalError, icSigMaterialDefaultValuesTag, icValidateCriticalError, icValidateOK, and CIccTag::Validate().

+ Here is the call graph for this function:

◆ ValuePos()

template<class T , icTagTypeSignature Tsig>
bool CIccTagFloatNum< T, Tsig >::ValuePos ( icFloatNumber & DstPos,
icFloatNumber val,
bool & bNoZero ) const
virtual

Name: CIccTagFloatNum::ValuePos.

Purpose: Gets position of a value int the num array tag

Args: DstPos - position of val in array val - value to look for in array. bNoZero - flag indicating whether first entry is zero

Implements CIccTagNumArray.

Definition at line 6620 of file IccTagBasic.cpp.

6621{
6622 if(val<0.0)
6623 return false;
6624
6625 icFloatNumber nv = 0.0;
6626 icFloatNumber lv = 0.0;
6627
6628 lv = (icFloatNumber)m_Num[0];
6629
6630 bNoZero = (lv!=0.0);
6631
6632 if (val<lv) {
6633 DstPos = val/lv - 1.0f;
6634 return true;
6635 }
6636
6638 for (i=1; i<m_nSize; i++, lv=nv) {
6639 nv = (icFloatNumber)m_Num[i];
6640
6641 if (val<=nv) {
6642 DstPos = (val-lv)/(nv-lv) + i - 1.0f;
6643 return true;
6644 }
6645 }
6646
6647 return false;
6648}

◆ Write()

template<class T , icTagTypeSignature Tsig>
bool CIccTagFloatNum< T, Tsig >::Write ( CIccIO * pIO)
virtual

Name: CIccTagFloatNum::Write.

Purpose: Write the tag to a file

Args: pIO - The IO object to write tag to.

Return: true = succesful, false = failure

Reimplemented from CIccTag.

Definition at line 6344 of file IccTagBasic.cpp.

6345{
6347
6348 if (!pIO)
6349 return false;
6350
6351 if (!pIO->Write32(&sig))
6352 return false;
6353
6354 if (!pIO->Write32(&m_nReserved))
6355 return false;
6356
6357 if (Tsig==icSigFloat16ArrayType) {
6359 return false;
6360 }
6361 else if (Tsig == icSigFloat32ArrayType) {
6362 if (pIO->Write32(m_Num, m_nSize) != (icInt32Number)m_nSize)
6363 return false;
6364 }
6365 else if (Tsig == icSigFloat64ArrayType) {
6366 if (pIO->Write64(m_Num, m_nSize) != (icInt32Number)m_nSize)
6367 return false;
6368 }
6369 else
6370 return false;
6371
6372 return true;
6373}
icInt32Number WriteFloat16Float(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:285
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:152
icInt32Number Write64(void *pBuf64, icInt32Number nNum=1)
Definition IccIO.cpp:182
virtual icTagTypeSignature GetType() const
Function: GetType()

References icSigFloat16ArrayType, icSigFloat32ArrayType, icSigFloat64ArrayType, sig, CIccIO::Write32(), CIccIO::Write64(), and CIccIO::WriteFloat16Float().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_nSize

template<class T , icTagTypeSignature Tsig>
icUInt32Number CIccTagFloatNum< T, Tsig >::m_nSize
protected

◆ m_Num

template<class T , icTagTypeSignature Tsig>
T* CIccTagFloatNum< T, Tsig >::m_Num
protected

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