hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
block_query_response.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_BLOCK_QUERY_RESPONSE_HPP
7 #define IROHA_SHARED_MODEL_BLOCK_QUERY_RESPONSE_HPP
8 
9 #include <boost/variant.hpp>
11 
12 namespace shared_model {
13  namespace interface {
14 
15  class BlockResponse;
16  class BlockErrorResponse;
17 
23  class BlockQueryResponse : public ModelPrimitive<BlockQueryResponse> {
24  private:
26  template <typename... Value>
27  using w = boost::variant<const Value &...>;
28 
29  public:
31  using QueryResponseVariantType = w<BlockResponse, BlockErrorResponse>;
32 
34  using QueryResponseListType = QueryResponseVariantType::types;
35 
39  virtual const QueryResponseVariantType &get() const = 0;
40 
41  // ------------------------| Primitive override |-------------------------
42 
43  std::string toString() const override;
44 
45  bool operator==(const ModelType &rhs) const override;
46  };
47  } // namespace interface
48 } // namespace shared_model
49 #endif // IROHA_SHARED_MODEL_BLOCK_QUERY_RESPONSE_HPP
Definition: block_query_response.hpp:23
std::string toString() const override
Definition: block_query_response.cpp:14
string(REPLACE".""/"CMAKE_SWIG_OUTDIR ${SWIG_JAVA_PKG}) else() set(CMAKE_SWIG_FLAGS"") endif() myswig_add_library(irohajava LANGUAGE java SOURCES bindings.i) unset(CMAKE_SWIG_FLAGS) swig_link_libraries(irohajava $
Definition: CMakeLists.txt:54
bool operator==(const ModelType &rhs) const override
Definition: block_query_response.cpp:18
QueryResponseVariantType::types QueryResponseListType
Type of all available query responses.
Definition: block_query_response.hpp:34
Definition: model_primitive.hpp:23
Definition: command_executor.hpp:12
w< BlockResponse, BlockErrorResponse > QueryResponseVariantType
Type of container with all concrete query response.
Definition: block_query_response.hpp:31