Helper class to automagically call PylonInitialize and PylonTerminate in constructor and destructor.
#include<pylon/TlFactory.h>// ...usingnamespacePylon;intmain(intargc,char*argv[]){PylonAutoInitTermautoInitTerm;// Get the transport layer factoryCTlFactory&TlFactory=CTlFactory::GetInstance();// Get all attached cameras and exit application if no camera is foundDeviceInfoList_tdevices;if(0==TlFactory.EnumerateDevices(devices)){cerr<<"No camera present!"<<endl;return1;}else{// do something with devices ...//...}return0;}// When leaving the main function, the destructor of the PylonAutoInitTerm object will be called// and it will in turn call PylonTerminate.