-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7b82a7
commit 3130cf4
Showing
4 changed files
with
467 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
|
||
// AUTO GENERATED by vnxcppcodegen | ||
|
||
#ifndef INCLUDE_mmx_PlotHeader_HXX_ | ||
#define INCLUDE_mmx_PlotHeader_HXX_ | ||
|
||
#include <mmx/package.hxx> | ||
#include <mmx/addr_t.hpp> | ||
#include <mmx/hash_t.hpp> | ||
#include <mmx/pubkey_t.hpp> | ||
#include <vnx/Value.h> | ||
|
||
|
||
namespace mmx { | ||
|
||
class MMX_EXPORT PlotHeader : public ::vnx::Value { | ||
public: | ||
|
||
int32_t version = 0; | ||
int32_t ksize = 0; | ||
int32_t xbits = 0; | ||
::mmx::hash_t seed; | ||
::mmx::pubkey_t farmer_key; | ||
vnx::optional<::mmx::addr_t> contract; | ||
std::vector<uint64_t> table_pointers; | ||
|
||
typedef ::vnx::Value Super; | ||
|
||
static const vnx::Hash64 VNX_TYPE_HASH; | ||
static const vnx::Hash64 VNX_CODE_HASH; | ||
|
||
static constexpr uint64_t VNX_TYPE_ID = 0x299c5790983c47b6ull; | ||
|
||
PlotHeader() {} | ||
|
||
vnx::Hash64 get_type_hash() const override; | ||
std::string get_type_name() const override; | ||
const vnx::TypeCode* get_type_code() const override; | ||
|
||
static std::shared_ptr<PlotHeader> create(); | ||
std::shared_ptr<vnx::Value> clone() const override; | ||
|
||
void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; | ||
void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; | ||
|
||
void read(std::istream& _in) override; | ||
void write(std::ostream& _out) const override; | ||
|
||
template<typename T> | ||
void accept_generic(T& _visitor) const; | ||
void accept(vnx::Visitor& _visitor) const override; | ||
|
||
vnx::Object to_object() const override; | ||
void from_object(const vnx::Object& object) override; | ||
|
||
vnx::Variant get_field(const std::string& name) const override; | ||
void set_field(const std::string& name, const vnx::Variant& value) override; | ||
|
||
friend std::ostream& operator<<(std::ostream& _out, const PlotHeader& _value); | ||
friend std::istream& operator>>(std::istream& _in, PlotHeader& _value); | ||
|
||
static const vnx::TypeCode* static_get_type_code(); | ||
static std::shared_ptr<vnx::TypeCode> static_create_type_code(); | ||
|
||
protected: | ||
std::shared_ptr<vnx::Value> vnx_call_switch(std::shared_ptr<const vnx::Value> _method) override; | ||
|
||
}; | ||
|
||
template<typename T> | ||
void PlotHeader::accept_generic(T& _visitor) const { | ||
_visitor.template type_begin<PlotHeader>(7); | ||
_visitor.type_field("version", 0); _visitor.accept(version); | ||
_visitor.type_field("ksize", 1); _visitor.accept(ksize); | ||
_visitor.type_field("xbits", 2); _visitor.accept(xbits); | ||
_visitor.type_field("seed", 3); _visitor.accept(seed); | ||
_visitor.type_field("farmer_key", 4); _visitor.accept(farmer_key); | ||
_visitor.type_field("contract", 5); _visitor.accept(contract); | ||
_visitor.type_field("table_pointers", 6); _visitor.accept(table_pointers); | ||
_visitor.template type_end<PlotHeader>(7); | ||
} | ||
|
||
|
||
} // namespace mmx | ||
|
||
|
||
namespace vnx { | ||
|
||
} // vnx | ||
|
||
#endif // INCLUDE_mmx_PlotHeader_HXX_ |
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
Oops, something went wrong.