DQCsim
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
dqcsim File Reference

Provides DQCsim's entire C++ API. More...

#include <stdexcept>
#include <string>
#include <vector>
#include <cstring>
#include <iostream>
#include <complex>
#include <functional>
#include <memory>
#include <cmath>
#include <limits>
#include <chrono>
#include <cdqcsim>

Go to the source code of this file.

Classes

class  dqcsim::wrap::Handle
 Base class for wrapping any handle. More...
 
class  dqcsim::wrap::Arb
 Class wrapper for handles that support the arb interface. More...
 
class  dqcsim::wrap::ArbData
 Class wrapper for ArbData handles. More...
 
class  dqcsim::wrap::Cmd
 Class wrapper for handles that support the cmd interface. More...
 
class  dqcsim::wrap::ArbCmd
 Class wrapper for ArbCmd handles. More...
 
class  dqcsim::wrap::ArbCmdQueue
 Class wrapper for queues (lists) of ArbCmds. More...
 
class  dqcsim::wrap::QubitRef
 Represents a qubit. More...
 
class  dqcsim::wrap::QubitSet
 Represents an ordered set of qubit references. More...
 
class  dqcsim::wrap::Matrix
 Represents a square matrix used for describing N-qubit gates. More...
 
class  dqcsim::wrap::Gate
 Represents any kind of gate with qubits bound to it. More...
 
class  dqcsim::wrap::CustomGateConverter
 Class that you can inherit from to make your own custom gate converter for use within DQCsim. More...
 
class  dqcsim::wrap::CustomUnitaryGateConverter
 Class that you can inherit from to make your own unitary gate converter for use within DQCsim. More...
 
class  dqcsim::wrap::GateMap< Unbound, Bound >
 Gate map wrapper class. More...
 
class  dqcsim::wrap::Measurement
 Class representation of the measurement result for a single qubit. More...
 
class  dqcsim::wrap::MeasurementSet
 Represents a set of measurements. More...
 
class  dqcsim::wrap::UpstreamPluginState
 Wrapper for DQCsim's internal plugin state within the context of upstream-synchronous plugin callbacks (that is, the modify_measurement callback). More...
 
class  dqcsim::wrap::PluginState
 Wrapper for DQCsim's internal plugin state within the context of downstream-synchronous plugin callbacks. More...
 
class  dqcsim::wrap::RunningPluginState
 Wrapper for DQCsim's internal plugin state within the context of the run callback in a frontend. More...
 
class  dqcsim::wrap::Callback< R, Args >
 Class template shared between all callback functions. More...
 
class  dqcsim::wrap::PluginJoinHandle
 Class wrapper for plugin join handles. More...
 
class  dqcsim::wrap::Plugin
 Plugin definition class. More...
 
class  dqcsim::wrap::PluginConfiguration
 Generic class for plugin configurations. More...
 
class  dqcsim::wrap::PluginProcessConfiguration
 Wrapper class for plugin process configurations. More...
 
class  dqcsim::wrap::PluginThreadConfiguration
 Wrapper class for local plugin thread configurations. More...
 
class  dqcsim::wrap::PluginConfigurationBuilder
 Builder class used to construct plugin configurations. More...
 
class  dqcsim::wrap::Simulation
 Wrapper class for a running simulation. More...
 
class  dqcsim::wrap::SimulationConfiguration
 Wrapper class for configuring a simulation. More...
 

Namespaces

 dqcsim
 Main DQCsim namespace.
 
 dqcsim::wrap
 Namespace containing thin wrapper objects around the handles exposed by the raw C interface.
 
 dqcsim::wrap::callback
 Namespace containing all necessarily specializations of Callback as typedefs.
 

Macros

#define DQCSIM_LOG(level, fmt, ...)
 Convenience macro for calling log() with automatically determined filename and line number, but a dynamic loglevel (first argument). More...
 
#define DQCSIM_TRACE(fmt, ...)   DQCSIM_LOG(::dqcsim::wrap::Loglevel::Trace, fmt, ##__VA_ARGS__)
 Convenience macro for calling log() with trace loglevel and automatically determined filename and line number. More...
 
