bool operator()(const TePoint& p1, const TePoint& p2) const { if(p1.location().x_ < p2.location().x_) return true; else if(p1.location().x_ > p2.location().x_) return false; if(p1.location().y_ < p2.location().y_) return true; else if(p1.location().y_ > p2.location().y_) return false; return false; }
bool TeSQLite::insertPoint(const string& table, TePoint &p) { std::string q = "INSERT INTO " + table + "(object_id, x, y)"; q += " VALUES("; q += "'" + escapeSequence(p.objectId()) + "',"; q += Te2String(p.location().x_) + ","; q += Te2String(p.location().y_) + ")"; if(execute(q) == false) { return false; } //int newId = getMaxValue(this, table, "geom_id"); int newId = getLastInsertedSerial(); if(newId >= 0) { p.geomId(newId); } return true; }