feat: Add support for python md plugins

This commit is contained in:
John Colvin committed 2024-09-18 14:02:39 +00:00
1 parent 2b62668df8
commit 2e9b4c78f3
46 files changed
+2265 -11

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
#pragma once
#include <sstream>
#include <string>
namespace bts::md::py_interop {
/**
* @brief Defines the expiration for a Future contract.
*/
class PyFuture {
public:
const std::string &expiration() const;
void set_expiration(std::string value);
std::string to_string() const;
private:
std::string expiration_;
};
std::ostream &operator<<(std::ostream &out, const PyFuture &fut) noexcept;
//////////////////////////////////////////////////
// Definition
//////////////////////////////////////////////////
inline const std::string &PyFuture::expiration() const { return expiration_; }
inline void PyFuture::set_expiration(std::string value) {
expiration_ = std::move(value);
}
inline std::string PyFuture::to_string() const {
std::stringstream str;
str << *this;
return str.str();
}
inline std::ostream &operator<<(
std::ostream &out, const PyFuture &fut) noexcept {
out << fut.expiration();
return out;
}
} // namespace bts::md::py_interop