Revision 970 trunk/libraries/libjni-gdal/src/ogrfeature_interfaz.cpp

View differences:

ogrfeature_interfaz.cpp
32 32
#include "ogrsf_frmts.h"
33 33

  
34 34
/******************************************************************************/
35
//									~OGRFeature
35
//								dumpReadable
36 36
/******************************************************************************/
37 37

  
38
JNIEXPORT void JNICALL Java_es_gva_cit_jogr_OGRFeature_dumpReadableNat
39
  (JNIEnv *env, jobject obj, jlong cPtr, jstring file){
40
  	 
41
  	const char *nomfile;
42
  	FILE *fp;
43
  	OGRFeature *feature = (OGRFeature *) 0 ;
44
  	
45
  	feature = *(OGRFeature **)&cPtr;
46
  	if(file!=NULL){
47
	  	nomfile = env->GetStringUTFChars(file, 0);
48
  		fp = fopen(nomfile,"a+");
49
	  	if(!fp)return;
50
	  	feature->DumpReadable(fp);
51
	  	fclose(fp);
52
	  	env->ReleaseStringUTFChars(file, nomfile);
53
	  	return;
54
  	}
55
	
56
  	feature->DumpReadable(NULL);
57
  	
58
  	    	 
59
  }
60
  
61
/******************************************************************************/
62
//								~OGRFeature
63
/******************************************************************************/
64

  
38 65
JNIEXPORT void JNICALL Java_es_gva_cit_jogr_OGRFeature_FreeOGRFeatureNat
39 66
  (JNIEnv *env, jobject obj, jlong cPtr){
40 67
  	
......
42 69
  	
43 70
  	df = *(OGRFeature **)&cPtr;
44 71
  	if(df!=NULL){
45
  		df->~OGRFeature();
72
  		delete df;
46 73
  	}
47 74
  }

Also available in: Unified diff