#define DQCSIM_DEBUG(fmt, ...)   DQCSIM_LOG(::dqcsim::wrap::Loglevel::Debug, fmt, ##__VA_ARGS__)
 Convenience macro for calling log() with debug loglevel and automatically determined filename and line number. More...
 
#define DQCSIM_INFO(fmt, ...)   DQCSIM_LOG(::dqcsim::wrap::Loglevel::Info, fmt, ##__VA_ARGS__)
 Convenience macro for calling log() with info loglevel and automatically determined filename and line number. More...
 
#define DQCSIM_NOTE(fmt, ...)   DQCSIM_LOG(::dqcsim::wrap::Loglevel::Note, fmt, ##__VA_ARGS__)
 Convenience macro for calling log() with note loglevel and automatically determined filename and line number. More...
 
#define DQCSIM_WARN(fmt, ...)   DQCSIM_LOG(::dqcsim::wrap::Loglevel::Warn, fmt, ##__VA_ARGS__)
 Convenience macro for calling log() with warn loglevel and automatically determined filename and line number. More...
 
#define DQCSIM_WARNING(fmt, ...)   DQCSIM_LOG(::dqcsim::wrap::Loglevel::Warn, fmt, ##__VA_ARGS__)
 Convenience macro for calling log() with warn loglevel and automatically determined filename and line number. More...
 
#define DQCSIM_ERROR(fmt, ...)   DQCSIM_LOG(::dqcsim::wrap::Loglevel::Error, fmt, ##__VA_ARGS__)
 Convenience macro for calling log() with error loglevel and automatically determined filename and line number. More...
 
#define DQCSIM_FATAL(fmt, ...)   DQCSIM_LOG(::dqcsim::wrap::Loglevel::Fatal, fmt, ##__VA_ARGS__)
 Convenience macro for calling log() with fatal loglevel and automatically determined filename and line number. More...
 
#define ARB_BUILDER_SUBCLASS   ArbData
 Helper macro to prevent code repetition; not visible outside of the header.
 
#define ARB_BUILDER_SUBCLASS   ArbCmd
 Helper macro to prevent code repetition; not visible outside of the header.
 
#define ARB_BUILDER_SUBCLASS   Gate
 Helper macro to prevent code repetition; not visible outside of the header.
 
#define ARB_BUILDER_SUBCLASS   Measurement
 Helper macro to prevent code repetition; not visible outside of the header.
 
#define TRACE   DQCSIM_TRACE
 Convenience macro for calling log() with trace loglevel and automatically determined filename and line number. More...
 
#define DEBUG   DQCSIM_DEBUG
 Convenience macro for calling log() with debug loglevel and automatically determined filename and line number. More...
 
#define INFO   DQCSIM_INFO
 Convenience macro for calling log() with info loglevel and automatically determined filename and line number. More...
 
#define NOTE   DQCSIM_NOTE
 Convenience macro for calling log() with note loglevel and automatically determined filename and line number. More...
 
#define WARN   DQCSIM_WARN
 Convenience macro for calling log() with warn loglevel and automatically determined filename and line number. More...
 
#define WARNING   DQCSIM_WARNING
 Convenience macro for calling log() with warn loglevel and automatically determined filename and line number. More...
 
#define ERROR   DQCSIM_ERROR
 Convenience macro for calling log() with error loglevel and automatically determined filename and line number. More...
 
#define FATAL   DQCSIM_FATAL
 Convenience macro for calling log() with fatal loglevel and automatically determined filename and line number. More...
 
#define LOG   DQCSIM_LOG
 Convenience macro for calling log() with automatically determined filename and line number, but a dynamic loglevel (first argument). More...
 

Typedefs

using dqcsim::wrap::HandleIndex = raw::dqcs_handle_t
 C++-styled type name for raw::dqcs_handle_t. More...
 
using dqcsim::wrap::QubitIndex = raw::dqcs_qubit_t
 C++-styled type name for raw::dqcs_qubit_t. More...
 
using dqcsim::wrap::Cycle = raw::dqcs_cycle_t
 C++-styled type name for raw::dqcs_cycle_t. More...
 
using dqcsim::wrap::complex = std::complex< double >
 Typedef for the complex numbers used within the gate matrices.
 
