[V8i C++] Best way to retrieve POD files?

Currently I am checking for and storing the eeh for each pod file using mdlscancriteria..  

What if the user attaches a pod file after I have does this scan... Do I need to continously run this scan every time I want to run a process?

Is there a *_setfunction function that will notify me if a pod file was attached? That way, I could scan once, and any time a pod is attached, I can append to my array.  Any thoughts would be great!


This is what I am currently using.. I would really like something more efficient.


POD_Files.clear();

ScanCriteriaP scP = mdlScanCriteria_create ();

mdlScanCriteria_setModel(scP, ACTIVEMODEL);
mdlScanCriteria_setReturnType (scP, MSSCANCRIT_ITERATE_ELMREF, false, true);
mdlScanCriteria_setElemRefCallback (scP, ScanCrit_Locate_POD_Files, NULL);
mdlScanCriteria_addSingleElementTypeTest (scP, EXTENDED_ELM);
mdlScanCriteria_scan (scP, NULL, NULL, NULL);


mdlScanCriteria_free (scP);



	int ScanCrit_Locate_POD_Files (ElementRef elemRef,void* callbackArg, ScanCriteria* scP){

ElemHandle eh (elemRef, ACTIVEMODEL);

PointCloudHandler* handlerP = dynamic_cast<PointCloudHandler*>(&eh.GetHandler ());
if (NULL != handlerP)
{
POINTCLOUDDATA.POD_Files.push_back(eh.GetElemRef());
}

return SUCCESS;
}
Parents Reply Children