jobject vector_Ptr_Layer_to_List(JNIEnv* env, std::vector<cv::Ptr<cv::dnn::Layer> >& vs) { static jclass juArrayList = ARRAYLIST(env); static jmethodID m_create = CONSTRUCTOR(env, juArrayList); jmethodID m_add = LIST_ADD(env, juArrayList); static jclass jLayerClass = LAYER(env); static jmethodID m_create_layer = LAYER_CONSTRUCTOR(env, jLayerClass); jobject result = env->NewObject(juArrayList, m_create, vs.size()); for (std::vector< cv::Ptr<cv::dnn::Layer> >::iterator it = vs.begin(); it != vs.end(); ++it) { jobject element = env->NewObject(jLayerClass, m_create_layer, (*it).get()); env->CallBooleanMethod(result, m_add, element); env->DeleteLocalRef(element); } return result; }
ResourcePool::ResourcePool(const Logger::LoggerSP& iLogger, size_t iPoolSize, const ResourceFactorySP& iFactory) : factory(iFactory), poolSize(iPoolSize), instantiatedResources(0), logger(iLogger) { CONSTRUCTOR(this); }
ResourcePool::ResourcePool(size_t iPoolSize, const ResourceFactorySP& iFactory) : factory(iFactory), poolSize(iPoolSize), instantiatedResources(0), logger(Logger::Logger::GetLogger<Logger::StderrLogger>()) { CONSTRUCTOR(this); }
StderrLogger::StderrLogger() : logStringMap(initLogStringMap()) { CONSTRUCTOR(this); }