Home > Back-end >  C function object operator () how to use Delphi to express
C function object operator () how to use Delphi to express

Time:04-26

One of the c + + struct typedef struct _tagEQDATA function object operator () (int, int), in comparison, return a pointer to a function
 
EQVARIENT * operator () (const unsigned int code, const unsigned int indicator, const unsigned int the date=0)
{
EQVARIENT * pEQVar=NULL;
If (valueArray. NSize==0)
{
Return pEQVar;
}

If (valueArray nSize!=codeArray) nSize * dateArray) nSize * indicatorArray nSize)
{
Return pEQVar;
}

If (code & lt; CodeArray. NSize & amp; & Indicator & lt; IndicatorArray. NSize & amp; & The date & lt; DateArray. NSize)
{
Int nIndex=codeArray) nSize * indicatorArray) nSize * date + indicatorArray nSize * code + indicator;
PEQVar=valueArray. PEQVarient;
PEQVar +=nIndex;
}

Return pEQVar;
}

This structure the function object in how to use the Delphi, express record
  • Related