void insert(box2d<double> const& box, mapnik::value_unicode_string const& text) { if (tree_.extent().intersects(box)) { tree_.insert(label(box, text), box); } }
void insert(box2d<double> const& box) { if (tree_.extent().intersects(box)) { tree_.insert(label(box), box); } }
void set(const char *name, const char *value) { node *n = tree.search(name); if (!n) { // This variable does not currently exist. Create a node for it. n = new node; n->name = new char [strlen(name) + 2]; strcpy(n->name + 1, name); tree.insert(n); } else // Delete current value. delete [] n->value; if (value) { if (strlen(value) == 0) value = 0; } if (value) { n->value = new char [strlen(value) + 1]; strcpy(n->value, value); } else { // Variable is being set to empty string, which deletes it. tree.remove(name); delete [] n->name; delete n; } }
bool has_placement(box2d<double> const& box) { tree_t::query_iterator itr = tree_.query_in_box(box); tree_t::query_iterator end = tree_.query_end(); for ( ;itr != end; ++itr) { if (itr->intersects(box)) return false; } tree_.insert(box,box); return true; }
void Insert_Node( tree_t &tree, node_t &node ) { tree_t::iterator ptr; ptr = tree.end(); // insert smallest items at back for( int lcv = tree.size() - 1; lcv >= 0; lcv--, ptr-- ) { if( node.size <= tree[ lcv ].size ) break; } tree.insert( ptr, node ); }
void insert(box2d<double> const& box, mapnik::value_unicode_string const& text) { tree_.insert(label(box, text), box); }
void insert(box2d<double> const& box) { tree_.insert(label(box), box); }
void insert(box2d<double> const& box) { tree_.insert(box, box); }
void insert(Envelope<double> const& box) { tree_.insert(box, box); }