typedef Callback< void, PluginState &, ArbCmdQueue && > dqcsim::wrap::callback::Initialize
 Callback wrapper specialized for the initialize callback.
 
typedef Callback< void, PluginState & > dqcsim::wrap::callback::Drop
 Callback wrapper specialized for the drop callback.
 
typedef Callback< ArbData, RunningPluginState &, ArbData && > dqcsim::wrap::callback::Run
 Callback wrapper specialized for the run callback.
 
typedef Callback< void, PluginState &, QubitSet &&, ArbCmdQueue && > dqcsim::wrap::callback::Allocate
 Callback wrapper specialized for the allocate callback.
 
typedef Callback< void, PluginState &, QubitSet && > dqcsim::wrap::callback::Free
 Callback wrapper specialized for the allocate callback.
 
typedef Callback< MeasurementSet, PluginState &, Gate && > dqcsim::wrap::callback::Gate
 Callback wrapper specialized for the gate callback.
 
typedef Callback< MeasurementSet, UpstreamPluginState &, Measurement && > dqcsim::wrap::callback::ModifyMeasurement
 Callback wrapper specialized for the modify_measurement callback.
 
typedef Callback< void, PluginState &, Cycle > dqcsim::wrap::callback::Advance
 Callback wrapper specialized for the advance callback.
 
typedef Callback< ArbData, PluginState &, ArbCmd > dqcsim::wrap::callback::Arb
 Callback wrapper specialized for the *_arb callbacks.
 
typedef Callback< void, std::string && > dqcsim::wrap::callback::SpawnPlugin
 Callback wrapper specialized for the manual plugin spawning callback.
 
typedef Callback< void, std::string &&, std::string &&, Loglevel, std::string &&, std::string &&, uint32_t, std::chrono::system_clock::time_point &&, uint32_t, uint64_t > dqcsim::wrap::callback::Log
 Callback wrapper specialized for the simulation logging callback. More...
 

Enumerations

enum  dqcsim::wrap::HandleType {
  dqcsim::wrap::HandleType::ArbData = 100, dqcsim::wrap::HandleType::ArbCmd = 101, dqcsim::wrap::HandleType::ArbCmdQueue = 102, dqcsim::wrap::HandleType::QubitSet = 103,
  dqcsim::wrap::HandleType::Gate = 104, dqcsim::wrap::HandleType::Measurement = 105, dqcsim::wrap::HandleType::MeasurementSet = 106, dqcsim::wrap::HandleType::Matrix = 107,
  dqcsim::wrap::HandleType::GateMap = 108, dqcsim::wrap::HandleType::FrontendProcessConfig = 200, dqcsim::wrap::HandleType::OperatorProcessConfig = 201, dqcsim::wrap::HandleType::BackendProcessConfig = 203,
  dqcsim::wrap::HandleType::FrontendThreadConfig = 204, dqcsim::wrap::HandleType::OperatorThreadConfig = 205, dqcsim::wrap::HandleType::BackendThreadConfig = 206, dqcsim::wrap::HandleType::SimulationConfig = 207,
  dqcsim::wrap::HandleType::Simulation = 208, dqcsim::wrap::HandleType::FrontendDefinition = 300, dqcsim::wrap::HandleType::OperatorDefinition = 301, dqcsim::wrap::HandleType::BackendDefinition = 302,
  dqcsim::wrap::HandleType::PluginJoinHandle = 303
}
 Represents the type of a raw handle. More...
 
enum  dqcsim::wrap::Loglevel {
  dqcsim::wrap::Loglevel::Off = 0, dqcsim::wrap::Loglevel::Fatal = 1, dqcsim::wrap::Loglevel::Error = 2, dqcsim::wrap::Loglevel::Warn = 3,
  dqcsim::wrap::Loglevel::Note = 4, dqcsim::wrap::Loglevel::Info = 5, dqcsim::wrap::Loglevel::Debug = 6, dqcsim::wrap::Loglevel::Trace = 7,
  dqcsim::wrap::Loglevel::Pass = 8
}
 Represents the loglevel of a message, a loglevel filter level, or one of the possible actions to take when a message is received from a plugin through stdout or stderr. More...
 
