BitShares-Core  4.0.0
BitShares blockchain implementation and command-line interface 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 
60  void debug_update_object( fc::variant_object update );
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 
83  void debug_stream_json_objects_flush();
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  )
An order-perserving dictionary of variant&#39;s.
Definition: api.cpp:56
#define FC_API(CLASS, METHODS)
Definition: api.hpp:197
std::shared_ptr< detail::debug_api_impl > my
Definition: debug_api.hpp:85