CCF
Loading...
Searching...
No Matches
include
ccf
node_startup_state.h
Go to the documentation of this file.
1
// Copyright (c) Microsoft Corporation. All rights reserved.
2
// Licensed under the Apache 2.0 License.
3
#pragma once
4
5
#include "
ccf/ds/json.h
"
6
7
namespace
ccf
8
{
9
enum class
NodeStartupState
10
{
11
uninitialized
,
12
initialized
,
13
pending
,
14
partOfPublicNetwork
,
15
partOfNetwork
,
16
readingPublicLedger
,
17
readingPrivateLedger
18
};
19
20
DECLARE_JSON_ENUM
(
21
ccf::NodeStartupState
,
22
{{
ccf::NodeStartupState::uninitialized
,
"Uninitialized"
},
23
{
ccf::NodeStartupState::initialized
,
"Initialized"
},
24
{
ccf::NodeStartupState::pending
,
"Pending"
},
25
{
ccf::NodeStartupState::partOfPublicNetwork
,
"PartOfPublicNetwork"
},
26
{
ccf::NodeStartupState::partOfNetwork
,
"PartOfNetwork"
},
27
{
ccf::NodeStartupState::readingPublicLedger
,
"ReadingPublicLedger"
},
28
{
ccf::NodeStartupState::readingPrivateLedger
,
"ReadingPrivateLedger"
}})
29
}
30
31
// Used by fmtlib to render ccf::State
32
namespace
std
33
{
34
inline
std::ostream&
operator<<
(std::ostream& os,
ccf::NodeStartupState
s)
35
{
36
nlohmann::json j;
37
to_json
(j, s);
38
return
os << j.dump();
39
}
40
}
json.h
DECLARE_JSON_ENUM
#define DECLARE_JSON_ENUM(TYPE,...)
Definition
json.h:837
ccf
Definition
app_interface.h:14
ccf::NodeStartupState
NodeStartupState
Definition
node_startup_state.h:10
ccf::NodeStartupState::partOfNetwork
@ partOfNetwork
ccf::NodeStartupState::uninitialized
@ uninitialized
ccf::NodeStartupState::pending
@ pending
ccf::NodeStartupState::partOfPublicNetwork
@ partOfPublicNetwork
ccf::NodeStartupState::initialized
@ initialized
ccf::NodeStartupState::readingPrivateLedger
@ readingPrivateLedger
ccf::NodeStartupState::readingPublicLedger
@ readingPublicLedger
std
STL namespace.
std::operator<<
std::ostream & operator<<(std::ostream &os, ccf::NodeStartupState s)
Definition
node_startup_state.h:34
std::to_json
void to_json(nlohmann::json &j, const std::optional< T > &t)
Definition
json.h:49
Generated by
1.9.8