OsmAnd
Classes | Defines | Functions | Variables
jni/osmand/binaryRead.cpp File Reference
#include <math.h>
#include <android/log.h>
#include <stdio.h>
#include <fstream>
#include <map>
#include <hash_map>
#include "google/protobuf/io/zero_copy_stream_impl.h"
#include "google/protobuf/wire_format_lite.h"
#include "google/protobuf/wire_format_lite.cc"
#include "renderRules.h"
#include "common.h"
#include "mapObjects.h"
#include "multipolygons.h"
#include "proto/osmand_odb.pb.h"

Classes

struct  SearchQuery
struct  MapTreeBounds
struct  MapRoot
struct  MapIndex
struct  BinaryMapFile

Defines

#define _OSMAND_BINARY_READ
#define INT_MAX   0x7fffffff /* max value for an int */
#define DO_(EXPRESSION)   if (!(EXPRESSION)) return false

Functions

bool readInt (io::CodedInputStream *input, uint32 *sz)
bool skipFixed32 (io::CodedInputStream *input)
bool skipUnknownFields (io::CodedInputStream *input, int tag)
bool readMapTreeBounds (io::CodedInputStream *input, MapTreeBounds *tree, MapRoot *root)
bool readMapLevel (io::CodedInputStream *input, MapRoot *root)
bool readMapEncodingRule (io::CodedInputStream *input, MapIndex *index)
bool readMapIndex (io::CodedInputStream *input, MapIndex *mapIndex)
bool initMapStructure (io::CodedInputStream *input, BinaryMapFile *file)
void loadJniBinaryRead ()
JNIEXPORT void JNICALL Java_net_osmand_plus_render_NativeOsmandLibrary_deleteSearchResult (JNIEnv *ienv, jobject obj, jint searchResult)
bool readStringTable (io::CodedInputStream *input, std::vector< std::string > &list)
MapDataObjectreadMapDataObject (io::CodedInputStream *input, int left, int right, int top, int bottom, SearchQuery *req, MapIndex *root)
bool searchMapTreeBounds (io::CodedInputStream *input, int pleft, int pright, int ptop, int pbottom, SearchQuery *req, MapIndex *root)
void searchMapData (io::CodedInputStream *input, MapRoot *root, MapIndex *ind, SearchQuery *req)
JNIEXPORT jint JNICALL Java_net_osmand_plus_render_NativeOsmandLibrary_searchObjectsForRendering (JNIEnv *ienv, jobject obj, jint sleft, jint sright, jint stop, jint sbottom, jint zoom, jstring mapName, jobject renderingRuleSearchRequest, bool skipDuplicates, jint searchResult, jobject objInterrupted)
JNIEXPORT jboolean JNICALL Java_net_osmand_plus_render_NativeOsmandLibrary_initBinaryMapFile (JNIEnv *ienv, jobject obj, jobject path)

Variables

char errorMsg [1024]
std::map< std::string,
BinaryMapFile * > 
openFiles

Define Documentation

#define DO_ (   EXPRESSION)    if (!(EXPRESSION)) return false
#define INT_MAX   0x7fffffff /* max value for an int */

Function Documentation

bool initMapStructure ( io::CodedInputStream input,
BinaryMapFile file 
)
JNIEXPORT void JNICALL Java_net_osmand_plus_render_NativeOsmandLibrary_deleteSearchResult ( JNIEnv *  ienv,
jobject  obj,
jint  searchResult 
)
JNIEXPORT jboolean JNICALL Java_net_osmand_plus_render_NativeOsmandLibrary_initBinaryMapFile ( JNIEnv *  ienv,
jobject  obj,
jobject  path 
)
JNIEXPORT jint JNICALL Java_net_osmand_plus_render_NativeOsmandLibrary_searchObjectsForRendering ( JNIEnv *  ienv,
jobject  obj,
jint  sleft,
jint  sright,
jint  stop,
jint  sbottom,
jint  zoom,
jstring  mapName,
jobject  renderingRuleSearchRequest,
bool  skipDuplicates,
jint  searchResult,
jobject  objInterrupted 
)
bool readInt ( io::CodedInputStream input,
uint32 sz 
)
MapDataObject* readMapDataObject ( io::CodedInputStream input,
int  left,
int  right,
int  top,
int  bottom,
SearchQuery req,
MapIndex *  root 
)
bool readMapEncodingRule ( io::CodedInputStream input,
MapIndex *  index 
)
bool readMapIndex ( io::CodedInputStream input,
MapIndex *  mapIndex 
)
bool readMapLevel ( io::CodedInputStream input,
MapRoot *  root 
)
bool readMapTreeBounds ( io::CodedInputStream input,
MapTreeBounds tree,
MapRoot *  root 
)
bool readStringTable ( io::CodedInputStream input,
std::vector< std::string > &  list 
)
void searchMapData ( io::CodedInputStream input,
MapRoot *  root,
MapIndex *  ind,
SearchQuery req 
)
bool searchMapTreeBounds ( io::CodedInputStream input,
int  pleft,
int  pright,
int  ptop,
int  pbottom,
SearchQuery req,
MapIndex *  root 
)
bool skipFixed32 ( io::CodedInputStream input)
bool skipUnknownFields ( io::CodedInputStream input,
int  tag 
)

Variable Documentation

char errorMsg[1024]
std::map<std::string, BinaryMapFile*> openFiles
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines