rippled
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
xrpl::NetworkIDServiceImpl Class Referencefinal

Implementation of NetworkIDService that reads from Config. More...

#include <NetworkIDServiceImpl.h>

Inheritance diagram for xrpl::NetworkIDServiceImpl:
Inheritance graph
[legend]
Collaboration diagram for xrpl::NetworkIDServiceImpl:
Collaboration graph
[legend]

Public Member Functions

 NetworkIDServiceImpl (std::uint32_t networkID)
 
 ~NetworkIDServiceImpl () override=default
 
std::uint32_t getNetworkID () const noexcept override
 Get the configured network ID.
 

Private Attributes

std::uint32_t networkID_
 

Detailed Description

Implementation of NetworkIDService that reads from Config.

This class provides a NetworkIDService interface that wraps the network ID from the application Config. It caches the network ID at construction time.

Definition at line 18 of file NetworkIDServiceImpl.h.

Constructor & Destructor Documentation

◆ NetworkIDServiceImpl()

xrpl::NetworkIDServiceImpl::NetworkIDServiceImpl ( std::uint32_t  networkID)
explicit

Definition at line 6 of file NetworkIDServiceImpl.cpp.

◆ ~NetworkIDServiceImpl()

xrpl::NetworkIDServiceImpl::~NetworkIDServiceImpl ( )
overridedefault

Member Function Documentation

◆ getNetworkID()

std::uint32_t xrpl::NetworkIDServiceImpl::getNetworkID ( ) const
overridevirtualnoexcept

Get the configured network ID.

Returns
The network ID this server is configured for

Implements xrpl::NetworkIDService.

Definition at line 11 of file NetworkIDServiceImpl.cpp.

Member Data Documentation

◆ networkID_

std::uint32_t xrpl::NetworkIDServiceImpl::networkID_
private

Definition at line 29 of file NetworkIDServiceImpl.h.