Files
spark/src/lib_python_md/python_md/py_spot.h
T

33 lines
896 B
C++

#pragma once
#include <string>
namespace bts::md::py_interop {
/**
* @brief A placeholder object that represents a Spot contract.
*
* @details Unlike the similarly named types `PyFuture` and `PyOption`, this class has no members.
* A Spot contract's properties are universal to all security types in our system, and are thus all
* defined in `PySecurity`. It exists so we can follow the "one of" paradigm per security type.
*/
class PySpot {
public:
std::string to_string() const;
};
std::ostream &operator<<(std::ostream &out, const PySpot &spot) noexcept;
//////////////////////////////////////////////////
// Definition
//////////////////////////////////////////////////
inline std::string PySpot::to_string() const { return ""; }
inline std::ostream &operator<<(
std::ostream &out, const PySpot & /*spot*/) noexcept {
return out;
}
} // namespace bts::md::py_interop