Monero
Namespaces | Classes | Typedefs | Functions | Variables
epee Namespace Reference

TODO: (mj-xmr) This will be reduced in an another PR. More...

Namespaces

 debug
 
 file_io_utils
 
 fnv
 
 json_rpc
 
 levin
 
 math_helper
 
 misc_utils
 
 net_utils
 
 profile_tools
 
 serialization
 
 string_encoding
 
 string_tools
 

Classes

class  async_console_handler
 
class  async_stdin_reader
 
class  byte_slice
 
struct  byte_slice_data
 
class  byte_stream
 A partial drop-in replacement for std::ostream. More...
 
class  command_handler
 
class  console_handlers_binder
 
class  critical_region_t
 
class  critical_section
 
struct  from_hex
 Convert hex in UTF8 encoding to binary. More...
 
struct  from_hex_locale
 Convert hex in current C locale encoding to binary. More...
 
class  global_regexp_critical_section
 
class  http_server_impl_base
 
struct  mlocked
 
class  mlocker
 
struct  release_byte_buffer
 Frees ref count + buffer allocated internally by byte_buffer. More...
 
struct  release_byte_slice
 
struct  simple_event
 
class  span
 Non-owning sequence of data. Does not deep copy. More...
 
struct  to_hex
 
class  wipeable_string
 

Typedefs

using byte_buffer = std::unique_ptr< std::uint8_t, release_byte_buffer >
 Alias for a buffer that has space for a byte_slice ref count. More...
 
template<class T , size_t N>
using mlocked_arr = mlocked< std::array< T, N > >
 

Functions

byte_buffer byte_buffer_resize (byte_buffer buf, std::size_t length) noexcept
 
byte_buffer byte_buffer_increase (byte_buffer buf, std::size_t current, std::size_t more)
 
void PutReserve (byte_stream &dest, const std::size_t length)
 Compatability/optimization for rapidjson. More...
 
void PutUnsafe (byte_stream &dest, const std::uint8_t ch)
 Compatability/optimization for rapidjson. More...
 
void PutN (byte_stream &dest, const std::uint8_t ch, const std::size_t count)
 Compability/optimization for rapidjson. More...
 
template<class t_server >
bool empty_commands_handler (t_server *psrv, const std::string &command)
 
template<class t_server , class t_handler >
bool start_default_console (t_server *ptsrv, t_handler handlr, std::function< std::string(void)> prompt, const std::string &usage="")
 
template<class t_server , class t_handler >
bool start_default_console (t_server *ptsrv, t_handler handlr, const std::string &prompt, const std::string &usage="")
 
template<class t_server >
bool start_default_console (t_server *ptsrv, const std::string &prompt, const std::string &usage="")
 
template<class t_server , class t_handler >
bool no_srv_param_adapter (t_server *ptsrv, const std::string &cmd, t_handler handlr)
 
template<class t_server , class t_handler >
bool run_default_console_handler_no_srv_param (t_server *ptsrv, t_handler handlr, std::function< std::string(void)> prompt, const std::string &usage="")
 
template<class t_server , class t_handler >
bool run_default_console_handler_no_srv_param (t_server *ptsrv, t_handler handlr, const std::string &prompt, const std::string &usage="")
 
template<class t_server , class t_handler >
bool start_default_console_handler_no_srv_param (t_server *ptsrv, t_handler handlr, std::function< std::string(void)> prompt, const std::string &usage="")
 
template<class t_server , class t_handler >
bool start_default_console_handler_no_srv_param (t_server *ptsrv, t_handler handlr, const std::string &prompt, const std::string &usage="")
 
template<typename T >
Tunwrap (mlocked< T > &src)
 
template<typename T >
const Tunwrap (mlocked< T > const &src)
 
template<typename T >
void serialize_default (const T &t, T v)
 
template<typename T >
void serialize_default (T &t, T v)
 
template<typename T >
constexpr span< const typename T::value_type > to_span (const T &src)
 
template<typename T >
constexpr span< typename T::value_type > to_mut_span (T &src)
 
template<typename T >
span< const std::uint8_tto_byte_span (const span< const T > src) noexcept
 
template<typename T >
constexpr span< std::uint8_tto_mut_byte_span (T &src)
 
template<typename T >
span< const std::uint8_tas_byte_span (const T &src) noexcept
 
template<typename T >
span< std::uint8_tas_mut_byte_span (T &src) noexcept
 
template<typename T , typename U >
span< const Tstrspan (const U &s) noexcept
 make a span from a std::string More...
 
bool is_stdout_a_tty ()
 
static bool is_nocolor ()
 
void set_console_color (int color, bool bright)
 
void reset_console_color ()
 

Variables

static const global_regexp_critical_section gregexplock
 
unsigned int g_test_dbg_lock_sleep = 0
 

Detailed Description

TODO: (mj-xmr) This will be reduced in an another PR.

Typedef Documentation

◆ byte_buffer

using epee::byte_buffer = typedef std::unique_ptr<std::uint8_t, release_byte_buffer>

Alias for a buffer that has space for a byte_slice ref count.

◆ mlocked_arr

template<class T , size_t N>
using epee::mlocked_arr = typedef mlocked<std::array<T, N> >

Function Documentation

◆ as_byte_span()

template<typename T >
span<const std::uint8_t> epee::as_byte_span ( const T src)
noexcept
Returns
span<const std::uint8_t> which represents the bytes at &src.

