Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
utils.cc File Reference
#include "utils.hh"
#include "platform.hh"
#include "strings.hh"
#include "memory.hh"
#include "unicode.hh"
#include "internal.hh"
#include <signal.h>
#include <sys/time.h>
#include <poll.h>
#include <fcntl.h>
#include <cmath>
#include <atomic>
#include <unistd.h>
#include "testing.hh"

Go to the source code of this file.

Namespaces

namespace  Ase
 The Anklang C++ API namespace.
 

Functions

bool Ase::debug_key_enabled (const char *conditional)
 Check if conditional is enabled by $ASE_DEBUG.
 
bool Ase::debug_key_enabled (const ::std::string &conditional)
 Check if conditional is enabled by $ASE_DEBUG.
 
::std::string Ase::debug_key_value (const char *conditional)
 Retrieve the value assigned to debug key conditional in $ASE_DEBUG.
 
void Ase::debug_message (const char *cond, const std::string &message)
 Print a debug message, called from Ase::debug().
 
void Ase::diag_flush (uint8 code, const String &txt)
 Handle stdout and stderr printing with flushing.
 
String Ase::diag_prefix (uint8 code)
 Create prefix for warnings and errors.
 
const charAse::ase_gettext (const String &untranslated)
 
String Ase::now_strftime (const String &format)
 
IconString Ase::MakeIcon::KwIcon (const String &keywords)
 Create an IconString consisting of keywords.
 
IconString Ase::MakeIcon::operator""_icon (const char *key, size_t)
 Create an IconString consisting of keywords.
 
IconString Ase::MakeIcon::UcIcon (const String &unicode)
 Create an IconString consisting of a single/double unicode character.
 
IconString Ase::MakeIcon::operator""_uc (const char *key, size_t)
 Create an IconString consisting of a single/double unicode character.
 
IconString Ase::MakeIcon::SvgIcon (const String &svgdata)
 Create an IconString consisting of an SVG string.
 

Variables

bool Ase::ase_debugging_enabled
 Global boolean to reduce debugging penalty where possible.
 
bool Ase::ase_fatal_warnings
 Global boolean to cause the program to abort on warnings.
 

Function Documentation

◆ KwIcon()

IconString Ase::MakeIcon::KwIcon ( const String keywords)

◆ operator""_icon()

IconString Ase::MakeIcon::operator""_icon ( const char key,
size_t   
)

Create an IconString consisting of keywords.

Definition at line 159 of file utils.cc.

References Ase::MakeIcon::KwIcon().

◆ operator""_uc()

IconString Ase::MakeIcon::operator""_uc ( const char key,
size_t   
)

Create an IconString consisting of a single/double unicode character.

Definition at line 181 of file utils.cc.

References Ase::MakeIcon::UcIcon().

◆ SvgIcon()

IconString Ase::MakeIcon::SvgIcon ( const String svgdata)

Create an IconString consisting of an SVG string.

Definition at line 188 of file utils.cc.

References std::string::assign(), std::string::empty(), return_unless, Ase::string_startswith(), std::string::substr(), and Ase::MakeIcon::SvgIcon().

Referenced by Ase::MakeIcon::SvgIcon().

◆ UcIcon()

IconString Ase::MakeIcon::UcIcon ( const String unicode)

Create an IconString consisting of a single/double unicode character.

Definition at line 166 of file utils.cc.

References std::string::assign(), Ase::MakeIcon::UcIcon(), Ase::unicode_is_character(), and Ase::utf8_to_unicode().

Referenced by Ase::MakeIcon::operator""_uc(), and Ase::MakeIcon::UcIcon().