xrpld
Loading...
Searching...
No Matches
xrpl::NetworkIDServiceImpl Class Referencefinal

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

#include <NetworkIDServiceImpl.h>

Inheritance diagram for xrpl::NetworkIDServiceImpl:
Collaboration diagram for xrpl::NetworkIDServiceImpl:

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 7 of file NetworkIDServiceImpl.cpp.

◆ ~NetworkIDServiceImpl()

xrpl::NetworkIDServiceImpl::~NetworkIDServiceImpl ( )
overridedefault

Member Function Documentation

◆ getNetworkID()

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

Get the configured network ID.

Returns
The network ID this server is configured for

Implements xrpl::NetworkIDService.

Definition at line 12 of file NetworkIDServiceImpl.cpp.

Member Data Documentation

◆ networkID_

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

Definition at line 29 of file NetworkIDServiceImpl.h.