Decentralised Art Server
High-performance C++ backend that exposes HTML interface and a secure REST API for managing Performative Transactions entities
Loading...
Searching...
No Matches
dcn::utils Namespace Reference

Classes

struct  LogoASCII_t
struct  LogoUnicode_t

Functions

const std::string & getLogo (LogoASCII_t)
 Get the ASCII logo string.
const std::string & getLogo (LogoUnicode_t)
 Get the Unicode logo string.
std::string loadBuildTimestamp (const std::filesystem::path &path)
std::string currentTimestamp ()
std::int64_t nowMs ()
template<class DataT, class ChildT, template< typename... > class ChildListT>
std::vector< std::string > topologicalSort (const absl::flat_hash_map< std::string, DataT > &data, std::function< ChildListT< ChildT >(const DataT &)> get_childreen, std::function< std::string(const ChildT &)> get_child_name)
bool equalsIgnoreCase (const std::string &a, const std::string &b)
std::string toLower (std::string value)
std::optional< std::string > trimAsciiWhitespace (std::string_view value)
bool likelyNetworkPath (const std::filesystem::path &path)
void logException (const std::exception_ptr &exception_ptr, const std::string_view context)

Variables

template<class T>
constexpr bool always_false = false

Function Documentation

◆ currentTimestamp()

std::string dcn::utils::currentTimestamp ( )

◆ equalsIgnoreCase()

bool dcn::utils::equalsIgnoreCase ( const std::string & a,
const std::string & b )

◆ getLogo() [1/2]

const std::string & dcn::utils::getLogo ( LogoASCII_t )

Get the ASCII logo string.

Returns
The ASCII logo string.

◆ getLogo() [2/2]

const std::string & dcn::utils::getLogo ( LogoUnicode_t )

Get the Unicode logo string.

Returns
The Unicode logo string.

◆ likelyNetworkPath()

bool dcn::utils::likelyNetworkPath ( const std::filesystem::path & path)

◆ loadBuildTimestamp()

std::string dcn::utils::loadBuildTimestamp ( const std::filesystem::path & path)

◆ logException()

void dcn::utils::logException ( const std::exception_ptr & exception_ptr,
const std::string_view context )

◆ nowMs()

std::int64_t dcn::utils::nowMs ( )

◆ toLower()

std::string dcn::utils::toLower ( std::string value)

◆ topologicalSort()

template<class DataT, class ChildT, template< typename... > class ChildListT>
std::vector< std::string > dcn::utils::topologicalSort ( const absl::flat_hash_map< std::string, DataT > & data,
std::function< ChildListT< ChildT >(const DataT &)> get_childreen,
std::function< std::string(const ChildT &)> get_child_name )

◆ trimAsciiWhitespace()

std::optional< std::string > dcn::utils::trimAsciiWhitespace ( std::string_view value)

Variable Documentation

◆ always_false

template<class T>
bool dcn::utils::always_false = false
inlineconstexpr