-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced scan_info definition with the range class
- Loading branch information
1 parent
173de03
commit d304948
Showing
35 changed files
with
608 additions
and
592 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright 2018-2024 Project Tsurugi. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
#include "bound.h" | ||
|
||
namespace jogasaki::executor::process::impl { | ||
|
||
[[nodiscard]] std::string_view bound::key() const noexcept { | ||
return {static_cast<char*>(key_->data()), len_}; | ||
} | ||
[[nodiscard]] kvs::end_point_kind bound::endpointkind() const noexcept { return endpointkind_; } | ||
void bound::dump(std::ostream& out, int indent) const noexcept { | ||
std::string indent_space(indent, ' '); | ||
out << indent_space << "bound:" | ||
<< "\n"; | ||
out << indent_space << " endpointkind_: " << endpointkind_ << "\n"; | ||
out << indent_space << " len_: " << len_ << "\n"; | ||
out << indent_space << " key_: " << *key_ << "\n"; | ||
key_->dump(out, indent + 2); | ||
} | ||
} // namespace jogasaki::executor::process::impl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright 2018-2024 Project Tsurugi. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
#pragma once | ||
|
||
#include <jogasaki/data/aligned_buffer.h> | ||
#include <jogasaki/kvs/storage.h> | ||
|
||
namespace jogasaki::executor::process::impl { | ||
|
||
class bound { | ||
|
||
public: | ||
bound() = default; | ||
bound(bound const& other) = delete; | ||
bound& operator=(bound const& other) = delete; | ||
bound(bound&& other) noexcept = delete; | ||
bound& operator=(bound&& other) noexcept = delete; | ||
~bound() = default; | ||
bound(kvs::end_point_kind endpointkind, std::size_t len, | ||
std::unique_ptr<data::aligned_buffer> key) | ||
: endpointkind_(endpointkind), len_(len), key_(std::move(key)) {} | ||
kvs::end_point_kind endpointkind() { return endpointkind_; }; | ||
std::unique_ptr<data::aligned_buffer> key() { return std::move(key_); }; | ||
[[nodiscard]] std::string_view key() const noexcept; | ||
[[nodiscard]] kvs::end_point_kind endpointkind() const noexcept; | ||
/** | ||
* @brief Support for debugging, callable in GDB | ||
* @param out The output stream to which the buffer's internal state will be written. | ||
* @param indent The indentation level for formatting the output, default is 0. | ||
*/ | ||
void dump(std::ostream& out, int indent = 0) const noexcept; | ||
|
||
private: | ||
kvs::end_point_kind endpointkind_{}; | ||
std::size_t len_{}; | ||
std::unique_ptr<data::aligned_buffer> key_{}; | ||
}; | ||
|
||
} // namespace jogasaki::executor::process::impl |
Oops, something went wrong.