当前位置: 首页>>代码示例>>C++>>正文


C++ LEReferenceTo::process方法代码示例

本文整理汇总了C++中LEReferenceTo::process方法的典型用法代码示例。如果您正苦于以下问题:C++ LEReferenceTo::process方法的具体用法?C++ LEReferenceTo::process怎么用?C++ LEReferenceTo::process使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LEReferenceTo的用法示例。


在下文中一共展示了LEReferenceTo::process方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: process

U_NAMESPACE_BEGIN

le_uint32 PairPositioningSubtable::process(const LEReferenceTo<PairPositioningSubtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
{
    switch(SWAPW(subtableFormat))
    {
    case 0:
        return 0;

    case 1:
    {
      const LEReferenceTo<PairPositioningFormat1Subtable> subtable(base, success, (const PairPositioningFormat1Subtable *) this);

      if(LE_SUCCESS(success))
      return subtable->process(subtable, glyphIterator, fontInstance, success);
      else
        return 0;
    }

    case 2:
    {
      const LEReferenceTo<PairPositioningFormat2Subtable> subtable(base, success, (const PairPositioningFormat2Subtable *) this);

      if(LE_SUCCESS(success))
      return subtable->process(subtable, glyphIterator, fontInstance, success);
      else
        return 0;
    }
    default:
      return 0;
    }
}
开发者ID:icu-project,项目名称:icu4c,代码行数:32,代码来源:PairPositioningSubtables.cpp

示例2: process

U_NAMESPACE_BEGIN

le_uint32 SingleSubstitutionSubtable::process(const LEReferenceTo<SingleSubstitutionSubtable> &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const
{
    switch(SWAPW(subtableFormat))
    {
    case 0:
        return 0;

    case 1:
    {
      const LEReferenceTo<SingleSubstitutionFormat1Subtable> subtable(base, success, (const SingleSubstitutionFormat1Subtable *) this);

      return subtable->process(subtable, glyphIterator, success, filter);
    }

    case 2:
    {
      const LEReferenceTo<SingleSubstitutionFormat2Subtable> subtable(base, success, (const SingleSubstitutionFormat2Subtable *) this);

      return subtable->process(subtable, glyphIterator, success, filter);
    }

    default:
        return 0;
    }
}
开发者ID:icu-project,项目名称:icu4c,代码行数:27,代码来源:SingleSubstitutionSubtables.cpp

示例3: process

U_NAMESPACE_BEGIN

void MorphTableHeader::process(const LETableReference &base, LEGlyphStorage &glyphStorage, LEErrorCode &success) const
{
  le_uint32 chainCount = SWAPL(this->nChains);
  LEReferenceTo<ChainHeader> chainHeader(base, success, chains); // moving header
    LEReferenceToArrayOf<ChainHeader> chainHeaderArray(base, success, chains, chainCount);
    le_uint32 chain;

    for (chain = 0; LE_SUCCESS(success) && (chain < chainCount); chain += 1) {
        if (chain > 0) {
            le_uint32 chainLength = SWAPL(chainHeader->chainLength);
            if (chainLength & 0x03) { // incorrect alignment for 32 bit tables
                success = LE_MEMORY_ALLOCATION_ERROR; // as good a choice as any
                return;
            }
            chainHeader.addOffset(chainLength, success);
        }
        FeatureFlags defaultFlags = SWAPL(chainHeader->defaultFlags);
        le_int16 nFeatureEntries = SWAPW(chainHeader->nFeatureEntries);
        le_int16 nSubtables = SWAPW(chainHeader->nSubtables);
        LEReferenceTo<MorphSubtableHeader> subtableHeader =
          LEReferenceTo<MorphSubtableHeader>(chainHeader,success, &(chainHeader->featureTable[nFeatureEntries]));
        le_int16 subtable;

        for (subtable = 0; LE_SUCCESS(success) && (subtable < nSubtables); subtable += 1) {
            if (subtable > 0) {
                le_int16 length = SWAPW(subtableHeader->length);
                if (length & 0x03) { // incorrect alignment for 32 bit tables
                    success = LE_MEMORY_ALLOCATION_ERROR; // as good a choice as any
                    return;
                }
                subtableHeader.addOffset(length, success);
            }
            SubtableCoverage coverage = SWAPW(subtableHeader->coverage);
            FeatureFlags subtableFeatures = SWAPL(subtableHeader->subtableFeatures);

            // should check coverage more carefully...
            if ((coverage & scfVertical) == 0 && (subtableFeatures & defaultFlags) != 0  && LE_SUCCESS(success)) {
              subtableHeader->process(subtableHeader, glyphStorage, success);
            }
        }
    }
}
开发者ID:krichter722,项目名称:jdk8u-jdk8u-jdk-native,代码行数:44,代码来源:MorphTables.cpp


注:本文中的LEReferenceTo::process方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。