本文整理汇总了C++中CallbackInfo::dataTemplateDestructionCallbackFunction方法的典型用法代码示例。如果您正苦于以下问题:C++ CallbackInfo::dataTemplateDestructionCallbackFunction方法的具体用法?C++ CallbackInfo::dataTemplateDestructionCallbackFunction怎么用?C++ CallbackInfo::dataTemplateDestructionCallbackFunction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CallbackInfo
的用法示例。
在下文中一共展示了CallbackInfo::dataTemplateDestructionCallbackFunction方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: destroyHashtable
/**
* De-allocates memory of the given hashtable buffer.
* All remaining Buckets are exported, then destroyed
*/
void destroyHashtable(Hashtable* ht)
{
int i;
for (i = 0; i < HASHTABLE_SIZE; i++) if (ht->bucket[i] != NULL) {
HashBucket* bucket = ht->bucket[i];
while (bucket != 0) {
HashBucket* nextBucket = (HashBucket*)bucket->next;
exportBucket(ht, bucket);
destroyBucket(ht, bucket);
bucket = nextBucket;
}
}
/* Inform Exporter of Data Template destruction */
for (i = 0; i < ht->callbackCount; i++) {
CallbackInfo* ci = &ht->callbackInfo[i];
if (ci->dataTemplateDestructionCallbackFunction) {
ci->dataTemplateDestructionCallbackFunction(ci->handle, 0, ht->dataTemplate);
}
}
free(ht->dataTemplate->fieldInfo);
free(ht->fieldModifier);
free(ht->dataTemplate->dataInfo);
free(ht->dataTemplate->data);
free(ht->dataTemplate);
free(ht);
}
示例2: dbReaderDestroyTemplate
/**
* get all tableNames in database that matches with the wildcard "h%"
**/
int dbReaderDestroyTemplate(IpfixDbReader* ipfixDbReader, DataTemplateInfo* dataTemplateInfo)
{
int n;
DbReader* dbReader = ipfixDbReader->dbReader;
for (n = 0; n != dbReader->callbackCount; n++) {
CallbackInfo* ci = &dbReader->callbackInfo[n];
if (ci->dataTemplateDestructionCallbackFunction) {
ci->dataTemplateDestructionCallbackFunction(ci->handle, &ipfixDbReader->srcId,
dataTemplateInfo);
msg(MSG_DEBUG,"IpfixDbReader destroyed template");
}
}
free(dataTemplateInfo->fieldInfo);
return 0;
}