/* * Class: ch_heigvd_jpal_JPal * Method: jpal_getSearchMethod * Signature: ()I */ JNIEXPORT jint JNICALL Java_ch_heigvd_jpal_JPal_getSearchMethod (JNIEnv *env, jobject obj) { jclass cls = env->GetObjectClass (obj); jfieldID fid = env->GetFieldID (cls, "pal_adr", "J"); Pal *pal = (Pal*) env->GetLongField (obj, fid); SearchMethod method = pal->getSearch(); int return_value = -1; switch (method) { case POPMUSIC_TABU: return_value = ch_heigvd_jpal_JPal_POPMUSIC_TABU; break; case POPMUSIC_CHAIN: return_value = ch_heigvd_jpal_JPal_POPMUSIC_CHAIN; break; case POPMUSIC_TABU_CHAIN: return_value = ch_heigvd_jpal_JPal_POPMUSIC_TABU_CHAIN; break; case CHAIN: return_value = ch_heigvd_jpal_JPal_CHAIN; break; } return return_value; }
QgsPalLabeling::QgsPalLabeling() : mMapRenderer( NULL ), mPal( NULL ) { // find out engine defaults Pal p; mCandPoint = p.getPointP(); mCandLine = p.getLineP(); mCandPolygon = p.getPolyP(); switch ( p.getSearch() ) { case CHAIN: mSearch = Chain; break; case POPMUSIC_TABU: mSearch = Popmusic_Tabu; break; case POPMUSIC_CHAIN: mSearch = Popmusic_Chain; break; case POPMUSIC_TABU_CHAIN: mSearch = Popmusic_Tabu_Chain; break; case FALP: mSearch = Falp; break; } mShowingCandidates = false; mShowingAllLabels = false; mLabelSearchTree = new QgsLabelSearchTree(); }