RADLib
RADical C++ application framework
RADCore Namespace Reference

Namespaces

 FileSystem
 Filesystem helper namespace for paths, standard locations, MIME guesses, and text files.
 
 Internal
 

Classes

class  RADError
 Structured error object returned by RADResult and newer APIs. More...
 
class  RADResult
 Success-or-error return value for APIs that should not throw. More...
 
class  RADResult< void >
 Void specialization for success-or-error operations. More...
 
class  RADSpan
 Non-owning contiguous view over T values. More...
 
class  RADElapsedTimer
 Monotonic elapsed timer based on std::chrono::steady_clock. More...
 
class  RADDeadlineTimer
 Deadline helper for timeout loops and cancellation-aware waits. More...
 
class  RADCancellationToken
 Shared cancellation token passed to long-running tasks. More...
 
class  RADCancellationSource
 Owner object used to request cancellation on associated tokens. More...
 
class  RADVariant
 Small value container used by models, futures, settings, and database rows. More...
 
class  RADDateTime
 UTC millisecond timestamp helper. More...
 
class  RADUuid
 128-bit UUID helper. More...
 
class  RADUrl
 Lightweight URL parser for scheme, host, port, path, query, and fragment. More...
 
class  RADJsonValue
 JSON value supporting null, bool, number, string, array, and object. More...
 
class  RADJsonDocument
 JSON document wrapper around a root RADJsonValue. More...
 
class  RADSettings
 JSON-file-backed key/value settings helper. More...
 
class  RADTemporaryDirectory
 RAII temporary directory with optional auto-remove. More...
 
class  RADTemporaryFile
 RAII temporary file with optional auto-remove. More...
 
class  RADLockFile
 Advisory filesystem lock file. More...
 
struct  ThreadAffinity
 Thread affinity snapshot for RADObject event delivery. More...
 
class  Event
 Typed event template; use RAD_EVENT to declare instances. More...
 
struct  ConnectionRecord
 Connection record tracked by RADObject for automatic receiver cleanup. More...
 
class  Connection
 Explicit event connection handle. More...
 
class  RADObject
 Base class for event receivers, senders, and thread-affinity aware objects. More...
 
class  EventLoop
 RADCore task event loop with locked and low-latency scheduling strategies. More...
 
class  EventLoopHandle
 Weak posting handle for EventLoop tasks that may outlive the loop object. More...
 
class  EventBackend
 Low-level raw handler collection used internally by typed Event. More...
 
class  Event< void(Args...)>
 Typed event dispatcher. Use Event<void(Args...)> through RAD_EVENT. More...
 
class  RADIODevice
 Abstract byte-oriented IO device similar to QIODevice. More...
 
class  RADBuffer
 In-memory RADIODevice backed by a byte vector. More...
 
class  RADFile
 File-backed RADIODevice. More...
 
class  RADDataStream
 Binary serialization stream for RADIODevice. More...
 
class  RADFileSystemWatcher
 inotify-backed filesystem watcher that emits on a RADCore EventLoop. More...
 
class  RADFuture
 Shared future wrapper returning RADVariant results. More...
 
class  RADFutureT
 Typed shared future with optional continuation support. More...
 
class  RADFutureT< void >
 Void typed future specialization. More...
 
class  RADPromise
 Typed promise that creates RADFutureT. More...
 
class  RADPromise< void >
 Void promise specialization. More...
 
class  RADThreadPool
 Simple worker thread pool that reports completion through RADFuture. More...
 
class  RADAbstractItemModel
 Minimal abstract item model for UI/model integrations. More...
 
class  RADStringListModel
 One-column string list implementation of RADAbstractItemModel. More...
 
class  RADProcess
 Child process helper for stdout/stderr capture. More...
 
class  RADPtyProcess
 PTY-backed process helper for terminal applications. More...
 
class  Timer
 High-precision timer that emits timeout through a RADCore EventLoop. More...
 
class  RADThread
 Thread object with an owned RADCore EventLoop. More...
 

Typedefs

using RADByteSpan = RADSpan< uint8_t >
 Mutable byte span. More...
 
using RADConstByteSpan = RADSpan< const uint8_t >
 Const byte span. More...
 

Enumerations