enum  dqcsim::wrap::MeasurementValue { dqcsim::wrap::MeasurementValue::Zero = 0, dqcsim::wrap::MeasurementValue::One = 1, dqcsim::wrap::MeasurementValue::Undefined = 2 }
 Represents the result of a qubit measurement. More...
 
enum  dqcsim::wrap::PathStyle { dqcsim::wrap::PathStyle::Keep = 0, dqcsim::wrap::PathStyle::Relative = 1, dqcsim::wrap::PathStyle::Absolute = 2 }
 Represents the possible options for dealing with paths when writing a reproduction file. More...
 
enum  dqcsim::wrap::PluginType { dqcsim::wrap::PluginType::Frontend = 0, dqcsim::wrap::PluginType::Operator = 1, dqcsim::wrap::PluginType::Backend = 2 }
 Enumeration of the three types of plugins. More...
 
enum  dqcsim::wrap::GateType { dqcsim::wrap::GateType::Unitary = 1, dqcsim::wrap::GateType::Measurement = 2, dqcsim::wrap::GateType::Prep = 3, dqcsim::wrap::GateType::Custom = 4 }
 Enumeration of gate types supported by DQCsim. More...
 
enum  dqcsim::wrap::PauliBasis { dqcsim::wrap::PauliBasis::X = 1, dqcsim::wrap::PauliBasis::Y = 2, dqcsim::wrap::PauliBasis::Z = 3 }
 Enumeration of Pauli bases. More...
 
enum  dqcsim::wrap::PredefinedGate {
  dqcsim::wrap::PredefinedGate::I = 100, dqcsim::wrap::PredefinedGate::X = 101, dqcsim::wrap::PredefinedGate::Y = 102, dqcsim::wrap::PredefinedGate::Z = 103,
  dqcsim::wrap::PredefinedGate::H = 104, dqcsim::wrap::PredefinedGate::S = 105, dqcsim::wrap::PredefinedGate::S_DAG = 106, dqcsim::wrap::PredefinedGate::T = 107,
  dqcsim::wrap::PredefinedGate::T_DAG = 108, dqcsim::wrap::PredefinedGate::RX_90 = 109, dqcsim::wrap::PredefinedGate::RX_M90 = 110, dqcsim::wrap::PredefinedGate::RX_180 = 111,
  dqcsim::wrap::PredefinedGate::RY_90 = 112, dqcsim::wrap::PredefinedGate::RY_M90 = 113, dqcsim::wrap::PredefinedGate::RY_180 = 114, dqcsim::wrap::PredefinedGate::RZ_90 = 115,
  dqcsim::wrap::PredefinedGate::RZ_M90 = 116, dqcsim::wrap::PredefinedGate::RZ_180 = 117, dqcsim::wrap::PredefinedGate::RX = 150, dqcsim::wrap::PredefinedGate::RY = 151,
  dqcsim::wrap::PredefinedGate::RZ = 152, dqcsim::wrap::PredefinedGate::PhaseK = 153, dqcsim::wrap::PredefinedGate::Phase = 154, dqcsim::wrap::PredefinedGate::U1 = 190,
  dqcsim::wrap::PredefinedGate::R = 191, dqcsim::wrap::PredefinedGate::Swap = 200, dqcsim::wrap::PredefinedGate::SqSwap = 201, dqcsim::wrap::PredefinedGate::U2 = 290,
  dqcsim::wrap::PredefinedGate::U3 = 390
}
 Enumeration of unitary gates defined by DQCsim. More...
 

Functions

void dqcsim::wrap::check (raw::dqcs_return_t code)
 Checks a dqcs_return_t return value; if failure, throws a runtime error with DQCsim's error message. More...
 
bool dqcsim::wrap::check (raw::dqcs_bool_return_t code)
 Checks a dqcs_bool_return_t return value; if failure, throws a runtime error with DQCsim's error message. More...
 
unsigned long long dqcsim::wrap::check (unsigned long long handle)
 Checks a dqcs_handle_t or dqcs_qubit_t return value; if failure, throws a runtime error with DQCsim's error message. More...
 
