Update vendored vtzero dependency to v1.1.0 (#6871)
This commit is contained in:
Vendored
+2
-2
@@ -2044,7 +2044,7 @@ EXTERNAL_PAGES = YES
|
||||
# interpreter (i.e. the result of 'which perl').
|
||||
# The default file (with absolute path) is: /usr/bin/perl.
|
||||
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#PERL_PATH = /usr/bin/perl
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
@@ -2066,7 +2066,7 @@ CLASS_DIAGRAMS = YES
|
||||
# the mscgen tool resides. If left empty the tool is assumed to be found in the
|
||||
# default search path.
|
||||
|
||||
MSCGEN_PATH =
|
||||
#MSCGEN_PATH =
|
||||
|
||||
# You can include diagrams made with dia in doxygen documentation. Doxygen will
|
||||
# then run dia to produce the diagram and insert it in the documentation. The
|
||||
|
||||
Vendored
+1
-3
@@ -65,9 +65,7 @@ while (auto feature = layer.next_feature()) {
|
||||
if (keep_feature(feature)) {
|
||||
// instantiate a feature builder as usual and copy id and geometry
|
||||
vtzero::geometry_feature_builder feature_builder{layer_builder};
|
||||
if (feature.has_id()) {
|
||||
feature_builder.set_id(feature.id());
|
||||
}
|
||||
feature_builder.copy_id(feature);
|
||||
feature_builder.set_geometry(feature.geometry());
|
||||
|
||||
// now iterate over all properties...
|
||||
|
||||
Vendored
+2
-2
@@ -210,8 +210,8 @@ converted into whatever type the value really has.
|
||||
|
||||
```cpp
|
||||
auto property = ...;
|
||||
std::string pkey = property.key(); // returns a vtzero::data_view which can
|
||||
// be converted to std::string
|
||||
auto pkey = std::string(property.key()); // returns a vtzero::data_view which can
|
||||
// be converted to std::string
|
||||
property_value pvalue = property.value();
|
||||
```
|
||||
|
||||
|
||||
Vendored
+27
-1
@@ -140,7 +140,7 @@ you can create your own overload of this function. See the
|
||||
|
||||
### Adding a multipoint geometry
|
||||
|
||||
Call `add_points()` with the number of points in the geometry as only argument.
|
||||
Call `add_points()` with the number of points in the geometry as the only argument.
|
||||
After that call `set_point()` for each of those points. `set_point()` has
|
||||
multiple overloads just like the `add_point()` method described above.
|
||||
|
||||
@@ -537,3 +537,29 @@ own functions (for instance when you need to convert from your own types to
|
||||
vtzero types like with the `mylocation` and `stars` types above) or just use
|
||||
the functions in the base classes.
|
||||
|
||||
## Using a custom buffer type
|
||||
|
||||
Usually `std::string` is used as a buffer type:
|
||||
|
||||
```cpp
|
||||
std::string buffer;
|
||||
tbuilder.serialize(buffer);
|
||||
```
|
||||
|
||||
But you can also use other buffer types supported by Protozero, like
|
||||
`std::vector<char>`:
|
||||
|
||||
```cpp
|
||||
#include <protozero/buffer_vector.hpp>
|
||||
|
||||
std::vector<char> buffer;
|
||||
tbuilder.serialize(buffer);
|
||||
```
|
||||
|
||||
Or you can use your own buffer types and write special adaptors for it.
|
||||
See the Protozero documentation for details.
|
||||
|
||||
Note that while in theory this allows you to also use fixed-sized buffers
|
||||
through the `protozero::fixed_sized_buffer_adaptor` class, vtzero will still
|
||||
use `std::string` for additional buffers internally.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user