enum class  OpenMode : uint32_t {
  NotOpen = 0 , ReadOnly = 1 << 0 , WriteOnly = 1 << 1 , ReadWrite = (1 << 0) | (1 << 1) ,
  Append = 1 << 2 , Truncate = 1 << 3 , Text = 1 << 4
}
 Open mode flags shared by RADIODevice, RADFile, and RADBuffer. More...
 
enum class  ByteOrder { LittleEndian , BigEndian }
 Byte order used by RADDataStream. More...
 
enum class  DataStreamStatus { Ok , ReadPastEnd , WriteFailed , ReadFailed }
 Read/write status for RADDataStream. More...
 
enum class  VariantType {
  Invalid , Bool , Int64 , Double ,
  String , ByteArray
}
 Runtime type tag for RADVariant. More...
 
enum class  JsonType {
  Null , Bool , Number , String ,
  Array , Object
}
 JSON value type tag. More...
 
enum class  ProcessState { NotRunning , Running , Finished , FailedToStart }
 Process lifecycle state. More...
 
enum class  LoopStrategy { RADEVENT_LOCK , RADEVENT_NOLOCK }
 Event loop scheduling backend. More...
 
enum class  Priority : int { LOW = 0 , NORMAL = 1 , HIGH = 2 }
 Event loop task priority. More...
 
enum class  FileSystemEvent {
  Created , Modified , Removed , Moved ,
  Overflow , WatchLost , Unknown
}
 File watcher event type. More...
 
enum class  LogLevel { INFO , DEBUG }
 Logger severity level. More...
 

Functions

const char * runtimeEdition ()
 Returns the edition used to build the loaded RADCore runtime library. More...
 
bool runtimeRequiresLicenseKey ()
 Returns true when the loaded RADCore runtime expects a paid license key. More...
 
const char * runtimeAuditStamp ()
 Returns a stable runtime audit stamp suitable for diagnostics. More...
 
constexpr OpenMode operator| (OpenMode lhs, OpenMode rhs)
 Combines OpenMode flags. More...
 
constexpr OpenMode operator& (OpenMode lhs, OpenMode rhs)
 Intersects OpenMode flags. More...
 
constexpr bool hasOpenMode (OpenMode mode, OpenMode flag)
 Returns true when mode includes flag. More...
 
void singleShot (int intervalMs, EventLoop &targetLoop, EventLoop::Task task)
 Posts task to targetLoop after intervalMs milliseconds. More...
 
template<typename F >
void invoke (EventLoop &loop, F &&task)
 Posts task to loop. More...
 
template<typename F >
auto invokeBlocking (EventLoop &loop, F &&task) -> std::invoke_result_t< F >
 Posts task to loop and blocks until the result is available. More...
 
void initLogger ()
 Starts the background logging engine. More...
 
void shutdownLogger ()
 Stops the background logging engine. More...
 

Variables

constexpr int VersionMajor = 0
 Compile-time RADCore major version. More...
 
constexpr int VersionMinor = 1
 Compile-time RADCore minor version. More...
 
constexpr LoopStrategy RADEVENT_LOCK = LoopStrategy::RADEVENT_LOCK
 Mutex/condition-variable event loop backend. More...
 
constexpr LoopStrategy RADEVENT_NOLOCK = LoopStrategy::RADEVENT_NOLOCK
 Low-latency bounded ring event loop backend. More...
 

Typedef Documentation

◆ RADByteSpan

using RADCore::RADByteSpan = typedef RADSpan<uint8_t>

Mutable byte span.

◆ RADConstByteSpan

using RADCore::RADConstByteSpan = typedef RADSpan<const uint8_t>

Const byte span.

Enumeration Type Documentation

◆ ByteOrder

enum RADCore::ByteOrder
strong

Byte order used by RADDataStream.

Enumerator
LittleEndian 

Least significant byte first.

BigEndian 

Most significant byte first.

◆ DataStreamStatus

Read/write status for RADDataStream.

Enumerator
Ok 

No stream error.

ReadPastEnd 

A read requested more bytes than available.

WriteFailed 

A write operation failed.

ReadFailed 

A read operation failed.

◆ FileSystemEvent

File watcher event type.

Enumerator
Created 

File or directory was created.

Modified 

File or directory was modified.

Removed 

File or directory was removed.

Moved 

File or directory was moved.

Overflow 