Cycle dqcsim::wrap::check (Cycle cycle)
 Checks a dqcs_cycle_t return value; if failure, throws a runtime error with DQCsim's error message. More...
 
size_t dqcsim::wrap::check (ssize_t size)
 Checks a size return value; if failure, throws a runtime error with DQCsim's error message. More...
 
double dqcsim::wrap::check (double value)
 Checks a double return value from dqcs_pcfg_*_timeout_get(); if failure, throws a runtime error with DQCsim's error message. More...
 
raw::dqcs_handle_type_t dqcsim::wrap::to_raw (HandleType type) noexcept
 Converts a HandleType to its raw C enum. More...
 
HandleType dqcsim::wrap::check (raw::dqcs_handle_type_t type)
 Checks a dqcs_handle_type_t return value and converts it to its C++ enum representation; if failure, throws a runtime error with DQCsim's error message. More...
 
raw::dqcs_loglevel_t dqcsim::wrap::to_raw (Loglevel loglevel) noexcept
 Converts a Loglevel to its raw C enum. More...
 
Loglevel dqcsim::wrap::check (raw::dqcs_loglevel_t loglevel)
 Checks a dqcs_loglevel_t return value and converts it to its C++ enum representation; if failure, throws a runtime error with DQCsim's error message. More...
 
raw::dqcs_measurement_t dqcsim::wrap::to_raw (MeasurementValue measurement) noexcept
 Converts a MeasurementValue to its raw C enum. More...
 
MeasurementValue dqcsim::wrap::check (raw::dqcs_measurement_t measurement)
 Checks a dqcs_measurement_t return value and converts it to its C++ enum representation; if failure, throws a runtime error with DQCsim's error message. More...
 
raw::dqcs_path_style_t dqcsim::wrap::to_raw (PathStyle style) noexcept
 Converts a PathStyle to its raw C enum. More...
 
PathStyle dqcsim::wrap::check (raw::dqcs_path_style_t style)
 Checks a dqcs_path_style_t return value and converts it to its C++ enum representation; if failure, throws a runtime error with DQCsim's error message. More...
 
raw::dqcs_plugin_type_t dqcsim::wrap::to_raw (PluginType type) noexcept
 Converts a PluginType to its raw C enum. More...
 
PluginType dqcsim::wrap::check (raw::dqcs_plugin_type_t type)
 Checks a dqcs_plugin_type_t return value and converts it to its C++ enum representation; if failure, throws a runtime error with DQCsim's error message. More...
 
raw::dqcs_gate_type_t dqcsim::wrap::to_raw (GateType type) noexcept
 Converts a GateType to its raw C enum. More...
 
GateType dqcsim::wrap::check (raw::dqcs_gate_type_t type)
 Checks a dqcs_gate_type_t return value and converts it to its C++ enum representation; if failure, throws a runtime error with DQCsim's error message. More...
 
raw::dqcs_basis_t dqcsim::wrap::to_raw (PauliBasis type) noexcept
 Converts a PauliBasis to its raw C enum. More...
 
PauliBasis dqcsim::wrap::check (raw::dqcs_basis_t type)
 Checks a dqcs_basis_t return value and converts it to its C++ enum representation; if failure, throws a runtime error with DQCsim's error message. More...
 
raw::dqcs_predefined_gate_t dqcsim::wrap::to_raw (PredefinedGate type) noexcept
 Converts a PredefinedGate to its raw C enum. More...
 
PredefinedGate dqcsim::wrap::check (raw::dqcs_predefined_gate_t type)
 Checks a dqcs_predefined_gate_t return value and converts it to its C++ enum representation; if failure, throws a runtime error with DQCsim's error message. More...
 
template<typename T >
T * dqcsim::wrap::check (T *pointer)
 Checks a pointer return value; if failure, throws a runtime error with DQCsim's error message. More...
 
template<typename... Args>
void dqcsim::wrap::log (wrap::Loglevel level, const std::string &module, const std::string &file, unsigned int line_nr, const std::string &format, Args... args) noexcept
 Shim around the dqcs_log_format C API using std::string for the strings. More...
 