◆ as_mut_byte_span()

template<typename T >
span<std::uint8_t> epee::as_mut_byte_span ( T src)
noexcept
Returns
span<std::uint8_t> which represents the bytes at &src.

◆ byte_buffer_increase()

byte_buffer epee::byte_buffer_increase ( byte_buffer  buf,
std::size_t  current,
std::size_t  more 
)

Increase buf of size current by more bytes.

Exceptions
std::range_errorif current + more exceeds size_t bounds.
Returns
Buffer of current + more bytes. A nullptr is returned on allocation failure.

◆ byte_buffer_resize()

byte_buffer epee::byte_buffer_resize ( byte_buffer  buf,
std::size_t  length 
)
noexcept
Returns
buf with a new size of exactly length. New bytes not initialized. A nullptr is returned on allocation failure.

◆ empty_commands_handler()

template<class t_server >
bool epee::empty_commands_handler ( t_server *  psrv,
const std::string &  command 
)

◆ is_nocolor()

static bool epee::is_nocolor ( )
static

◆ is_stdout_a_tty()

bool epee::is_stdout_a_tty ( )

◆ no_srv_param_adapter()

template<class t_server , class t_handler >
bool epee::no_srv_param_adapter ( t_server *  ptsrv,
const std::string &  cmd,
t_handler  handlr 
)

◆ PutN()

void epee::PutN ( byte_stream dest,
const std::uint8_t  ch,
const std::size_t  count 
)
inline

Compability/optimization for rapidjson.

◆ PutReserve()

void epee::PutReserve ( byte_stream dest,
const std::size_t  length 
)
inline

Compatability/optimization for rapidjson.

◆ PutUnsafe()

void epee::PutUnsafe ( byte_stream dest,
const std::uint8_t  ch 
)
inline

Compatability/optimization for rapidjson.

◆ reset_console_color()

void epee::reset_console_color ( )

◆ run_default_console_handler_no_srv_param() [1/2]

template<class t_server , class t_handler >
bool epee::run_default_console_handler_no_srv_param ( t_server *  ptsrv,
t_handler  handlr,
std::function< std::string(void)>  prompt,
const std::string &  usage = "" 
)

◆ run_default_console_handler_no_srv_param() [2/2]

template<class t_server , class t_handler >
bool epee::run_default_console_handler_no_srv_param ( t_server *  ptsrv,
t_handler  handlr,
const std::string &  prompt,
const std::string &  usage = "" 
)

◆ serialize_default() [1/2]

template<typename T >
void epee::serialize_default ( const T t,
T  v 
)
inline

◆ serialize_default() [2/2]

template<typename T >
void epee::serialize_default ( T t,
T  v 
)
inline

◆ set_console_color()

void epee::set_console_color ( int  color,
bool  bright 
)

◆ start_default_console() [1/3]

template<class t_server , class t_handler >
bool epee::start_default_console ( t_server *  ptsrv,
t_handler  handlr,
std::function< std::string(void)>  prompt,
const std::string &  usage = "" 
)

◆ start_default_console() [2/3]

template<class t_server , class t_handler >
bool epee::start_default_console ( t_server *  ptsrv,
t_handler  handlr,
const std::string &  prompt,
const std::string &  usage = "" 
)

◆ start_default_console() [3/3]

template<class t_server >
bool epee::start_default_console ( t_server *  ptsrv,
const std::string &  prompt,
const std::string &  usage = "" 
)

◆ start_default_console_handler_no_srv_param() [1/2]

template<class t_server , class t_handler >
bool epee::start_default_console_handler_no_srv_param ( t_server *  ptsrv,
t_handler  handlr,
std::function< std::string(void)>  prompt,
const std::string &  usage = "" 
)

◆ start_default_console_handler_no_srv_param() [2/2]

template<class t_server , class t_handler >
bool epee::start_default_console_handler_no_srv_param ( t_server *  ptsrv,
t_handler  handlr,
const std::string &  prompt,
const std::string &  usage = "" 
)

◆ strspan()

template<typename T , typename U >
span<const T> epee::strspan ( const U &  s)
noexcept

make a span from a std::string

◆ to_byte_span()

template<typename T >
span<const std::uint8_t> epee::to_byte_span ( const span< const T src)
noexcept
Returns
Cast data from src as span<const std::uint8_t>.

◆ to_mut_byte_span()

template<typename T >
constexpr span<std::uint8_t> epee::to_mut_byte_span ( T src)
Returns
span<std::uint8_t> from a STL compatible src.

◆ to_mut_span()

template<typename T >
constexpr span<typename T::value_type> epee::to_mut_span ( T src)
Returns
span<T::value_type> from a STL compatible src.

◆ to_span()

template<typename T >
constexpr span<const typename T::value_type> epee::to_span ( const T src)
Returns
span<const T::value_type> from a STL compatible src.

◆ unwrap() [1/2]

template<typename T >
T& epee::unwrap ( mlocked< T > &  src)

◆ unwrap() [2/2]

template<typename T >
const T& epee::unwrap ( mlocked< T > const src)

Variable Documentation

◆ g_test_dbg_lock_sleep

unsigned int epee::g_test_dbg_lock_sleep = 0

◆ gregexplock

const global_regexp_critical_section epee::gregexplock
static