Watcher event queue overflowed.

WatchLost 

Watch was lost.

Unknown 

Event type could not be classified.

◆ JsonType

enum RADCore::JsonType
strong

JSON value type tag.

Enumerator
Null 

JSON null.

Bool 

JSON boolean.

Number 

JSON number.

String 

JSON string.

Array 

JSON array.

Object 

JSON object.

◆ LogLevel

enum RADCore::LogLevel
strong

Logger severity level.

Enumerator
INFO 
DEBUG 

◆ LoopStrategy

enum RADCore::LoopStrategy
strong

Event loop scheduling backend.

Enumerator
RADEVENT_LOCK 
RADEVENT_NOLOCK 

◆ OpenMode

enum RADCore::OpenMode : uint32_t
strong

Open mode flags shared by RADIODevice, RADFile, and RADBuffer.

Enumerator
NotOpen 

Device is not open.

ReadOnly 

Open for reads.

WriteOnly 

Open for writes.

ReadWrite 

Open for reads and writes.

Append 

Append writes to the end.

Truncate 

Truncate existing contents on open.

Text 

Text mode hint for platform-specific devices.

◆ Priority

enum RADCore::Priority : int
strong

Event loop task priority.

Enumerator
LOW 
NORMAL 
HIGH 

◆ ProcessState

enum RADCore::ProcessState
strong

Process lifecycle state.

Enumerator
NotRunning 

Process has not started.

Running 

Process is running.

Finished 

Process exited.

FailedToStart 

Process failed to start.

◆ VariantType

enum RADCore::VariantType
strong

Runtime type tag for RADVariant.

Enumerator
Invalid 

No stored value.

Bool 

Boolean value.

Int64 

Signed 64-bit integer value.

Double 

Double-precision floating point value.

String 

UTF-8 string value.

ByteArray 

Byte array value.

Function Documentation

◆ hasOpenMode()

constexpr bool RADCore::hasOpenMode ( OpenMode  mode,
OpenMode  flag 
)
constexpr

Returns true when mode includes flag.

◆ initLogger()

void RADCore::initLogger ( )

Starts the background logging engine.

◆ invoke()

template<typename F >
void RADCore::invoke ( EventLoop loop,
F &&  task 
)

Posts task to loop.

◆ invokeBlocking()

template<typename F >
auto RADCore::invokeBlocking ( EventLoop loop,
F &&  task 
) -> std::invoke_result_t<F>

Posts task to loop and blocks until the result is available.

◆ operator&()

constexpr OpenMode RADCore::operator& ( OpenMode  lhs,
OpenMode  rhs 
)
constexpr

Intersects OpenMode flags.

◆ operator|()

constexpr OpenMode RADCore::operator| ( OpenMode  lhs,
OpenMode  rhs 
)
constexpr

Combines OpenMode flags.

◆ runtimeAuditStamp()

const char* RADCore::runtimeAuditStamp ( )

Returns a stable runtime audit stamp suitable for diagnostics.

◆ runtimeEdition()

const char* RADCore::runtimeEdition ( )

Returns the edition used to build the loaded RADCore runtime library.

◆ runtimeRequiresLicenseKey()

bool RADCore::runtimeRequiresLicenseKey ( )

Returns true when the loaded RADCore runtime expects a paid license key.

◆ shutdownLogger()

void RADCore::shutdownLogger ( )

Stops the background logging engine.

◆ singleShot()

void RADCore::singleShot ( int  intervalMs,
EventLoop targetLoop,
EventLoop::Task  task 
)

Posts task to targetLoop after intervalMs milliseconds.

Variable Documentation

◆ RADEVENT_LOCK

constexpr LoopStrategy RADCore::RADEVENT_LOCK = LoopStrategy::RADEVENT_LOCK
constexpr

Mutex/condition-variable event loop backend.

◆ RADEVENT_NOLOCK

constexpr LoopStrategy RADCore::RADEVENT_NOLOCK = LoopStrategy::RADEVENT_NOLOCK
constexpr

Low-latency bounded ring event loop backend.

◆ VersionMajor

constexpr int RADCore::VersionMajor = 0
constexpr

Compile-time RADCore major version.

◆ VersionMinor

constexpr int RADCore::VersionMinor = 1
constexpr

Compile-time RADCore minor version.