bool dqcsim::wrap::log_raw (wrap::Loglevel level, const std::string &module, const std::string &file, unsigned int line_nr, const std::string &message) noexcept
 Shim around the dqcs_log_raw C API using std::string for the strings. More...
 
QubitRef dqcsim::wrap::operator""_q (unsigned long long int qubit)
 Literal operator for qubits, so for instance 15_q returns qubit 15.
 
PluginConfigurationBuilder dqcsim::wrap::Frontend (const std::string &name="") noexcept
 Shorthand for constructing a frontend plugin configuration builder. More...
 
PluginConfigurationBuilder dqcsim::wrap::Operator (const std::string &name="") noexcept
 Shorthand for constructing an operator plugin configuration builder. More...
 
PluginConfigurationBuilder dqcsim::wrap::Backend (const std::string &name="") noexcept
 Shorthand for constructing a backend plugin configuration builder. More...
 

Detailed Description

Provides DQCsim's entire C++ API.

This is the main file you should be including in pure C++ projects:

#include <dqcsim>

It should be installed into /usr/include by installing the DQCsim Python module using pip as root. If you're pulling DQCsim in through CMake instead, the appropriate include path should be added to your project automatically.

Definition in file dqcsim.

Macro Definition Documentation

◆ DQCSIM_LOG

#define DQCSIM_LOG (   level,
  fmt,
  ... 
)
Value:
level, "C++", __FILE__, __LINE__, \
fmt, ##__VA_ARGS__)

Convenience macro for calling log() with automatically determined filename and line number, but a dynamic loglevel (first argument).

Parameters
levelThe severity level of the message.
fmtThe printf-style format string for the log message.
...The arguments for the printf-style format string.

Definition at line 1519 of file dqcsim.

◆ DQCSIM_TRACE

