Skip to content

Commit

Permalink
Improve API: none type, vector interface (#4)
Browse files Browse the repository at this point in the history
* recover cmake

* add support of none value

* add none and vector interface

* update Python bindings

* update docs
  • Loading branch information
atimin authored Oct 20, 2023
1 parent d0e27ff commit 2814e0d
Show file tree
Hide file tree
Showing 11 changed files with 374 additions and 193 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## Unreleased

### Added

- `none` type, vector interface, [PR-4](https://github.com/panda-official/DriftBytes/pull/4)

## 0.2.0 - 2023-07-31

### Changed
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ using drift_bytes::Variant;
int main() {
Variant some_value{42};

OutputBuffer buffer;
buffer.push_back(some_value);
OutputBuffer buffer(1);
buffer[0] = some_value;

InputBuffer input(buffer.str());
Variant new_val = input.pop();
Variant new_val = input[0];

std::cout << new_val << std::endl;
}
Expand Down
6 changes: 6 additions & 0 deletions cmake/drift_bytes-config.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@PACKAGE_INIT@

include(CMakeFindDependencyMacro)
find_dependency(Cereal REQUIRED)
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake")
check_required_components("@PROJECT_NAME@")
6 changes: 3 additions & 3 deletions conan/test_package/src/example.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ using drift_bytes::Variant;
int main() {
Variant some_value{42};

OutputBuffer buffer;
buffer.push_back(some_value);
OutputBuffer buffer(1);
buffer[0] = some_value;

InputBuffer input(buffer.str());
Variant new_val = input.pop();
Variant new_val = input[0];

std::cout << new_val << std::endl;
}
Loading

0 comments on commit 2814e0d

Please sign in to comment.