Skip to content

Commit

Permalink
generated
Browse files Browse the repository at this point in the history
  • Loading branch information
madMAx43v3r committed Nov 23, 2023
1 parent b7b82a7 commit 3130cf4
Show file tree
Hide file tree
Showing 4 changed files with 467 additions and 0 deletions.
91 changes: 91 additions & 0 deletions generated/include/mmx/PlotHeader.hxx
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_
30 changes: 30 additions & 0 deletions generated/include/mmx/package.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ class Operation_calc_hash_return;
class Operation_is_valid;
class Operation_is_valid_return;
class PeerInfo;
class PlotHeader;
class ProofOfSpace;
class ProofOfSpace_calc_hash;
class ProofOfSpace_calc_hash_return;
Expand Down Expand Up @@ -755,6 +756,7 @@ MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Operation_calc
MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Operation_is_valid; ///< \private
MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Operation_is_valid_return; ///< \private
MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_PeerInfo; ///< \private
MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_PlotHeader; ///< \private
MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_ProofOfSpace; ///< \private
MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_ProofOfSpace_calc_hash; ///< \private
MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_ProofOfSpace_calc_hash_return; ///< \private
Expand Down Expand Up @@ -1261,6 +1263,7 @@ void read(TypeInput& in, ::mmx::Operation_calc_hash_return& value, const TypeCod
void read(TypeInput& in, ::mmx::Operation_is_valid& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void read(TypeInput& in, ::mmx::Operation_is_valid_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void read(TypeInput& in, ::mmx::PeerInfo& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void read(TypeInput& in, ::mmx::PlotHeader& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void read(TypeInput& in, ::mmx::ProofOfSpace& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void read(TypeInput& in, ::mmx::ProofOfSpace_calc_hash& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void read(TypeInput& in, ::mmx::ProofOfSpace_calc_hash_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private
Expand Down Expand Up @@ -1771,6 +1774,7 @@ void write(TypeOutput& out, const ::mmx::Operation_calc_hash_return& value, cons
void write(TypeOutput& out, const ::mmx::Operation_is_valid& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void write(TypeOutput& out, const ::mmx::Operation_is_valid_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void write(TypeOutput& out, const ::mmx::PeerInfo& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void write(TypeOutput& out, const ::mmx::PlotHeader& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void write(TypeOutput& out, const ::mmx::ProofOfSpace& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void write(TypeOutput& out, const ::mmx::ProofOfSpace_calc_hash& value, const TypeCode* type_code, const uint16_t* code); ///< \private
void write(TypeOutput& out, const ::mmx::ProofOfSpace_calc_hash_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private
Expand Down Expand Up @@ -2281,6 +2285,7 @@ void read(std::istream& in, ::mmx::Operation_calc_hash_return& value); ///< \pri
void read(std::istream& in, ::mmx::Operation_is_valid& value); ///< \private
void read(std::istream& in, ::mmx::Operation_is_valid_return& value); ///< \private
void read(std::istream& in, ::mmx::PeerInfo& value); ///< \private
void read(std::istream& in, ::mmx::PlotHeader& value); ///< \private
void read(std::istream& in, ::mmx::ProofOfSpace& value); ///< \private
void read(std::istream& in, ::mmx::ProofOfSpace_calc_hash& value); ///< \private
void read(std::istream& in, ::mmx::ProofOfSpace_calc_hash_return& value); ///< \private
Expand Down Expand Up @@ -2791,6 +2796,7 @@ void write(std::ostream& out, const ::mmx::Operation_calc_hash_return& value); /
void write(std::ostream& out, const ::mmx::Operation_is_valid& value); ///< \private
void write(std::ostream& out, const ::mmx::Operation_is_valid_return& value); ///< \private
void write(std::ostream& out, const ::mmx::PeerInfo& value); ///< \private
void write(std::ostream& out, const ::mmx::PlotHeader& value); ///< \private
void write(std::ostream& out, const ::mmx::ProofOfSpace& value); ///< \private
void write(std::ostream& out, const ::mmx::ProofOfSpace_calc_hash& value); ///< \private
void write(std::ostream& out, const ::mmx::ProofOfSpace_calc_hash_return& value); ///< \private
Expand Down Expand Up @@ -3301,6 +3307,7 @@ void accept(Visitor& visitor, const ::mmx::Operation_calc_hash_return& value); /
void accept(Visitor& visitor, const ::mmx::Operation_is_valid& value); ///< \private
void accept(Visitor& visitor, const ::mmx::Operation_is_valid_return& value); ///< \private
void accept(Visitor& visitor, const ::mmx::PeerInfo& value); ///< \private
void accept(Visitor& visitor, const ::mmx::PlotHeader& value); ///< \private
void accept(Visitor& visitor, const ::mmx::ProofOfSpace& value); ///< \private
void accept(Visitor& visitor, const ::mmx::ProofOfSpace_calc_hash& value); ///< \private
void accept(Visitor& visitor, const ::mmx::ProofOfSpace_calc_hash_return& value); ///< \private
Expand Down Expand Up @@ -8708,6 +8715,29 @@ struct type<::mmx::PeerInfo> {
void create_dynamic_code(std::vector<uint16_t>& code, const ::mmx::PeerInfo& value, bool special = false);
};

/// \private
template<>
struct type<::mmx::PlotHeader> {
void read(TypeInput& in, ::mmx::PlotHeader& value, const TypeCode* type_code, const uint16_t* code) {
vnx::read(in, value, type_code, code);
}
void write(TypeOutput& out, const ::mmx::PlotHeader& value, const TypeCode* type_code, const uint16_t* code) {
vnx::write(out, value, type_code, code);
}
void read(std::istream& in, ::mmx::PlotHeader& value) {
vnx::read(in, value);
}
void write(std::ostream& out, const ::mmx::PlotHeader& value) {
vnx::write(out, value);
}
void accept(Visitor& visitor, const ::mmx::PlotHeader& value) {
vnx::accept(visitor, value);
}
const TypeCode* get_type_code();
void create_dynamic_code(std::vector<uint16_t>& code);
void create_dynamic_code(std::vector<uint16_t>& code, const ::mmx::PlotHeader& value, bool special = false);
};

/// \private
template<>
struct type<::mmx::ProofOfSpace> {
Expand Down
Loading

0 comments on commit 3130cf4

Please sign in to comment.