#define DQCSIM_TRACE (   fmt,
  ... 
)    DQCSIM_LOG(::dqcsim::wrap::Loglevel::Trace, fmt, ##__VA_ARGS__)

Convenience macro for calling log() with trace loglevel and automatically determined filename and line number.

Parameters
fmtThe printf-style format string for the log message.
...The arguments for the printf-style format string.

Definition at line 1531 of file dqcsim.

◆ DQCSIM_DEBUG

#define DQCSIM_DEBUG (   fmt,
  ... 
)    DQCSIM_LOG(::dqcsim::wrap::Loglevel::Debug, fmt, ##__VA_ARGS__)

Convenience macro for calling log() with debug loglevel and automatically determined filename and line number.

Parameters
fmtThe printf-style format string for the log message.
...The arguments for the printf-style format string.

Definition at line 1540 of file dqcsim.

◆ DQCSIM_INFO

#define DQCSIM_INFO (   fmt,
  ... 
)    DQCSIM_LOG(::dqcsim::wrap::Loglevel::Info, fmt, ##__VA_ARGS__)

Convenience macro for calling log() with info loglevel and automatically determined filename and line number.

Parameters
fmtThe printf-style format string for the log message.
...The arguments for the printf-style format string.

Definition at line 1549 of file dqcsim.

◆ DQCSIM_NOTE

#define DQCSIM_NOTE (   fmt,
  ... 
)    DQCSIM_LOG(::dqcsim::wrap::Loglevel::Note, fmt, ##__VA_ARGS__)

Convenience macro for calling log() with note loglevel and automatically determined filename and line number.

Parameters
fmtThe printf-style format string for the log message.
...The arguments for the printf-style format string.

Definition at line 1558 of file dqcsim.

◆ DQCSIM_WARN

#define DQCSIM_WARN (   fmt,
  ... 
)    DQCSIM_LOG(::dqcsim::wrap::Loglevel::Warn, fmt, ##__VA_ARGS__)

Convenience macro for calling log() with warn loglevel and automatically determined filename and line number.

Parameters
fmtThe printf-style format string for the log message.
...The arguments for the printf-style format string.

Definition at line 1567 of file dqcsim.

◆ DQCSIM_WARNING

#define DQCSIM_WARNING (   fmt,
  ... 
)    DQCSIM_LOG(::dqcsim::wrap::Loglevel::Warn, fmt, ##__VA_ARGS__)

Convenience macro for calling log() with warn loglevel and automatically determined filename and line number.

Parameters
fmtThe printf-style format string for the log message.
...The arguments for the printf-style format string.

Definition at line 1576 of file dqcsim.

◆ DQCSIM_ERROR

#define DQCSIM_ERROR (   fmt,
  ... 
)    DQCSIM_LOG(::dqcsim::wrap::Loglevel::Error, fmt, ##__VA_ARGS__)

Convenience macro for calling log() with error loglevel and automatically determined filename and line number.

Parameters
fmtThe printf-style format string for the log message.
...The arguments for the printf-style format string.

Definition at line 1585 of file dqcsim.

◆ DQCSIM_FATAL

#define DQCSIM_FATAL (   fmt,
  ... 
)    DQCSIM_LOG(::dqcsim::wrap::Loglevel::Fatal, fmt, ##__VA_ARGS__)

Convenience macro for calling log() with fatal loglevel and automatically determined filename and line number.

Parameters
fmtThe printf-style format string for the log message.
...The arguments for the printf-style format string.

Definition at line 1594 of file dqcsim.

◆ TRACE

#define TRACE   DQCSIM_TRACE

Convenience macro for calling log() with trace loglevel and automatically determined filename and line number.

Note
Defined only when DQCSIM_SHORT_LOGGING_MACROS is defined before the <dqcsim> header is included.

Definition at line 10452 of file dqcsim.

◆ DEBUG

#define DEBUG   DQCSIM_DEBUG

Convenience macro for calling log() with debug loglevel and automatically determined filename and line number.

Note
Defined only when DQCSIM_SHORT_LOGGING_MACROS is defined before the <dqcsim> header is included.

Definition at line 10461 of file dqcsim.

◆ INFO

#define INFO   DQCSIM_INFO

Convenience macro for calling log() with info loglevel and automatically determined filename and line number.

Note
Defined only when DQCSIM_SHORT_LOGGING_MACROS is defined before the <dqcsim> header is included.

Definition at line 10470 of file dqcsim.

◆ NOTE

#define NOTE   DQCSIM_NOTE

Convenience macro for calling log() with note loglevel and automatically determined filename and line number.

Note
Defined only when DQCSIM_SHORT_LOGGING_MACROS is defined before the <dqcsim> header is included.

Definition at line 10479 of file dqcsim.

◆ WARN

#define WARN   DQCSIM_WARN

Convenience macro for calling log() with warn loglevel and automatically determined filename and line number.

Note
Defined only when DQCSIM_SHORT_LOGGING_MACROS is defined before the <dqcsim> header is included.

Definition at line 10488 of file dqcsim.

◆ WARNING

#define WARNING   DQCSIM_WARNING

Convenience macro for calling log() with warn loglevel and automatically determined filename and line number.

Note
Defined only when DQCSIM_SHORT_LOGGING_MACROS is defined before the <dqcsim> header is included.

Definition at line 10497 of file dqcsim.

◆ ERROR

#define ERROR   DQCSIM_ERROR

Convenience macro for calling log() with error loglevel and automatically determined filename and line number.

Note
Defined only when DQCSIM_SHORT_LOGGING_MACROS is defined before the <dqcsim> header is included.

Definition at line 10506 of file dqcsim.

◆ FATAL

#define FATAL   DQCSIM_FATAL

Convenience macro for calling log() with fatal loglevel and automatically determined filename and line number.

Note
Defined only when DQCSIM_SHORT_LOGGING_MACROS is defined before the <dqcsim> header is included.

Definition at line 10515 of file dqcsim.

◆ LOG

#define LOG   DQCSIM_LOG

Convenience macro for calling log() with automatically determined filename and line number, but a dynamic loglevel (first argument).

Note
Defined only when DQCSIM_SHORT_LOGGING_MACROS is defined before the <dqcsim> header is included.

Definition at line 10524 of file dqcsim.

dqcsim
Provides DQCsim's entire C++ API.
dqcsim::wrap::log
void log(wrap::Loglevel level, const std::string &module, const std::string &file, unsigned int line_nr, const std::string &format, Args... args) noexcept
Shim around the dqcs_log_format C API using std::string for the strings.
Definition: dqcsim:1459