getTemplateCount method

int getTemplateCount()

Gets the current number of indexed templates.

return Current number of indexed templates. throws FaceException An error has occurred during Face Library execution.

Implementation

int getTemplateCount() {
  Pointer<Int> pTemplateCount = calloc();
  try {
    var err = faceSDK.id3FaceIndexer_GetTemplateCount(_pHandle.value, pTemplateCount);
    if (err != FaceError.success.value) {
      throw FaceException(err);
    }
    final vTemplateCount = pTemplateCount.value;
    return vTemplateCount;
  } finally {
    calloc.free(pTemplateCount);
  }
}