MXVM 1.8.1
Virtual Machine, Compiler, and Pascal Frontend
Loading...
Searching...
No Matches
mx Namespace Reference

Namespaces

namespace  Color
 ANSI escape code constants for terminal coloring.

Classes

class  Exception
 General-purpose exception with errno-aware factory method. More...
struct  Argument
 A parsed or registered command-line argument definition. More...
struct  ArgumentData
 Raw argument data collected from argc/argv. More...
class  ArgException
 Exception type thrown for argument parsing errors. More...
class  Argz
 Generic command-line argument parser supporting single/double-dash options. More...
struct  Arguments
 Parsed SDL program arguments (resolution, path, fullscreen). More...

Concepts

concept  StringType
 Concept constraining String template parameters to class types with length(), operator[], operator+=, and operator= (e.g. std::string, std::wstring).

Enumerations

enum class  ArgType {
  ARG_SINGLE , ARG_SINGLE_VALUE , ARG_DOUBLE , ARG_DOUBLE_VALUE ,
  ARG_NONE
}
 Discriminates argument switch types (single-dash, double-dash, with/without value). More...

Functions

std::string format_hex64 (uint64_t value)
 Format a 64-bit value as a hex string with 0x prefix.
std::string format_hex32 (uint32_t value)
 Format a 32-bit value as a hex string with 0x prefix.
std::string format_hex16 (uint16_t value)
 Format a 16-bit value as a hex string with 0x prefix.
std::string format_hex8 (uint8_t value)
 Format an 8-bit value as a hex string with 0x prefix.
std::string format_hex_no_prefix (uint64_t value)
 Format a 64-bit value as a hex string without 0x prefix.
std::string format_signal (uint32_t sig)
 Format a signal number as a descriptive string.
bool terminal_supports_color ()
 Check whether stdout is a TTY that supports ANSI color.
Arguments proc_args (int &argc, char **argv)
 Parse SDL-specific command-line arguments.

Variables

bool color_ = terminal_supports_color()
 cached color support flag

Enumeration Type Documentation

◆ ArgType

enum class mx::ArgType
strong

Discriminates argument switch types (single-dash, double-dash, with/without value).

Enumerator
ARG_SINGLE 
ARG_SINGLE_VALUE 
ARG_DOUBLE 
ARG_DOUBLE_VALUE 
ARG_NONE 

Definition at line 39 of file argz.hpp.

Function Documentation

◆ format_hex16()

std::string mx::format_hex16 ( uint16_t value)

Format a 16-bit value as a hex string with 0x prefix.

Definition at line 26 of file exception.cpp.

◆ format_hex32()

std::string mx::format_hex32 ( uint32_t value)

Format a 32-bit value as a hex string with 0x prefix.

Definition at line 20 of file exception.cpp.

◆ format_hex64()

std::string mx::format_hex64 ( uint64_t value)

Format a 64-bit value as a hex string with 0x prefix.

Definition at line 14 of file exception.cpp.

◆ format_hex8()

std::string mx::format_hex8 ( uint8_t value)

Format an 8-bit value as a hex string with 0x prefix.

Definition at line 32 of file exception.cpp.

◆ format_hex_no_prefix()

std::string mx::format_hex_no_prefix ( uint64_t value)

Format a 64-bit value as a hex string without 0x prefix.

Definition at line 38 of file exception.cpp.

◆ format_signal()

std::string mx::format_signal ( uint32_t sig)

Format a signal number as a descriptive string.

Definition at line 44 of file exception.cpp.

◆ proc_args()

Arguments mx::proc_args ( int & argc,
char ** argv )
inline

◆ terminal_supports_color()

bool mx::terminal_supports_color ( )
inline

Check whether stdout is a TTY that supports ANSI color.

Definition at line 88 of file exception.hpp.

Variable Documentation

◆ color_

bool mx::color_ = terminal_supports_color()
inline

cached color support flag

Definition at line 91 of file exception.hpp.

Referenced by Col().