-
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
75e7a93
commit 081f419
Showing
20 changed files
with
1,065 additions
and
301 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
|
||
// AUTO GENERATED by vnxcppcodegen | ||
|
||
#ifndef INCLUDE_mmx_farmed_block_info_t_HXX_ | ||
#define INCLUDE_mmx_farmed_block_info_t_HXX_ | ||
|
||
#include <vnx/Type.h> | ||
#include <mmx/package.hxx> | ||
#include <mmx/addr_t.hpp> | ||
|
||
|
||
namespace mmx { | ||
|
||
struct MMX_EXPORT farmed_block_info_t { | ||
|
||
|
||
uint32_t height = 0; | ||
uint32_t reward = 0; | ||
::mmx::addr_t reward_addr; | ||
|
||
static const vnx::Hash64 VNX_TYPE_HASH; | ||
static const vnx::Hash64 VNX_CODE_HASH; | ||
|
||
static constexpr uint64_t VNX_TYPE_ID = 0x2e10154a52617b19ull; | ||
|
||
farmed_block_info_t() {} | ||
|
||
vnx::Hash64 get_type_hash() const; | ||
std::string get_type_name() const; | ||
const vnx::TypeCode* get_type_code() const; | ||
|
||
static std::shared_ptr<farmed_block_info_t> create(); | ||
std::shared_ptr<farmed_block_info_t> clone() const; | ||
|
||
void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); | ||
void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; | ||
|
||
void read(std::istream& _in); | ||
void write(std::ostream& _out) const; | ||
|
||
template<typename T> | ||
void accept_generic(T& _visitor) const; | ||
void accept(vnx::Visitor& _visitor) const; | ||
|
||
vnx::Object to_object() const; | ||
void from_object(const vnx::Object& object); | ||
|
||
vnx::Variant get_field(const std::string& name) const; | ||
void set_field(const std::string& name, const vnx::Variant& value); | ||
|
||
friend std::ostream& operator<<(std::ostream& _out, const farmed_block_info_t& _value); | ||
friend std::istream& operator>>(std::istream& _in, farmed_block_info_t& _value); | ||
|
||
static const vnx::TypeCode* static_get_type_code(); | ||
static std::shared_ptr<vnx::TypeCode> static_create_type_code(); | ||
|
||
}; | ||
|
||
template<typename T> | ||
void farmed_block_info_t::accept_generic(T& _visitor) const { | ||
_visitor.template type_begin<farmed_block_info_t>(3); | ||
_visitor.type_field("height", 0); _visitor.accept(height); | ||
_visitor.type_field("reward", 1); _visitor.accept(reward); | ||
_visitor.type_field("reward_addr", 2); _visitor.accept(reward_addr); | ||
_visitor.template type_end<farmed_block_info_t>(3); | ||
} | ||
|
||
|
||
} // namespace mmx | ||
|
||
|
||
namespace vnx { | ||
|
||
template<> | ||
struct is_equivalent<::mmx::farmed_block_info_t> { | ||
bool operator()(const uint16_t* code, const TypeCode* type_code); | ||
}; | ||
|
||
} // vnx | ||
|
||
#endif // INCLUDE_mmx_farmed_block_info_t_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
|
||
// AUTO GENERATED by vnxcppcodegen | ||
|
||
#ifndef INCLUDE_mmx_farmer_info_t_HXX_ | ||
#define INCLUDE_mmx_farmer_info_t_HXX_ | ||
|
||
#include <vnx/Type.h> | ||
#include <mmx/package.hxx> | ||
|
||
|
||
namespace mmx { | ||
|
||
struct MMX_EXPORT farmer_info_t { | ||
|
||
|
||
uint32_t last_height = 0; | ||
uint32_t total_blocks = 0; | ||
uint64_t total_rewards = 0; | ||
|
||
static const vnx::Hash64 VNX_TYPE_HASH; | ||
static const vnx::Hash64 VNX_CODE_HASH; | ||
|
||
static constexpr uint64_t VNX_TYPE_ID = 0x372781b32f14f74ull; | ||
|
||
farmer_info_t() {} | ||
|
||
vnx::Hash64 get_type_hash() const; | ||
std::string get_type_name() const; | ||
const vnx::TypeCode* get_type_code() const; | ||
|
||
static std::shared_ptr<farmer_info_t> create(); | ||
std::shared_ptr<farmer_info_t> clone() const; | ||
|
||
void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); | ||
void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; | ||
|
||
void read(std::istream& _in); | ||
void write(std::ostream& _out) const; | ||
|
||
template<typename T> | ||
void accept_generic(T& _visitor) const; | ||
void accept(vnx::Visitor& _visitor) const; | ||
|
||
vnx::Object to_object() const; | ||
void from_object(const vnx::Object& object); | ||
|
||
vnx::Variant get_field(const std::string& name) const; | ||
void set_field(const std::string& name, const vnx::Variant& value); | ||
|
||
friend std::ostream& operator<<(std::ostream& _out, const farmer_info_t& _value); | ||
friend std::istream& operator>>(std::istream& _in, farmer_info_t& _value); | ||
|
||
static const vnx::TypeCode* static_get_type_code(); | ||
static std::shared_ptr<vnx::TypeCode> static_create_type_code(); | ||
|
||
}; | ||
|
||
template<typename T> | ||
void farmer_info_t::accept_generic(T& _visitor) const { | ||
_visitor.template type_begin<farmer_info_t>(3); | ||
_visitor.type_field("last_height", 0); _visitor.accept(last_height); | ||
_visitor.type_field("total_blocks", 1); _visitor.accept(total_blocks); | ||
_visitor.type_field("total_rewards", 2); _visitor.accept(total_rewards); | ||
_visitor.template type_end<farmer_info_t>(3); | ||
} | ||
|
||
|
||
} // namespace mmx | ||
|
||
|
||
namespace vnx { | ||
|
||
template<> | ||
struct is_equivalent<::mmx::farmer_info_t> { | ||
bool operator()(const uint16_t* code, const TypeCode* type_code); | ||
}; | ||
|
||
} // vnx | ||
|
||
#endif // INCLUDE_mmx_farmer_info_t_HXX_ |
Oops, something went wrong.