BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
debug_api.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Cryptonomex, Inc., and contributors.
3  *
4  * The MIT License
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to deal
8  * in the Software without restriction, including without limitation the rights
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  * copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in
14  * all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22  * THE SOFTWARE.
23  */
24 #pragma once
25 
26 #include <memory>
27 #include <string>
28 
29 #include <fc/api.hpp>
30 #include <fc/variant_object.hpp>
31 
32 namespace graphene { namespace app {
33 class application;
34 } }
35 
36 namespace graphene { namespace debug_witness {
37 
38 namespace detail {
39 class debug_api_impl;
40 }
41 
42 class debug_api
43 {
44  public:
46 
50  void debug_push_blocks( std::string src_filename, uint32_t count );
51 
55  void debug_generate_blocks( std::string debug_key, uint32_t count );
56 
61 
65  // not implemented
66  //void start_node( std::string name, std::string initial_db_path );
67 
71  // not implemented
72  //void save_db( std::string db_path );
73 
78  void debug_stream_json_objects( std::string filename );
79 
84 
85  std::shared_ptr< detail::debug_api_impl > my;
86 };
87 
88 } }
89 
91  (debug_push_blocks)
92  (debug_generate_blocks)
93  (debug_update_object)
94  (debug_stream_json_objects)
95  (debug_stream_json_objects_flush)
96  )
fc::variant_object
An order-perserving dictionary of variant's.
Definition: variant_object.hpp:20
graphene::debug_witness::debug_api::debug_stream_json_objects
void debug_stream_json_objects(std::string filename)
Definition: debug_api.cpp:146
variant_object.hpp
graphene::debug_witness::debug_api::my
std::shared_ptr< detail::debug_api_impl > my
Definition: debug_api.hpp:85
graphene::app::application
Definition: application.hpp:91
graphene::debug_witness::debug_api
Definition: debug_api.hpp:42
api.hpp
graphene::debug_witness::debug_api::debug_push_blocks
void debug_push_blocks(std::string src_filename, uint32_t count)
Definition: debug_api.cpp:131
graphene::debug_witness::debug_api::debug_generate_blocks
void debug_generate_blocks(std::string debug_key, uint32_t count)
Definition: debug_api.cpp:136
FC_API
#define FC_API(CLASS, METHODS)
Definition: api.hpp:197
graphene::debug_witness::debug_api::debug_api
debug_api(graphene::app::application &app)
Definition: debug_api.cpp:126
graphene::debug_witness::debug_api::debug_stream_json_objects_flush
void debug_stream_json_objects_flush()
Definition: debug_api.cpp:151
graphene::debug_witness::debug_api::debug_update_object
void debug_update_object(fc::variant_object update)
Definition: debug_api.cpp:141
graphene
Definition: api.cpp:48