From d4348ae6206599f652601d0b828e3bfe43bc717c Mon Sep 17 00:00:00 2001 From: joaomanita Date: Sat, 19 Oct 2024 20:11:36 +0000 Subject: [PATCH] =?UTF-8?q?Deploy=20preview=20for=20PR=201282=20?= =?UTF-8?q?=F0=9F=9B=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- preview/pr-1282/annotated.html | 16 +- ...ice_8hpp.html => audio__context_8hpp.html} | 31 +- ...scubos_1_1core_1_1al_1_1AudioContext.html} | 165 +++---- ...bos_1_1core_1_1al_1_1MiniaudioContext.html | 218 +++++++++ ..._1_1core_1_1al_1_1impl_1_1AudioDevice.html | 168 +++++++ ...cubos_1_1core_1_1al_1_1impl_1_1Buffer.html | 41 +- ...cubos_1_1core_1_1al_1_1impl_1_1Source.html | 98 ++-- ...os_1_1core_1_1data_1_1StandardArchive.html | 18 + ... classcubos_1_1core_1_1tel_1_1Logger.html} | 144 ++---- ...classcubos_1_1core_1_1tel_1_1Metrics.html} | 54 +-- ...lasscubos_1_1core_1_1tel_1_1SpanGuard.html | 103 ++++ ...sscubos_1_1core_1_1tel_1_1SpanManager.html | 171 +++++++ ...asscubos_1_1core_1_1thread_1_1Process.html | 246 ++++++++++ .../classcubos_1_1core_1_1thread_1_1Task.html | 30 ++ .../classcubos_1_1engine_1_1AnyAsset.html | 65 ++- .../classcubos_1_1engine_1_1AssetMeta.html | 36 ++ .../classcubos_1_1engine_1_1Assets.html | 22 + .../classtesseratos_1_1ProjectManager.html | 240 +++++++++ .../dir_66ee469e7479b8bd292626243a0daea9.html | 2 + .../dir_6c897dd97bedf3914ee8a4d9f7f6549c.html | 4 - .../dir_98bd0872c878d6fa2d8a66c2174847b1.html | 122 +++++ .../dir_b3628534f645523dfa2d021cded97bf6.html | 2 + .../dir_f6f65ff657bd34b22e5078310628f4e7.html | 4 +- preview/pr-1282/examples-core-metrics.html | 155 ------ ...ng.html => examples-core-tel-logging.html} | 9 +- .../pr-1282/examples-core-tel-metrics.html | 167 +++++++ .../pr-1282/examples-core-tel-tracing.html | 120 +++++ preview/pr-1282/examples-core-tel.html | 105 ++++ preview/pr-1282/examples-core.html | 2 +- .../pr-1282/examples-engine-hello-cubos.html | 2 +- preview/pr-1282/files.html | 12 +- preview/pr-1282/group__core-al.html | 36 +- preview/pr-1282/group__core-tel.html | 456 ++++++++++++++++++ preview/pr-1282/group__core-thread.html | 6 + preview/pr-1282/group__core.html | 451 +---------------- .../group__tesseratos-debugger-plugin.html | 2 + .../group__tesseratos-project-plugin.html | 151 ++++++ preview/pr-1282/group__tesseratos.html | 2 + .../{log_8hpp.html => level_8hpp.html} | 131 ++--- preview/pr-1282/logging_8hpp.html | 351 ++++++++++++++ preview/pr-1282/manager_8hpp.html | 136 ++++++ preview/pr-1282/metrics_8hpp.html | 14 +- preview/pr-1282/modules.html | 2 + preview/pr-1282/namespacecubos_1_1core.html | 28 -- .../pr-1282/namespacecubos_1_1core_1_1al.html | 35 +- .../namespacecubos_1_1core_1_1al_1_1impl.html | 4 + .../namespacecubos_1_1core_1_1thread.html | 4 + preview/pr-1282/namespacetesseratos.html | 8 + preview/pr-1282/pages.html | 10 +- ..._1ScopeProfiler.html => process_8hpp.html} | 38 +- preview/pr-1282/searchdata-v2.js | 2 +- ...bos_1_1core_1_1tel_1_1Logger_1_1Entry.html | 139 ++++++ ...1_1core_1_1tel_1_1Logger_1_1Location.html} | 24 +- ..._1core_1_1tel_1_1Logger_1_1Timestamp.html} | 24 +- ...structcubos_1_1core_1_1tel_1_1SpanId.html} | 28 +- ...src_2tesseratos_2project_2plugin_8hpp.html | 130 +++++ preview/pr-1282/tracing_8hpp.html | 163 +++++++ 57 files changed, 3740 insertions(+), 1207 deletions(-) rename preview/pr-1282/{audio__device_8hpp.html => audio__context_8hpp.html} (85%) rename preview/pr-1282/{classcubos_1_1core_1_1al_1_1AudioDevice.html => classcubos_1_1core_1_1al_1_1AudioContext.html} (50%) create mode 100644 preview/pr-1282/classcubos_1_1core_1_1al_1_1MiniaudioContext.html create mode 100644 preview/pr-1282/classcubos_1_1core_1_1al_1_1impl_1_1AudioDevice.html rename preview/pr-1282/{classcubos_1_1core_1_1Logger.html => classcubos_1_1core_1_1tel_1_1Logger.html} (57%) rename preview/pr-1282/{classcubos_1_1core_1_1Metrics.html => classcubos_1_1core_1_1tel_1_1Metrics.html} (79%) create mode 100644 preview/pr-1282/classcubos_1_1core_1_1tel_1_1SpanGuard.html create mode 100644 preview/pr-1282/classcubos_1_1core_1_1tel_1_1SpanManager.html create mode 100644 preview/pr-1282/classcubos_1_1core_1_1thread_1_1Process.html create mode 100644 preview/pr-1282/classtesseratos_1_1ProjectManager.html create mode 100644 preview/pr-1282/dir_98bd0872c878d6fa2d8a66c2174847b1.html delete mode 100644 preview/pr-1282/examples-core-metrics.html rename preview/pr-1282/{examples-core-logging.html => examples-core-tel-logging.html} (84%) create mode 100644 preview/pr-1282/examples-core-tel-metrics.html create mode 100644 preview/pr-1282/examples-core-tel-tracing.html create mode 100644 preview/pr-1282/examples-core-tel.html create mode 100644 preview/pr-1282/group__core-tel.html create mode 100644 preview/pr-1282/group__tesseratos-project-plugin.html rename preview/pr-1282/{log_8hpp.html => level_8hpp.html} (51%) create mode 100644 preview/pr-1282/logging_8hpp.html create mode 100644 preview/pr-1282/manager_8hpp.html rename preview/pr-1282/{classcubos_1_1core_1_1ScopeProfiler.html => process_8hpp.html} (75%) create mode 100644 preview/pr-1282/structcubos_1_1core_1_1tel_1_1Logger_1_1Entry.html rename preview/pr-1282/{structcubos_1_1core_1_1Logger_1_1Location.html => structcubos_1_1core_1_1tel_1_1Logger_1_1Location.html} (83%) rename preview/pr-1282/{structcubos_1_1core_1_1Logger_1_1Timestamp.html => structcubos_1_1core_1_1tel_1_1Logger_1_1Timestamp.html} (82%) rename preview/pr-1282/{structcubos_1_1core_1_1Logger_1_1Entry.html => structcubos_1_1core_1_1tel_1_1SpanId.html} (79%) create mode 100644 preview/pr-1282/tools_2tesseratos_2src_2tesseratos_2project_2plugin_8hpp.html create mode 100644 preview/pr-1282/tracing_8hpp.html diff --git a/preview/pr-1282/annotated.html b/preview/pr-1282/annotated.html index 1890835e9..5688a291b 100644 --- a/preview/pr-1282/annotated.html +++ b/preview/pr-1282/annotated.html @@ -59,11 +59,13 @@

Classes

-
  • class AudioDevice Audio device interface used to wrap low-level audio rendering APIs.
  • +
  • class AudioContext Audio context that contains audio devices;.
  • +
  • class MiniaudioContext Audio device implementation using miniaudio.
  • diff --git a/preview/pr-1282/audio__device_8hpp.html b/preview/pr-1282/audio__context_8hpp.html similarity index 85% rename from preview/pr-1282/audio__device_8hpp.html rename to preview/pr-1282/audio__context_8hpp.html index 4aa13906a..c1ba80d59 100644 --- a/preview/pr-1282/audio__device_8hpp.html +++ b/preview/pr-1282/audio__context_8hpp.html @@ -2,7 +2,7 @@ - core/al/audio_device.hpp file | Cubos Docs + core/al/audio_context.hpp file | Cubos Docs @@ -46,9 +46,9 @@

    - core/al/audio_device.hpp file + core/al/audio_context.hpp file

    -

    Class cubos::core::al::AudioDevice and related types.

    +

    Class cubos::core::al::AudioContext and related types.

    diff --git a/preview/pr-1282/classcubos_1_1core_1_1al_1_1AudioDevice.html b/preview/pr-1282/classcubos_1_1core_1_1al_1_1AudioContext.html similarity index 50% rename from preview/pr-1282/classcubos_1_1core_1_1al_1_1AudioDevice.html rename to preview/pr-1282/classcubos_1_1core_1_1al_1_1AudioContext.html index e9ea21739..ba8bc2e6b 100644 --- a/preview/pr-1282/classcubos_1_1core_1_1al_1_1AudioDevice.html +++ b/preview/pr-1282/classcubos_1_1core_1_1al_1_1AudioContext.html @@ -2,7 +2,7 @@ - cubos::core::al::AudioDevice class | Cubos Docs + cubos::core::al::AudioContext class | Cubos Docs @@ -46,100 +46,79 @@

    - cubos::core::al::AudioDevice class - + cubos::core::al::AudioContext class +

    -

    Audio device interface used to wrap low-level audio rendering APIs.

    +

    Audio context that contains audio devices;.

    -
    -

    Public static functions

    +
    +

    Derived classes

    - static auto create(const std::string& specifier = "") -> std::shared_ptr<AudioDevice> + class MiniaudioContext
    -
    Creates an audio device from a given device specifier.
    -
    - static void enumerateDevices(std::vector<std::string>& devices) -
    -
    Enumerates the available devices.
    +
    Audio device implementation using miniaudio.
    -
    -

    Constructors, destructors, conversion operators

    +
    +

    Public static functions

    -
    - AudioDevice(const AudioDevice&) deleted +
    + static auto create() -> std::shared_ptr<AudioContext>
    -
    Forbid copy construction.
    +
    Creates an audio context.

    Public functions

    - auto createBuffer() -> Buffer pure virtual + void enumerateDevices(std::vector<std::string>& devices) pure virtual
    -
    Creates a new audio buffer.
    -
    - auto createSource() -> Source pure virtual -
    -
    Creates a new audio source.
    -
    - void setListenerPosition(const glm::vec3& position) pure virtual -
    -
    Sets the position of the listener.
    +
    Enumerates the available devices.
    - void setListenerOrientation(const glm::vec3& forward, - const glm::vec3& up) pure virtual + auto createDevice(unsigned int listenerCount, + const std::string& specifier = "") -> AudioDevice pure virtual
    -
    Sets the orientation of the listener.
    +
    Creates a new audio device.
    - void setListenerVelocity(const glm::vec3& velocity) pure virtual + auto createBuffer(const void* data, + size_t dataSize) -> Buffer pure virtual
    -
    Sets the velocity of the listener. Used to implement the doppler effect.
    +
    Creates a new audio buffer.

    Function documentation

    -
    +

    - static std::shared_ptr<AudioDevice> cubos::core::al::AudioDevice::create(const std::string& specifier = "") + static std::shared_ptr<AudioContext> cubos::core::al::AudioContext::create()

    -

    Creates an audio device from a given device specifier.

    +

    Creates an audio context.

    - - - - - - - - - - - + +
    Parameters
    specifierDevice specifier (empty for default).
    ReturnsAudio device, or nullptr on failure.ReturnsAudioContext, or nullptr on failure.
    -
    -
    +

    - static void cubos::core::al::AudioDevice::enumerateDevices(std::vector<std::string>& devices) + void cubos::core::al::AudioContext::enumerateDevices(std::vector<std::string>& devices) pure virtual

    Enumerates the available devices.

    @@ -149,93 +128,65 @@

    - +
    devices outVector to fill with the available devices.Vector to fill with the available device's specifiers.
    -
    -

    - Buffer cubos::core::al::AudioDevice::createBuffer() pure virtual -

    -

    Creates a new audio buffer.

    - - - - - - - -
    ReturnsHandle of the new buffer.
    -
    -
    +

    - Source cubos::core::al::AudioDevice::createSource() pure virtual + AudioDevice cubos::core::al::AudioContext::createDevice(unsigned int listenerCount, + const std::string& specifier = "") pure virtual

    -

    Creates a new audio source.

    - - - - - - - -
    ReturnsHandle of the new source.
    -
    -
    -

    - void cubos::core::al::AudioDevice::setListenerPosition(const glm::vec3& position) pure virtual -

    -

    Sets the position of the listener.

    +

    Creates a new audio device.

    - - + + + + + + + + + + + +
    Parameters
    positionPosition.listenerCountNumber of audio listeners to be supported by the device.
    specifierIdentifier of the audio device.
    ReturnsHandle of the new device
    -
    +

    - void cubos::core::al::AudioDevice::setListenerOrientation(const glm::vec3& forward, - const glm::vec3& up) pure virtual + Buffer cubos::core::al::AudioContext::createBuffer(const void* data, + size_t dataSize) pure virtual

    -

    Sets the orientation of the listener.

    +

    Creates a new audio buffer.

    - - + + - - + + -
    Parameters
    forwardForward direction of the listener.dataData to be written to the buffer, either .wav, .mp3 or .flac.
    upUp direction of the listener.dataSizeSize of the data to be written.
    -
    -
    -

    - void cubos::core::al::AudioDevice::setListenerVelocity(const glm::vec3& velocity) pure virtual -

    -

    Sets the velocity of the listener. Used to implement the doppler effect.

    - - - - - + - - + + - +
    Parameters
    velocityVelocity of the listener.ReturnsHandle of the new buffer.
    diff --git a/preview/pr-1282/classcubos_1_1core_1_1al_1_1MiniaudioContext.html b/preview/pr-1282/classcubos_1_1core_1_1al_1_1MiniaudioContext.html new file mode 100644 index 000000000..0a9dba620 --- /dev/null +++ b/preview/pr-1282/classcubos_1_1core_1_1al_1_1MiniaudioContext.html @@ -0,0 +1,218 @@ + + + + + cubos::core::al::MiniaudioContext class | Cubos Docs + + + + + + + +
    +
    +
    +
    +
    +

    + cubos::core::al::MiniaudioContext class +

    +

    Audio device implementation using miniaudio.

    + +
    +

    Base classes

    +
    +
    + class AudioContext +
    +
    Audio context that contains audio devices;.
    +
    +
    +
    +

    Public functions

    +
    +
    + auto createDevice(unsigned int listenerCount, + const std::string& specifier) -> AudioDevice override +
    +
    Creates a new audio device.
    +
    + auto createBuffer(const void* data, + size_t dataSize) -> Buffer override +
    +
    Creates a new audio buffer.
    +
    + void enumerateDevices(std::vector<std::string>& devices) override +
    +
    Enumerates the available devices.
    +
    +
    +
    +

    Function documentation

    +
    +

    + AudioDevice cubos::core::al::MiniaudioContext::createDevice(unsigned int listenerCount, + const std::string& specifier) override +

    +

    Creates a new audio device.

    + + + + + + + + + + + + + + + + + + + + +
    Parameters
    listenerCountNumber of audio listeners to be supported by the device.
    specifierIdentifier of the audio device.
    ReturnsHandle of the new device
    +
    +
    +

    + Buffer cubos::core::al::MiniaudioContext::createBuffer(const void* data, + size_t dataSize) override +

    +

    Creates a new audio buffer.

    + + + + + + + + + + + + + + + + + + + + +
    Parameters
    dataData to be written to the buffer, either .wav, .mp3 or .flac.
    dataSizeSize of the data to be written.
    ReturnsHandle of the new buffer.
    +
    +
    +

    + void cubos::core::al::MiniaudioContext::enumerateDevices(std::vector<std::string>& devices) override +

    +

    Enumerates the available devices.

    + + + + + + + + + + +
    Parameters
    devices outVector to fill with the available device's specifiers.
    +
    +
    +
    +
    +
    +
    + + + +
    + + diff --git a/preview/pr-1282/classcubos_1_1core_1_1al_1_1impl_1_1AudioDevice.html b/preview/pr-1282/classcubos_1_1core_1_1al_1_1impl_1_1AudioDevice.html new file mode 100644 index 000000000..25814d1a9 --- /dev/null +++ b/preview/pr-1282/classcubos_1_1core_1_1al_1_1impl_1_1AudioDevice.html @@ -0,0 +1,168 @@ + + + + + cubos::core::al::impl::AudioDevice class | Cubos Docs + + + + + + + +
    +
    +
    +
    +
    +

    + cubos::core::al::impl::AudioDevice class + +

    +

    Audio device interface used to wrap low-level audio rendering APIs.

    + +
    +

    Constructors, destructors, conversion operators

    +
    +
    + AudioDevice(const AudioDevice&) deleted +
    +
    Forbid copy construction.
    +
    +
    +
    +

    Public functions

    +
    +
    + auto createSource() -> std::shared_ptr<impl::Source> pure virtual +
    +
    Creates a new audio source.
    +
    + auto listener(size_t index) -> std::shared_ptr<impl::Listener> pure virtual +
    +
    Creates a new audio listener.
    +
    +
    +
    +

    Function documentation

    +
    +

    + std::shared_ptr<impl::Source> cubos::core::al::impl::AudioDevice::createSource() pure virtual +

    +

    Creates a new audio source.

    + + + + + + + +
    ReturnsHandle of the new source.
    +
    +
    +

    + std::shared_ptr<impl::Listener> cubos::core::al::impl::AudioDevice::listener(size_t index) pure virtual +

    +

    Creates a new audio listener.

    + + + + + + + +
    ReturnsHandle of the new listener.
    +
    +
    +
    +
    +
    +
    + + + +
    + + diff --git a/preview/pr-1282/classcubos_1_1core_1_1al_1_1impl_1_1Buffer.html b/preview/pr-1282/classcubos_1_1core_1_1al_1_1impl_1_1Buffer.html index 0381eac1f..1a9988e36 100644 --- a/preview/pr-1282/classcubos_1_1core_1_1al_1_1impl_1_1Buffer.html +++ b/preview/pr-1282/classcubos_1_1core_1_1al_1_1impl_1_1Buffer.html @@ -47,7 +47,7 @@

    cubos::core::al::impl::Buffer class - +

    Abstract audio buffer.

    Function documentation

    -
    +

    - void cubos::core::al::impl::Buffer::fill(Format format, - std::size_t size, - const void* data, - std::size_t frequency) pure virtual + float cubos::core::al::impl::Buffer::length() pure virtual

    -

    Fills the buffer with data.

    +

    Gets the length in seconds of the audio buffer.

    - - - - + - - + + - - - - - - - - - - - - - +
    Parameters
    formatAudio format of the data.ReturnsLength in seconds of the audio buffer.
    sizeSize of the buffer in bytes.
    dataBuffer data.
    frequencyAudio frequency.
    diff --git a/preview/pr-1282/classcubos_1_1core_1_1al_1_1impl_1_1Source.html b/preview/pr-1282/classcubos_1_1core_1_1al_1_1impl_1_1Source.html index 81fc120ac..9afb20645 100644 --- a/preview/pr-1282/classcubos_1_1core_1_1al_1_1impl_1_1Source.html +++ b/preview/pr-1282/classcubos_1_1core_1_1al_1_1impl_1_1Source.html @@ -47,7 +47,7 @@

    cubos::core::al::impl::Source class - +

    Abstract audio source.

    Function documentation

    -
    +

    - void cubos::core::al::impl::Source::setBuffer(std::shared_ptr<Buffer> buffer) pure virtual + void cubos::core::al::impl::Source::setBuffer(cubos::core::al::Buffer buffer) pure virtual

    Sets the buffer to be played by the source.

    @@ -153,7 +151,7 @@

    - +

    @@ -223,26 +221,9 @@

    -
    -

    - void cubos::core::al::impl::Source::setRelative(bool relative) pure virtual -

    -

    Sets whether the source position and velocity is relative to the listener or not.

    - - - - - - - - - - -
    Parameters
    relativeRelative flag.
    -
    -
    +

    - void cubos::core::al::impl::Source::setDistance(float maxDistance) pure virtual + void cubos::core::al::impl::Source::setMaxDistance(float maxDistance) pure virtual

    Sets the maximum distance at which the source is audible.

    @@ -257,36 +238,46 @@

    -
    +

    - void cubos::core::al::impl::Source::setConeAngle(float coneAngle) pure virtual + void cubos::core::al::impl::Source::setMinDistance(float minDistance) pure virtual

    -

    Sets the cone angle of the source, in degrees. By default, 360.

    +

    Sets the minimum distance at which the source starts to attenuate.

    - - + +
    Parameters
    coneAngleAngle, in degrees.minDistanceMinimum distance.
    -
    +

    - void cubos::core::al::impl::Source::setConeGain(float coneGain) pure virtual + void cubos::core::al::impl::Source::setCone(float innerAngle, + float outerAngle, + float outerGain) pure virtual

    -

    Sets the cone gain of the source.

    +

    Sets the cone angle, in degrees. While also setting the outerGain.

    - - + + + + + + + + + +
    Parameters
    coneGainGain.innerAngleOuter angle, in degrees.
    outerAngleInner angle, in degrees.
    outerGain
    @@ -308,23 +299,6 @@

    -
    -

    - void cubos::core::al::impl::Source::setReferenceDistance(float referenceDistance) pure virtual -

    -

    Sets the distance under which the volume for the source would normally drop by half.

    - - - - - - - - - - -
    Parameters
    referenceDistanceDistance.
    -
    diff --git a/preview/pr-1282/classcubos_1_1core_1_1data_1_1StandardArchive.html b/preview/pr-1282/classcubos_1_1core_1_1data_1_1StandardArchive.html index 956ede6a7..b4c931e5e 100644 --- a/preview/pr-1282/classcubos_1_1core_1_1data_1_1StandardArchive.html +++ b/preview/pr-1282/classcubos_1_1core_1_1data_1_1StandardArchive.html @@ -87,6 +87,10 @@

    Constructors, destructors, conversion operators<

    Public functions

    +
    + auto initialized() const -> bool +
    +
    Checks if the archive was successfully initialized.
    auto create(std::size_t parent, std::string_view name, @@ -159,6 +163,20 @@

    If readOnly is false and there's no file or directory at osPath, then it is created.

    +
    +

    + bool cubos::core::data::StandardArchive::initialized() const +

    +

    Checks if the archive was successfully initialized.

    + + + + + + + +
    ReturnsTrue if the archive was successfully initialized, false otherwise.
    +

    std::size_t cubos::core::data::StandardArchive::create(std::size_t parent, diff --git a/preview/pr-1282/classcubos_1_1core_1_1Logger.html b/preview/pr-1282/classcubos_1_1core_1_1tel_1_1Logger.html similarity index 57% rename from preview/pr-1282/classcubos_1_1core_1_1Logger.html rename to preview/pr-1282/classcubos_1_1core_1_1tel_1_1Logger.html index d1ef8d1c5..70189b66d 100644 --- a/preview/pr-1282/classcubos_1_1core_1_1Logger.html +++ b/preview/pr-1282/classcubos_1_1core_1_1tel_1_1Logger.html @@ -2,7 +2,7 @@ - cubos::core::Logger class | Cubos Docs + cubos::core::tel::Logger class | Cubos Docs @@ -46,8 +46,8 @@

    - cubos::core::Logger class final - + cubos::core::tel::Logger class final +

    Singleton which holds the logging state.

    Public static functions

    - static void level(Level level) + static void level(Level level)
    Sets the log level.
    - static auto level() -> Level + static auto level() -> Level
    Gets the current log level.
    - static auto logToFile(const std::string& filePath) -> bool + static auto logToFile(const std::string& filePath) -> bool
    Sets a file path where logs will be saved.
    - static auto logToFile() -> bool + static auto logToFile() -> bool
    Mounts a standard archive on the /logs/ directory, and calls logToFile to a timestamped log file on that directory.
    - static void write(Level level, - Location location, + static void write(Level level, + Location location, std::string message)
    Creates a new entry in the logs, as long as the log level is high enough.
    template<typename... TArgs>
    - static void writeFormat(Level level, - Location location, + static void writeFormat(Level level, + Location location, const char* format, TArgs... args)
    -
    Wrapper for write() with message formatting.
    +
    Wrapper for write() with message formatting.
    - static auto read(std::size_t& cursor, - Entry& entry) -> bool + static auto read(std::size_t& cursor, + Entry& entry) -> bool
    Reads a log entry, if there's a new one.
    @@ -133,73 +123,17 @@

    Public static functions

    Constructors, destructors, conversion operators

    -
    - Logger() deleted +
    + Logger() deleted
    Deleted constructor.
    -
    -

    Enum documentation

    -
    -

    - enum class cubos::core::Logger::Level -

    -

    Represents a logging level.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Enumerators
    Trace -

    Trace log level, lowest log level. Very verbose.

    -
    Debug -

    Debug log level. Contains messages useful for debugging, but which are not necessary in release builds.

    -
    Info -

    Information log level. Contains important events that are not errors.

    -
    Warn -

    Warn log level. Contains events that are not errors, but which are unexpected and may be problematic.

    -
    Error -

    Error log level. Contains errors which are recoverable from.

    -
    Critical -

    Critical log level, highest log level. Contains errors which are unrecoverable from.

    -
    Off -

    Off log level, disables all logging.

    -
    -
    -

    Function documentation

    -
    +

    - static void cubos::core::Logger::level(Level level) + static void cubos::core::tel::Logger::level(Level level)

    Sets the log level.

    @@ -213,11 +147,11 @@

    -

    If CUBOS_LOG_LEVEL is higher than the set level, entries below it are still not registered.

    +

    If CUBOS_TEL_LEVEL is higher than the set level, entries below it are still not registered.

    -
    +

    - static Level cubos::core::Logger::level() + static Level cubos::core::tel::Logger::level()

    Gets the current log level.

    @@ -229,9 +163,9 @@

    -
    +

    - static bool cubos::core::Logger::logToFile(const std::string& filePath) + static bool cubos::core::tel::Logger::logToFile(const std::string& filePath)

    Sets a file path where logs will be saved.

    @@ -253,9 +187,9 @@

    -
    +

    - static bool cubos::core::Logger::logToFile() + static bool cubos::core::tel::Logger::logToFile()

    Mounts a standard archive on the /logs/ directory, and calls logToFile to a timestamped log file on that directory.

    @@ -268,10 +202,10 @@

    -
    +

    - static void cubos::core::Logger::write(Level level, - Location location, + static void cubos::core::tel::Logger::write(Level level, + Location location, std::string message)

    Creates a new entry in the logs, as long as the log level is high enough.

    @@ -295,17 +229,17 @@

    -
    +

    template<typename... TArgs>
    - static void cubos::core::Logger::writeFormat(Level level, - Location location, + static void cubos::core::tel::Logger::writeFormat(Level level, + Location location, const char* format, TArgs... args)

    -

    Wrapper for write() with message formatting.

    +

    Wrapper for write() with message formatting.

    @@ -339,10 +273,10 @@

    Template parameters
    -
    +

    - static bool cubos::core::Logger::read(std::size_t& cursor, - Entry& entry) + static bool cubos::core::tel::Logger::read(std::size_t& cursor, + Entry& entry)

    Reads a log entry, if there's a new one.

    @@ -356,7 +290,7 @@

    - + diff --git a/preview/pr-1282/classcubos_1_1core_1_1Metrics.html b/preview/pr-1282/classcubos_1_1core_1_1tel_1_1Metrics.html similarity index 79% rename from preview/pr-1282/classcubos_1_1core_1_1Metrics.html rename to preview/pr-1282/classcubos_1_1core_1_1tel_1_1Metrics.html index e805bb826..6cd6485fe 100644 --- a/preview/pr-1282/classcubos_1_1core_1_1Metrics.html +++ b/preview/pr-1282/classcubos_1_1core_1_1tel_1_1Metrics.html @@ -2,7 +2,7 @@ - cubos::core::Metrics class | Cubos Docs + cubos::core::tel::Metrics class | Cubos Docs @@ -46,8 +46,8 @@

    - cubos::core::Metrics class - + cubos::core::tel::Metrics class +

    Singleton class that manages a collection of metrics.

    entry outEntry to read into.Entry to read into.
    -
    +

    - static std::size_t cubos::core::Metrics::size() + static std::size_t cubos::core::tel::Metrics::size()

    Size of the metric pool.

    - +
    ReturnsMetrics count.Metrics count.
    -
    +

    - static std::size_t cubos::core::Metrics::sizeByName(const std::string& name) + static std::size_t cubos::core::tel::Metrics::sizeByName(const std::string& name)

    Size of metrics associated with a given name.

    @@ -164,14 +164,14 @@

    - +
    ReturnsMetrics count.Metrics count.
    -
    +

    - static void cubos::core::Metrics::setMaxEntries(std::size_t n) + static void cubos::core::tel::Metrics::setMaxEntries(std::size_t n)

    Sets maximum metric entries.

    @@ -186,9 +186,9 @@

    -
    +

    - static bool cubos::core::Metrics::readValue(const std::string& name, + static bool cubos::core::tel::Metrics::readValue(const std::string& name, double& value, size_t& offset)

    @@ -219,9 +219,9 @@

    -
    +

    - static bool cubos::core::Metrics::readName(std::string& name, + static bool cubos::core::tel::Metrics::readName(std::string& name, size_t& seenCount)

    Search for a new unique metric name.

    diff --git a/preview/pr-1282/classcubos_1_1core_1_1tel_1_1SpanGuard.html b/preview/pr-1282/classcubos_1_1core_1_1tel_1_1SpanGuard.html new file mode 100644 index 000000000..7a1d4e637 --- /dev/null +++ b/preview/pr-1282/classcubos_1_1core_1_1tel_1_1SpanGuard.html @@ -0,0 +1,103 @@ + + + + + cubos::core::tel::SpanGuard class | Cubos Docs + + + + + + + +
    +
    +
    +
    +
    +

    + cubos::core::tel::SpanGuard class + +

    +

    A guard object that automatically ends the current span when it goes out of scope.

    +
    +
    +
    +
    + + + +
    + + diff --git a/preview/pr-1282/classcubos_1_1core_1_1tel_1_1SpanManager.html b/preview/pr-1282/classcubos_1_1core_1_1tel_1_1SpanManager.html new file mode 100644 index 000000000..52637ba43 --- /dev/null +++ b/preview/pr-1282/classcubos_1_1core_1_1tel_1_1SpanManager.html @@ -0,0 +1,171 @@ + + + + + cubos::core::tel::SpanManager class | Cubos Docs + + + + + + + +
    +
    +
    +
    +
    +

    + cubos::core::tel::SpanManager class + +

    +

    Manages the creation and ending of spans.

    + +
    +

    Public static functions

    +
    +
    + static void begin(const std::string& name, + Level level) +
    +
    Begins a new span.
    +
    + static void end() +
    +
    Ends the current active span.
    +
    + static auto current() -> SpanId +
    +
    Gets the current active span.
    +
    +
    +
    +

    Function documentation

    +
    +

    + static void cubos::core::tel::SpanManager::begin(const std::string& name, + Level level) +

    +

    Begins a new span.

    + + + + + + + + + + + + + + +
    Parameters
    nameSpan name.
    levelSpan level.
    +
    +
    +

    + static SpanId cubos::core::tel::SpanManager::current() +

    +

    Gets the current active span.

    + + + + + + + +
    ReturnsIdentifier of the current span.
    +
    +
    +
    +
    +
    +
    + + + +
    + + diff --git a/preview/pr-1282/classcubos_1_1core_1_1thread_1_1Process.html b/preview/pr-1282/classcubos_1_1core_1_1thread_1_1Process.html new file mode 100644 index 000000000..b7d2d6767 --- /dev/null +++ b/preview/pr-1282/classcubos_1_1core_1_1thread_1_1Process.html @@ -0,0 +1,246 @@ + + + + + cubos::core::thread::Process class | Cubos Docs + + + + + + + +
    +
    +
    +
    +
    +

    + cubos::core::thread::Process class final + +

    +

    Provides a cross-platform way to spawn child processes.

    + +
    +

    Constructors, destructors, conversion operators

    +
    +
    + Process() defaulted +
    +
    Default constructor.
    +
    + Process(Process&& other) noexcept +
    +
    Move constructor.
    +
    +
    +
    +

    Public functions

    +
    +
    + auto operator=(Process&& other) -> Process& noexcept +
    +
    Move assignment operator.
    +
    + auto start(const std::string& command, + const std::vector<std::string>& args = {}, + const std::string& cwd = "") -> bool +
    +
    Starts a new process.
    +
    + void kill() +
    +
    Kills the process.
    +
    + auto wait() -> bool +
    +
    Waits for the process to finish.
    +
    + auto wait(int& status) -> bool +
    +
    Waits for the process to finish.
    +
    + auto started() const -> bool +
    +
    Checks whether the process has been started.
    +
    +
    +
    +

    Function documentation

    +
    +

    + bool cubos::core::thread::Process::start(const std::string& command, + const std::vector<std::string>& args = {}, + const std::string& cwd = "") +

    +

    Starts a new process.

    + + + + + + + + + + + + + + + + + + + + + + + + +
    Parameters
    commandCommand to execute.
    argsArguments to pass to the command.
    cwdWorking directory for the new process.
    ReturnsWhether the process was started successfully.
    +
    +
    +

    + bool cubos::core::thread::Process::wait() +

    +

    Waits for the process to finish.

    + + + + + + + +
    ReturnsWhether the process exited normally.
    +
    +
    +

    + bool cubos::core::thread::Process::wait(int& status) +

    +

    Waits for the process to finish.

    + + + + + + + + + + + + + + + + +
    Parameters
    statusExit code of the process, if it exited normally.
    ReturnsWhether the process exited normally.
    +
    +
    +

    + bool cubos::core::thread::Process::started() const +

    +

    Checks whether the process has been started.

    + + + + + + + +
    ReturnsWhether the process has been started.
    +
    +
    +
    +
    +
    +
    + + + +
    + + diff --git a/preview/pr-1282/classcubos_1_1core_1_1thread_1_1Task.html b/preview/pr-1282/classcubos_1_1core_1_1thread_1_1Task.html index 112bf4102..3c70d93e1 100644 --- a/preview/pr-1282/classcubos_1_1core_1_1thread_1_1Task.html +++ b/preview/pr-1282/classcubos_1_1core_1_1thread_1_1Task.html @@ -81,6 +81,10 @@

    Constructors, destructors, conversion operators< Task()
    Constructs.
    +
    + Task(T value) +
    +
    Constructs a finished task.
    Task(const Task& other)
    @@ -122,6 +126,32 @@

    Public functions

    Function documentation

    +
    +

    +
    + template<typename T> +
    + cubos::core::thread::Task<T>::Task(T value) +

    +

    Constructs a finished task.

    + + + + + + + + + + + + + + + + +
    Parameters
    valueTask result.
    ReturnsTask.
    +

    diff --git a/preview/pr-1282/classcubos_1_1engine_1_1AnyAsset.html b/preview/pr-1282/classcubos_1_1engine_1_1AnyAsset.html index 03e85e9be..a6476331a 100644 --- a/preview/pr-1282/classcubos_1_1engine_1_1AnyAsset.html +++ b/preview/pr-1282/classcubos_1_1engine_1_1AnyAsset.html @@ -57,6 +57,7 @@

    Contents

    Reference

    +
    +

    Public types

    +
    +
    + enum class IdType { UUID, + Path, + Invalid } +
    +
    Type of the asset identifier.
    +
    +

    Constructors, destructors, conversion operators

    @@ -141,9 +153,17 @@

    Public functions

    Gets the version of the asset last seen by this handle.
    - auto getId() const -> uuids::uuid + auto getIdType() const -> IdType +
    +
    Gets the type of the asset identifier.
    +
    + auto getIdString() const -> std::string +
    +
    Gets the Path or UUID of the asset.
    +
    + auto getId() const -> std::optional<uuids::uuid>
    -
    Gets the UUID of the asset.
    +
    Gets the UUID of the asset if it has one.
    auto isNull() const -> bool
    @@ -161,10 +181,10 @@

    Public functions

    Public variables

    -
    - uuids::uuid reflectedId +
    + std::string pathOrId
    -
    Avoid using this field, use getId() instead.
    +
    Avoid using this field, use getId() instead.
    @@ -343,11 +363,39 @@

    -
    +
    +

    + IdType cubos::engine::AnyAsset::getIdType() const +

    +

    Gets the type of the asset identifier.

    + + + + + + + +
    ReturnsAsset identifier type.
    +
    +
    +

    + std::string cubos::engine::AnyAsset::getIdString() const +

    +

    Gets the Path or UUID of the asset.

    + + + + + + + +
    ReturnsAsset Path or UUID.
    +
    +

    - uuids::uuid cubos::engine::AnyAsset::getId() const + std::optional<uuids::uuid> cubos::engine::AnyAsset::getId() const

    -

    Gets the UUID of the asset.

    +

    Gets the UUID of the asset if it has one.

    @@ -356,6 +404,7 @@

    +

    There are two possible reasons for an asset handle to have no UUID:

    • it being an invalid or null handle;
    • it being created from an asset path.

    To ensure an asset handle gets a UUID, you can use Assets::load.

    diff --git a/preview/pr-1282/classcubos_1_1engine_1_1AssetMeta.html b/preview/pr-1282/classcubos_1_1engine_1_1AssetMeta.html index 04850c299..820d79703 100644 --- a/preview/pr-1282/classcubos_1_1engine_1_1AssetMeta.html +++ b/preview/pr-1282/classcubos_1_1engine_1_1AssetMeta.html @@ -79,6 +79,14 @@

    Public functions

    auto get(std::string_view key) const -> std::optional<std::string>
    Gets the value of a parameter on the asset's metadata.
    +
    + auto getId() const -> uuids::uuid +
    +
    Gets the ID of the asset.
    +
    + auto getPath() const -> std::optional<std::string> +
    +
    Gets the path of the asset.
    void set(std::string_view key, std::string_view value) @@ -123,6 +131,34 @@

    +
    +

    + uuids::uuid cubos::engine::AssetMeta::getId() const +

    +

    Gets the ID of the asset.

    + + + + + + + +
    ReturnsID of the asset.
    +
    +
    +

    + std::optional<std::string> cubos::engine::AssetMeta::getPath() const +

    +

    Gets the path of the asset.

    + + + + + + + +
    ReturnsPath of the asset.
    +

    void cubos::engine::AssetMeta::set(std::string_view key, diff --git a/preview/pr-1282/classcubos_1_1engine_1_1Assets.html b/preview/pr-1282/classcubos_1_1engine_1_1Assets.html index df45c01db..fd3a8bf8a 100644 --- a/preview/pr-1282/classcubos_1_1engine_1_1Assets.html +++ b/preview/pr-1282/classcubos_1_1engine_1_1Assets.html @@ -110,6 +110,10 @@

    Public functions

    void loadMeta(std::string_view path)
    Loads all metadata from the virtual filesystem, in the given path. If the path points to a directory, it will be recursively searched for metadata files.
    +
    + void unloadMeta(std::string_view path) +
    +
    Unloads all asset metadata from assets within the given path.
    auto load(AnyAsset handle) const -> AnyAsset
    @@ -313,6 +317,24 @@

    +
    +

    + void cubos::engine::Assets::unloadMeta(std::string_view path) +

    +

    Unloads all asset metadata from assets within the given path.

    + + + + + + + + + + +
    Parameters
    pathPath to unload metadata from.
    +

    If an asset from the given path is currently loaded, it will not be unloaded, but it will be dissociated from its original metadata path.

    +

    AnyAsset cubos::engine::Assets::load(AnyAsset handle) const diff --git a/preview/pr-1282/classtesseratos_1_1ProjectManager.html b/preview/pr-1282/classtesseratos_1_1ProjectManager.html new file mode 100644 index 000000000..fc7a33020 --- /dev/null +++ b/preview/pr-1282/classtesseratos_1_1ProjectManager.html @@ -0,0 +1,240 @@ + + + + + tesseratos::ProjectManager class | Cubos Docs + + + + + + + +
    +
    +
    +
    +
    +

    + tesseratos::ProjectManager class + +

    +

    System argument which can be used to manage the currently loaded project.

    + +
    +

    Constructors, destructors, conversion operators

    +
    +
    + ProjectManager(State& state, + cubos::engine::Assets& assets, + Debugger& debugger) +
    +
    Constructs.
    +
    +
    +
    +

    Public functions

    +
    +
    + auto open(std::string projectOSPath, + std::string binaryOSPath) -> bool +
    +
    Opens a project directory.
    +
    + auto open() const -> bool +
    +
    Checks whether a project is currently open.
    +
    + void close() +
    +
    Closes the currently open project.
    +
    + auto launch() -> bool +
    +
    Launches the project's binary and attaches the debugger.
    +
    + void terminate() +
    +
    Stops the project's binary.
    +
    +
    +
    +

    Function documentation

    +
    +

    + tesseratos::ProjectManager::ProjectManager(State& state, + cubos::engine::Assets& assets, + Debugger& debugger) +

    +

    Constructs.

    + + + + + + + + + + + + + + + + + + +
    Parameters
    stateState of the project manager.
    assetsAsset manager.
    debuggerDebugger.
    +
    +
    +

    + bool tesseratos::ProjectManager::open(std::string projectOSPath, + std::string binaryOSPath) +

    +

    Opens a project directory.

    + + + + + + + + + + + + + + + + + + + + +
    Parameters
    projectOSPathProject's directory path in the operating system.
    binaryOSPathProject's binary directory path in the operating system.
    ReturnsWhether the project could be opened successfully.
    +

    The given project directory is mounted in the /project directory in the virtual file system. Unmounts any previously opened project directory.

    +
    +
    +

    + bool tesseratos::ProjectManager::open() const +

    +

    Checks whether a project is currently open.

    + + + + + + + +
    ReturnsWhether a project is currently open.
    +
    +
    +

    + bool tesseratos::ProjectManager::launch() +

    +

    Launches the project's binary and attaches the debugger.

    + + + + + + + +
    ReturnsWhether the project could be launched successfully.
    +

    If the binary is already running, it is stopped first.

    +
    +
    +
    +
    +
    +
    + + + +
    + + diff --git a/preview/pr-1282/dir_66ee469e7479b8bd292626243a0daea9.html b/preview/pr-1282/dir_66ee469e7479b8bd292626243a0daea9.html index d8d91f2f0..b549a592d 100644 --- a/preview/pr-1282/dir_66ee469e7479b8bd292626243a0daea9.html +++ b/preview/pr-1282/dir_66ee469e7479b8bd292626243a0daea9.html @@ -69,6 +69,8 @@

    Directories

    Debugger plugin directory.
    directory importer/
    Asset explorer plugin directory.
    +
    directory project/
    +
    Project plugin directory.
    directory scene_editor/
    Scene editor plugin directory.
    directory voxel_palette_editor/
    diff --git a/preview/pr-1282/dir_6c897dd97bedf3914ee8a4d9f7f6549c.html b/preview/pr-1282/dir_6c897dd97bedf3914ee8a4d9f7f6549c.html index 4d122e626..ba7c91127 100644 --- a/preview/pr-1282/dir_6c897dd97bedf3914ee8a4d9f7f6549c.html +++ b/preview/pr-1282/dir_6c897dd97bedf3914ee8a4d9f7f6549c.html @@ -89,10 +89,6 @@

    Files

    file api.hpp
    Macro CUBOS_CORE_API.
    -
    file log.hpp
    -
    Logging and assertion macros.
    -
    file metrics.hpp
    -
    Metrics and profiling utilities and macros.
    diff --git a/preview/pr-1282/dir_98bd0872c878d6fa2d8a66c2174847b1.html b/preview/pr-1282/dir_98bd0872c878d6fa2d8a66c2174847b1.html new file mode 100644 index 000000000..a8e11130a --- /dev/null +++ b/preview/pr-1282/dir_98bd0872c878d6fa2d8a66c2174847b1.html @@ -0,0 +1,122 @@ + + + + + tesseratos/project/ directory | Cubos Docs + + + + + + + +
    +
    + + + +
    + + diff --git a/preview/pr-1282/dir_b3628534f645523dfa2d021cded97bf6.html b/preview/pr-1282/dir_b3628534f645523dfa2d021cded97bf6.html index 86fc6d72e..dd7429ef2 100644 --- a/preview/pr-1282/dir_b3628534f645523dfa2d021cded97bf6.html +++ b/preview/pr-1282/dir_b3628534f645523dfa2d021cded97bf6.html @@ -65,6 +65,8 @@

    Files

    file pool.hpp
    Class cubos::core::thread::ThreadPool.
    +
    file process.hpp
    +
    Class cubos::core::thread::Process.
    file task.hpp
    Class cubos::core::thread::Task.
    diff --git a/preview/pr-1282/dir_f6f65ff657bd34b22e5078310628f4e7.html b/preview/pr-1282/dir_f6f65ff657bd34b22e5078310628f4e7.html index 26de9063d..df917884b 100644 --- a/preview/pr-1282/dir_f6f65ff657bd34b22e5078310628f4e7.html +++ b/preview/pr-1282/dir_f6f65ff657bd34b22e5078310628f4e7.html @@ -63,8 +63,8 @@

    Contents

    Files

    -
    file audio_device.hpp
    -
    Class cubos::core::al::AudioDevice and related types.
    +
    file audio_context.hpp
    +
    Class cubos::core::al::AudioContext and related types.
    diff --git a/preview/pr-1282/examples-core-metrics.html b/preview/pr-1282/examples-core-metrics.html deleted file mode 100644 index 8d5e9908c..000000000 --- a/preview/pr-1282/examples-core-metrics.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - Examples » Core » Metrics | Cubos Docs - - - - - - - -
    -
    -
    -
    -
    -

    - Examples » - Core » - Metrics -

    -

    Using the metrics system.

    -

    Registering metrics and profiling in Cubos can be done through the metric macros defined in core/metrics.hpp and the core::Metrics class. In order to enable these features, compile with -DENABLE_PROFILING.

    #include <cubos/core/metrics.hpp>
    -
    -using cubos::core::Metrics;

    The following example demonstrates a simple usage of the core::Metrics class, simulating a random function that takes X milliseconds to finish, where X is randomly generated, and also registering metrics values.

    This is the main loop:

        const int numFrames = 10;
    -    for (int i = 0; i < numFrames; ++i)
    -    {
    -        // simulate frame by calling a function that does work..
    -        simulateFrame(randomMs(0, 500));
    -
    -        // register some metrics, this could be FPS, entities count, ....
    -        CUBOS_METRIC("i", i);
    -    }

    Which calls these utility functions:

    static void simulateFrame(int ms)
    -{
    -    CUBOS_PROFILE();
    -    std::this_thread::sleep_for(std::chrono::milliseconds(ms));
    -}
    static int randomMs(int min, int max)
    -{
    -    int range = (min - max) + 1;
    -    return rand() % range + min;
    -}

    We can now get the existing metrics and their values:

        std::string name;
    -    std::size_t seenCount = 0;
    -    while (Metrics::readName(name, seenCount))
    -    {
    -        CUBOS_DEBUG("Found new metric: {}", name);
    -        double value;
    -        std::size_t offset = 0;
    -        while (Metrics::readValue(name, value, offset))
    -        {
    -            CUBOS_DEBUG("{} : {}", name, value);
    -        }
    -    }

    Output:

    [11:34:13.824] [main.cpp:51 main] debug: Found new metric: "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27"
    -[11:34:13.824] [main.cpp:56 main] debug: "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 103.0721
    -[11:34:13.824] [main.cpp:56 main] debug: "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 469.1480
    -[11:34:13.825] [main.cpp:56 main] debug: "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 379.0656
    -[11:34:13.825] [main.cpp:56 main] debug: "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 388.1754
    -[11:34:13.825] [main.cpp:56 main] debug: "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 37.1140
    -[11:34:13.825] [main.cpp:56 main] debug: "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 14.0966
    -[11:34:13.825] [main.cpp:56 main] debug: "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 8.1281
    -[11:34:13.825] [main.cpp:56 main] debug: "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 464.1636
    -[11:34:13.826] [main.cpp:56 main] debug: "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 313.1553
    -[11:34:13.826] [main.cpp:56 main] debug: "profiling:/home/cubos/core/samples/metrics/main.cpp:simulateFrame:27" : 57.0801
    -[11:34:13.826] [main.cpp:51 main] debug: Found new metric: "i"
    -[11:34:13.826] [main.cpp:56 main] debug: "i" : 0.0000
    -[11:34:13.827] [main.cpp:56 main] debug: "i" : 1.0000
    -[11:34:13.827] [main.cpp:56 main] debug: "i" : 2.0000
    -[11:34:13.827] [main.cpp:56 main] debug: "i" : 3.0000
    -[11:34:13.827] [main.cpp:56 main] debug: "i" : 4.0000
    -[11:34:13.827] [main.cpp:56 main] debug: "i" : 5.0000
    -[11:34:13.828] [main.cpp:56 main] debug: "i" : 6.0000
    -[11:34:13.828] [main.cpp:56 main] debug: "i" : 7.0000
    -[11:34:13.828] [main.cpp:56 main] debug: "i" : 8.0000
    -[11:34:13.828] [main.cpp:56 main] debug: "i" : 9.0000
    -
    -
    -
    -
    - - - -
    - - diff --git a/preview/pr-1282/examples-core-logging.html b/preview/pr-1282/examples-core-tel-logging.html similarity index 84% rename from preview/pr-1282/examples-core-logging.html rename to preview/pr-1282/examples-core-tel-logging.html index d0625a865..d3e8b954f 100644 --- a/preview/pr-1282/examples-core-logging.html +++ b/preview/pr-1282/examples-core-tel-logging.html @@ -2,7 +2,7 @@ - Examples » Core » Logging | Cubos Docs + Examples » Core » Telemetry » Logging | Cubos Docs @@ -48,15 +48,16 @@

    Examples » Core » + Telemetry » Logging

    Using the logging system.

    -

    Logging in Cubos is done through the logging macros defined in core/log.hpp.

    #include <cubos/core/log.hpp>

    There are six logging levels, each with its own macro. In order of increasing severity, they are:

        CUBOS_TRACE("Trace message");
    +

    Logging in Cubos is done through the logging macros defined in core/tel/logging.hpp.

    #include <cubos/core/tel/logging.hpp>

    There are six logging levels, each with its own macro. In order of increasing severity, they are:

        CUBOS_TRACE("Trace message");
         CUBOS_DEBUG("Debug message");
         CUBOS_INFO("Info message");
         CUBOS_WARN("Warning message");
         CUBOS_ERROR("Error message");
    -    CUBOS_CRITICAL("Critical message");

    The minimum registered log level is set with Logger::level. On this sample, to demonstrate CUBOS_TRACE, we set it to Trace:

        cubos::core::Logger::level(cubos::core::Logger::Level::Trace);

    The logger also supports logging to a file, which will by default be named to cubos_<timestamp>.log.

        cubos::core::Logger::logToFile();

    Or, if you want, you can set the file manually:

        cubos::core::Logger::logToFile("/logs/sample_logs.txt");
    $ cat /home/cubos/build/logs/cubos_15:25:30.191.log
    +    CUBOS_CRITICAL("Critical message");

    The minimum registered log level is set with level. On this sample, to demonstrate CUBOS_TRACE, we set it to Trace:

        cubos::core::tel::level(cubos::core::tel::Level::Trace);

    The logger also supports logging to a file, which will by default be named to cubos_<timestamp>.log.

        cubos::core::tel::Logger::logToFile();

    Or, if you want, you can set the file manually:

        cubos::core::tel::Logger::logToFile("/logs/sample_logs.txt");
    $ cat /home/cubos/build/logs/cubos_15:25:30.191.log
     [15:25:30.192] [file.cpp:124 mount] info: Mounted archive at ""/"logs"
     [15:25:30.192] [file.cpp:322 create] trace: Created "file" "/logs/cubos_15:25:30.191"
     [15:25:30.192] [main.cpp:29 main] trace: Trace message
    @@ -83,7 +84,7 @@ 

    [15:23:03.738] [main.cpp:40 main] info: An std::unordered_map: {2: "two", 1: "one"} [15:23:03.738] [log.cpp:248 streamFormat] warn: You tried to print a type ("unnamed108664291041692") which doesn't implement reflection. Did you forget to include its reflection definition? [15:23:03.738] [main.cpp:41 main] info: A type without reflection: (no reflection) -t reflection: (no reflection)

    These macros can also take arguments, which can be of any reflectable type.

        CUBOS_INFO("An integer: {}", 1);
    +t reflection: (no reflection)

    These macros can also take arguments, which can be of any reflectable type.

        CUBOS_INFO("An integer: {}", 1);
         CUBOS_INFO("A glm::vec3: {}", glm::vec3(0.0F, 1.0F, 2.0F));
         CUBOS_INFO("An std::unordered_map: {}", std::unordered_map<int, const char*>{{1, "one"}, {2, "two"}});
     }

    To print external types, such as glm math types, STL types (std::string, ...) or primitives (int, ...), you'll have to include their respective headers in the core/reflection/external directory. Notice that although we aren't printing C-strings directly, we must still include them as our std::unordered_map contains const char*s.

    #include <cubos/core/reflection/external/cstring.hpp>
    diff --git a/preview/pr-1282/examples-core-tel-metrics.html b/preview/pr-1282/examples-core-tel-metrics.html
    new file mode 100644
    index 000000000..5f5d55d9f
    --- /dev/null
    +++ b/preview/pr-1282/examples-core-tel-metrics.html
    @@ -0,0 +1,167 @@
    +
    +
    +
    +  
    +  Examples » Core » Telemetry » Metrics | Cubos Docs
    +  
    +  
    +  
    +  
    +  
    +
    +
    +
    +
    +
    +
    +
    +

    + Examples » + Core » + Telemetry » + Metrics +

    +

    Using the metrics system.

    +

    Registering metrics and profiling in Cubos can be done through the metric macros defined in core/tel/metrics.hpp and the core::tel::Metrics class. In order to enable these features, compile with -DENABLE_PROFILING.

    #include <cubos/core/tel/metrics.hpp>
    +
    +using cubos::core::tel::Metrics;

    The following example demonstrates a simple usage of the core::tel::Metrics class, simulating a random function that takes X milliseconds to finish, where X is randomly generated, and also registering metrics values.

    This is the main loop:

        const int numFrames = 10;
    +    for (int i = 0; i < numFrames; ++i)
    +    {
    +        // simulate frame by calling a function that does work..
    +        simulateFrame(randomMs(0, 500));
    +
    +        // register some metrics, this could be FPS, entities count, ....
    +        CUBOS_METRIC("i", i);
    +    }

    Which calls these utility functions:

    static void simulateFrame(int ms)
    +{
    +    CUBOS_SPAN_INFO("simulateFrame");
    +    std::this_thread::sleep_for(std::chrono::milliseconds(ms));
    +}
    static int randomMs(int min, int max)
    +{
    +    int range = (min - max) + 1;
    +    return rand() % range + min;
    +}

    We can now get the existing metrics and their values:

        std::string name;
    +    std::size_t seenCount = 0;
    +    while (Metrics::readName(name, seenCount))
    +    {
    +        CUBOS_DEBUG("Found new metric: {}", name);
    +        double value;
    +        std::size_t offset = 0;
    +        while (Metrics::readValue(name, value, offset))
    +        {
    +            CUBOS_DEBUG("{} : {}", name, value);
    +        }
    +    }

    Output:

    [17:21:59.677] [main.cpp:53 main] [thread21496] debug: Found new metric: "thread21496:simulateFrame:begin"
    +[17:21:59.679] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:begin" : 5.0244E+8
    +[17:21:59.680] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:begin" : 5.0244E+8
    +[17:21:59.681] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:begin" : 5.0244E+8
    +[17:21:59.681] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:begin" : 5.0244E+8
    +[17:21:59.682] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:begin" : 5.0244E+8
    +[17:21:59.683] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:begin" : 5.0244E+8
    +[17:21:59.684] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:begin" : 5.0244E+8
    +[17:21:59.685] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:begin" : 5.0244E+8
    +[17:21:59.686] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:begin" : 5.0244E+8
    +[17:21:59.687] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:begin" : 5.0244E+8
    +[17:21:59.687] [main.cpp:53 main] [thread21496] debug: Found new metric: "thread21496:simulateFrame:end"
    +[17:21:59.688] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:end" : 5.0244E+8
    +[17:21:59.689] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:end" : 5.0244E+8
    +[17:21:59.690] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:end" : 5.0244E+8
    +[17:21:59.691] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:end" : 5.0244E+8
    +[17:21:59.693] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:end" : 5.0244E+8
    +[17:21:59.694] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:end" : 5.0244E+8
    +[17:21:59.695] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:end" : 5.0244E+8
    +[17:21:59.696] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:end" : 5.0244E+8
    +[17:21:59.697] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:end" : 5.0244E+8
    +[17:21:59.698] [main.cpp:58 main] [thread21496] debug: "thread21496:simulateFrame:end" : 5.0244E+8
    +[17:21:59.699] [main.cpp:53 main] [thread21496] debug: Found new metric: "thread21496:i"
    +[17:21:59.700] [main.cpp:58 main] [thread21496] debug: "thread21496:i" : 0.0000
    +[17:21:59.701] [main.cpp:58 main] [thread21496] debug: "thread21496:i" : 1.0000
    +[17:21:59.701] [main.cpp:58 main] [thread21496] debug: "thread21496:i" : 2.0000
    +[17:21:59.702] [main.cpp:58 main] [thread21496] debug: "thread21496:i" : 3.0000
    +[17:21:59.703] [main.cpp:58 main] [thread21496] debug: "thread21496:i" : 4.0000
    +[17:21:59.704] [main.cpp:58 main] [thread21496] debug: "thread21496:i" : 5.0000
    +[17:21:59.705] [main.cpp:58 main] [thread21496] debug: "thread21496:i" : 6.0000
    +[17:21:59.706] [main.cpp:58 main] [thread21496] debug: "thread21496:i" : 7.0000
    +[17:21:59.707] [main.cpp:58 main] [thread21496] debug: "thread21496:i" : 8.0000
    +[17:21:59.708] [main.cpp:58 main] [thread21496] debug: "thread21496:i" : 9.0000
    +
    +
    +
    +
    + + + +
    + + diff --git a/preview/pr-1282/examples-core-tel-tracing.html b/preview/pr-1282/examples-core-tel-tracing.html new file mode 100644 index 000000000..98858a9f9 --- /dev/null +++ b/preview/pr-1282/examples-core-tel-tracing.html @@ -0,0 +1,120 @@ + + + + + Examples » Core » Telemetry » Tracing | Cubos Docs + + + + + + + +
    +
    +
    +
    +
    +

    + Examples » + Core » + Telemetry » + Tracing +

    +

    Using the tracing system.

    +

    Tracing in CUBOS can be done through the tracing macros defined in core/tel/tracing.hpp and the core::tel::SpanManager class.

    #include <cubos/core/tel/level.hpp>
    +#include <cubos/core/tel/logging.hpp>
    +#include <cubos/core/tel/tracing.hpp>
    +
    +using cubos::core::tel::Level;
    +using cubos::core::tel::Logger;
    +using cubos::core::tel::SpanManager;

    The following example demonstrates a simple usage of the tracing macros and core::tel::SpanManager class, utilizing spans to track execution flow and log messages.

        cubos::core::tel::level(Level::Debug);

    The tracing level is shared with logger's one, via core::tel::level function.

    Using the macros is simple as:

    You can also do manual span management:

        SpanManager::begin("manual_span", cubos::core::tel::Level::Debug);
    +    CUBOS_INFO("entered a manual span");
    +
    +    SpanManager::end();
    +    CUBOS_INFO("after exit manual span");

    We can observe the output of the tracing as follows:

    [16:03:31.966] [main.cpp:20 main] [thread11740] info: hello from root span!
    +[16:03:31.967] [main.cpp:26 main] [thread11740:main_span] info: hello!
    +[16:03:31.967] [main.cpp:29 main] [thread11740:main_span:other_scope] info: hello again!
    +[16:03:31.968] [main.cpp:34 main] [thread11740:main_span:other_scope:manual_span] info: entered a manual span
    +[16:03:31.969] [main.cpp:37 main] [thread11740:main_span:other_scope] info: after exit manual span
    +
    +
    +
    +
    + + + +
    + + diff --git a/preview/pr-1282/examples-core-tel.html b/preview/pr-1282/examples-core-tel.html new file mode 100644 index 000000000..1468d282a --- /dev/null +++ b/preview/pr-1282/examples-core-tel.html @@ -0,0 +1,105 @@ + + + + + Examples » Core » Telemetry | Cubos Docs + + + + + + + +
    +
    + + + +
    + + diff --git a/preview/pr-1282/examples-core.html b/preview/pr-1282/examples-core.html index ed303a26d..2c3cd9e7b 100644 --- a/preview/pr-1282/examples-core.html +++ b/preview/pr-1282/examples-core.html @@ -50,7 +50,7 @@

    Core

    Showcases features of the Core library.

    -

    The following examples have fully documented tutorials:

    +

    The following examples have fully documented tutorials:

    diff --git a/preview/pr-1282/examples-engine-hello-cubos.html b/preview/pr-1282/examples-engine-hello-cubos.html index caf87bb3d..27daaf228 100644 --- a/preview/pr-1282/examples-engine-hello-cubos.html +++ b/preview/pr-1282/examples-engine-hello-cubos.html @@ -55,7 +55,7 @@

    using namespace cubos::engine;

    First we'll need to get a Cubos object.

    int main(int argc, char** argv)
     {
    -    Cubos cubos{argc, argv};

    The Cubos class represents the engine. We'll need it to add functionality to our program.

    Let's start by defining what functionality we want to add, by adding our first system.

        cubos.startupSystem("say Hello Cubos").call([]() { CUBOS_INFO("Hello Cubos"); });

    This startup system simply prints Hello Cubos to the console, using one of Cubos's logging macros. You can find more about them here. Startup systems run only once when the engine is loaded.

    Now let's make things more interesting. Let's print Hello World, but split it over two different systems.

        cubos.system("say Hello").tagged(helloTag).call([]() { CUBOS_INFO("Hello"); });
    +    Cubos cubos{argc, argv};

    The Cubos class represents the engine. We'll need it to add functionality to our program.

    Let's start by defining what functionality we want to add, by adding our first system.

        cubos.startupSystem("say Hello Cubos").call([]() { CUBOS_INFO("Hello Cubos"); });

    This startup system simply prints Hello Cubos to the console, using one of Cubos's logging macros. You can find more about them here. Startup systems run only once when the engine is loaded.

    Now let's make things more interesting. Let's print Hello World, but split it over two different systems.

        cubos.system("say Hello").tagged(helloTag).call([]() { CUBOS_INFO("Hello"); });
         cubos.system("say World").tagged(worldTag).call([]() { CUBOS_INFO("World"); });

    Instead of using startupSystem, we'll use Cubos::system. This means the systems will be called after the startup systems and repeat every cycle, instead of just once at startup.

    Notice that we can't just do as we did for Hello Cubos and call it a day. We want Hello to come before World, so we'll have to explicitly tell that to the engine, or else we risk having them in the wrong order. To do that we use tags.

        cubos.tag(helloTag);
         cubos.tag(worldTag).after(helloTag);

    Cubos::tag can be used to apply properties to all systems with a given tag, and after makes any systems tagged with it come after systems tagged with the one given as parameter. There's also an before that has the inverse effect.

    Now let's see a bit about entities, components and resources. First we are going to need to use a few more things. We'll go over what each does as it comes up.

    Lets define a new component type, which stores a single integer, which we can use to identify the entity.

    #include <cubos/core/ecs/reflection.hpp>
     #include <cubos/core/reflection/external/primitives.hpp>
    diff --git a/preview/pr-1282/files.html b/preview/pr-1282/files.html
    index 975a7e04d..6afa0024f 100644
    --- a/preview/pr-1282/files.html
    +++ b/preview/pr-1282/files.html
    @@ -53,7 +53,7 @@ 

    Files

  • file api.hpp Macro CUBOS_CORE_API.
  • -
  • file log.hpp Logging and assertion macros.
  • -
  • file metrics.hpp Metrics and profiling utilities and macros.
  • @@ -730,6 +729,13 @@

    Files

  • file plugin.hpp Plugin entry point.
  • +

    diff --git a/preview/pr-1282/group__core-tel.html b/preview/pr-1282/group__core-tel.html new file mode 100644 index 000000000..4b1ee51e9 --- /dev/null +++ b/preview/pr-1282/group__core-tel.html @@ -0,0 +1,456 @@ + + + + + Core-tel module | Cubos Docs + + + + + + + +
    +
    +
    +
    +
    +

    + Core-tel module

    + +
    +

    Files

    +
    +
    file level.hpp
    +
    Telemetry levels.
    +
    file logging.hpp
    +
    Logging and assertion macros.
    +
    file metrics.hpp
    +
    Metrics and profiling utilities and macros.
    +
    file tracing.hpp
    +
    Tracing macros.
    +
    +
    +
    +

    Classes

    +
    +
    + class cubos::core::tel::Logger +
    +
    Singleton which holds the logging state.
    +
    +
    +
    +

    Enums

    +
    +
    + enum class Level { Trace = CUBOS_TEL_LEVEL_TRACE, + Debug = CUBOS_TEL_LEVEL_DEBUG, + Info = CUBOS_TEL_LEVEL_INFO, + Warn = CUBOS_TEL_LEVEL_WARN, + Error = CUBOS_TEL_LEVEL_ERROR, + Critical = CUBOS_TEL_LEVEL_CRITICAL, + Off = CUBOS_TEL_LEVEL_OFF } +
    +
    Represents a telemetry level.
    +
    +
    +
    +

    Functions

    +
    +
    + void level(Level level) +
    +
    Set telemetry level.
    +
    + auto level() -> Level -> auto +
    +
    Get telemetry level.
    +
    +
    +
    +

    Defines

    +
    +
    + #define CUBOS_TEL_LEVEL_TRACE +
    +
    Trace telemetry level, lowest telemetry level. Very verbose.
    +
    + #define CUBOS_TEL_LEVEL_DEBUG +
    +
    Debug telemetry level. Contains logs and tracing useful for debugging, but which are not necessary in release builds.
    +
    + #define CUBOS_TEL_LEVEL_INFO +
    +
    Information telemetry level. Contains important events that are not errors.
    +
    + #define CUBOS_TEL_LEVEL_WARN +
    +
    Warn telemetry level. Contains events that are not errors, but which are unexpected and may be problematic.
    +
    + #define CUBOS_TEL_LEVEL_ERROR +
    +
    Error telemetry level. Contains errors which are recoverable from.
    +
    + #define CUBOS_TEL_LEVEL_CRITICAL +
    +
    Critical telemetry level, highest log level. Contains errors which are unrecoverable from.
    +
    + #define CUBOS_TEL_LEVEL_OFF +
    +
    Off telemetry level, disables all logging/tracing.
    +
    + #define CUBOS_TEL_LEVEL +
    +
    Telemetry level to compile in.
    +
    + #define CUBOS_SPAN(name, + level) +
    +
    Constructs a new span with a specified level.
    +
    + #define CUBOS_SPAN_INFO(name) +
    +
    Constructs a new info span.
    +
    + #define CUBOS_SPAN_DEBUG(name) +
    +
    Constructs a new debug span.
    +
    + #define CUBOS_SPAN_TRACE(name) +
    +
    Constructs a new trace span.
    +
    +
    +
    +

    Enum documentation

    +
    +

    + enum class Level + +

    +

    Represents a telemetry level.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Enumerators
    Trace +

    Trace telemetry level, lowest telemetry level. Very verbose.

    +
    Debug +

    Debug telemetry level. Contains logs and tracing useful for debugging, but which are not necessary in release builds.

    +
    Info +

    Information telemetry level. Contains important events that are not errors.

    +
    Warn +

    Warn telemetry level. Contains events that are not errors, but which are unexpected and may be problematic.

    +
    Error +

    Error telemetry level. Contains errors which are recoverable from.

    +
    Critical +

    Critical telemetry level, highest log level. Contains errors which are unrecoverable from.

    +
    Off +

    Off telemetry level, disables all logging/tracing.

    +
    +
    +
    +
    +

    Function documentation

    +
    +

    + void level(Level level) + +

    +

    Set telemetry level.

    + + + + + + + + + + +
    Parameters
    levellevel
    +
    +
    +

    + auto level() -> Level + +

    +

    Get telemetry level.

    + + + + + + + +
    Returnslevel
    +
    +
    +
    +

    Define documentation

    +
    +

    + #define CUBOS_TEL_LEVEL_TRACE + +

    +

    Trace telemetry level, lowest telemetry level. Very verbose.

    + +
    +
    +

    + #define CUBOS_TEL_LEVEL_DEBUG + +

    +

    Debug telemetry level. Contains logs and tracing useful for debugging, but which are not necessary in release builds.

    + +
    +
    +

    + #define CUBOS_TEL_LEVEL_INFO + +

    +

    Information telemetry level. Contains important events that are not errors.

    + +
    +
    +

    + #define CUBOS_TEL_LEVEL_WARN + +

    +

    Warn telemetry level. Contains events that are not errors, but which are unexpected and may be problematic.

    + +
    +
    +

    + #define CUBOS_TEL_LEVEL_ERROR + +

    +

    Error telemetry level. Contains errors which are recoverable from.

    + +
    +
    +

    + #define CUBOS_TEL_LEVEL_CRITICAL + +

    +

    Critical telemetry level, highest log level. Contains errors which are unrecoverable from.

    + +
    +
    +

    + #define CUBOS_TEL_LEVEL_OFF + +

    +

    Off telemetry level, disables all logging/tracing.

    + +
    +
    +

    + #define CUBOS_TEL_LEVEL + +

    +

    Telemetry level to compile in.

    +

    This macro essentially controls the minimum Telemetry level that will be compiled into the binary.

    Should be set to one of the following:

    By default, on debug builds, this is set to CUBOS_TEL_LEVEL_TRACE. On release builds, this is set to CUBOS_TEL_LEVEL_INFO.

    +
    +
    +

    + #define CUBOS_SPAN(name, + level) + +

    +

    Constructs a new span with a specified level.

    + + + + + + + + + + + + + + +
    Parameters
    nameSpan name.
    levelSpan level.
    +
    +
    +

    + #define CUBOS_SPAN_INFO(name) + +

    +

    Constructs a new info span.

    + + + + + + + + + + +
    Parameters
    nameSpan name.
    +
    +
    +

    + #define CUBOS_SPAN_DEBUG(name) + +

    +

    Constructs a new debug span.

    + + + + + + + + + + +
    Parameters
    nameSpan name.
    +
    +
    +

    + #define CUBOS_SPAN_TRACE(name) + +

    +

    Constructs a new trace span.

    + + + + + + + + + + +
    Parameters
    nameSpan name.
    +
    +
    +
    +
    +
    +
    + + + +
    + + diff --git a/preview/pr-1282/group__core-thread.html b/preview/pr-1282/group__core-thread.html index c10c0fcf3..7432ec836 100644 --- a/preview/pr-1282/group__core-thread.html +++ b/preview/pr-1282/group__core-thread.html @@ -66,6 +66,8 @@

    Files

    file pool.hpp
    Class cubos::core::thread::ThreadPool.
    +
    file process.hpp
    +
    Class cubos::core::thread::Process.
    file task.hpp
    Class cubos::core::thread::Task.
    @@ -77,6 +79,10 @@

    Classes

    class cubos::core::thread::ThreadPool
    Manages a pool of threads, to which tasks can be submitted.
    +
    + class cubos::core::thread::Process +
    +
    Provides a cross-platform way to spawn child processes.
    template<typename T>
    class cubos::core::thread::Task diff --git a/preview/pr-1282/group__core.html b/preview/pr-1282/group__core.html index 86b596db8..b30173867 100644 --- a/preview/pr-1282/group__core.html +++ b/preview/pr-1282/group__core.html @@ -92,21 +92,13 @@

    Files

    file api.hpp
    Macro CUBOS_CORE_API.
    -
    file log.hpp
    -
    Logging and assertion macros.
    -
    file metrics.hpp
    -
    Metrics and profiling utilities and macros.

    Classes

    - class cubos::core::Logger -
    -
    Singleton which holds the logging state.
    -
    - class cubos::core::Metrics + class cubos::core::tel::Metrics
    Singleton class that manages a collection of metrics.
    @@ -115,7 +107,7 @@

    Classes

    Functions

    - void abort() + void abort()
    Aborts the program and prints a pretty stack trace.
    @@ -123,462 +115,31 @@

    Functions

    Defines

    -
    - #define CUBOS_LOG_LEVEL_TRACE -
    -
    Trace log level, lowest log level. Very verbose.
    -
    - #define CUBOS_LOG_LEVEL_DEBUG -
    -
    Debug log level. Contains messages useful for debugging, but which are not necessary in release builds.
    -
    - #define CUBOS_LOG_LEVEL_INFO -
    -
    Information log level. Contains important events that are not errors.
    -
    - #define CUBOS_LOG_LEVEL_WARN -
    -
    Warn log level. Contains events that are not errors, but which are unexpected and may be problematic.
    -
    - #define CUBOS_LOG_LEVEL_ERROR -
    -
    Error log level. Contains errors which are recoverable from.
    -
    - #define CUBOS_LOG_LEVEL_CRITICAL -
    -
    Critical log level, highest log level. Contains errors which are unrecoverable from.
    -
    - #define CUBOS_LOG_LEVEL_OFF -
    -
    Off log level, disables all logging.
    -
    - #define CUBOS_LOG_LEVEL -
    -
    Log level to compile in.
    -
    - #define CUBOS_TRACE(...) -
    -
    Used for logging very verbose information.
    -
    - #define CUBOS_DEBUG(...) -
    -
    Used for logging information which is useful for debugging but not necessary in release builds.
    -
    - #define CUBOS_INFO(...) -
    -
    Used for logging information which is useful in release builds.
    -
    - #define CUBOS_WARN(...) -
    -
    Used for logging unexpected events.
    -
    - #define CUBOS_ERROR(...) -
    -
    Used for logging recoverable errors.
    -
    - #define CUBOS_CRITICAL(...) -
    -
    Used for logging unrecoverable errors.
    -
    - #define CUBOS_LOG(level, - ...) -
    -
    Used for logging messages.
    -
    - #define CUBOS_FAIL(...) -
    -
    Aborts a program, optionally printing a critical error message.
    -
    - #define CUBOS_UNREACHABLE(...) -
    -
    Marks a code path as supposedly unreachable. Aborts the program when reached.
    -
    - #define CUBOS_TODO(...) -
    -
    Marks a code path as unfinished. Aborts the program when reached.
    -
    - #define CUBOS_ASSERT(cond, - ...) -
    -
    Asserts that a condition is true, aborting the program if it is not.
    -
    - #define CUBOS_ASSERT_IMP(cond, - cons, - ...) -
    -
    Asserts that an implication is true, aborting the program if it is not.
    -
    - #define CUBOS_DEBUG_ASSERT(cond, - ...) -
    -
    In debug builds asserts that a condition is true, aborting the program if it is not.
    #define CUBOS_METRIC(...)
    Macro to add a metric.
    -
    - #define CUBOS_PROFILE(...) -
    -
    Macro to measure the execution time of a function/scope, registering it as a metric.

    Function documentation

    -
    +

    - void abort() - + void abort() +

    Aborts the program and prints a pretty stack trace.

    Define documentation

    -
    -

    - #define CUBOS_LOG_LEVEL_TRACE - -

    -

    Trace log level, lowest log level. Very verbose.

    - -
    -
    -

    - #define CUBOS_LOG_LEVEL_DEBUG - -

    -

    Debug log level. Contains messages useful for debugging, but which are not necessary in release builds.

    - -
    -
    -

    - #define CUBOS_LOG_LEVEL_INFO - -

    -

    Information log level. Contains important events that are not errors.

    - -
    -
    -

    - #define CUBOS_LOG_LEVEL_WARN - -

    -

    Warn log level. Contains events that are not errors, but which are unexpected and may be problematic.

    - -
    -
    -

    - #define CUBOS_LOG_LEVEL_ERROR - -

    -

    Error log level. Contains errors which are recoverable from.

    - -
    -
    -

    - #define CUBOS_LOG_LEVEL_CRITICAL - -

    -

    Critical log level, highest log level. Contains errors which are unrecoverable from.

    - -
    -
    -

    - #define CUBOS_LOG_LEVEL_OFF - -

    -

    Off log level, disables all logging.

    - -
    -
    -

    - #define CUBOS_LOG_LEVEL - -

    -

    Log level to compile in.

    -

    This macro essentially controls the minimum log level that will be compiled into the binary.

    Should be set to one of the following:

    By default, on debug builds, this is set to CUBOS_LOG_LEVEL_TRACE. On release builds, this is set to CUBOS_LOG_LEVEL_INFO.

    -
    -
    -

    - #define CUBOS_TRACE(...) - -

    -

    Used for logging very verbose information.

    - - - - - - - - - - -
    Parameters
    ...Format string and arguments.
    - -
    -
    -

    - #define CUBOS_DEBUG(...) - -

    -

    Used for logging information which is useful for debugging but not necessary in release builds.

    - - - - - - - - - - -
    Parameters
    ...Format string and arguments.
    - -
    -
    -

    - #define CUBOS_INFO(...) - -

    -

    Used for logging information which is useful in release builds.

    - - - - - - - - - - -
    Parameters
    ...Format string and arguments.
    - -
    -
    -

    - #define CUBOS_WARN(...) - -

    -

    Used for logging unexpected events.

    - - - - - - - - - - -
    Parameters
    ...Format string and arguments.
    - -
    -
    -

    - #define CUBOS_ERROR(...) - -

    -

    Used for logging recoverable errors.

    - - - - - - - - - - -
    Parameters
    ...Format string and arguments.
    - -
    -
    -

    - #define CUBOS_CRITICAL(...) - -

    -

    Used for logging unrecoverable errors.

    - - - - - - - - - - -
    Parameters
    ...Format string and arguments.
    - -
    -
    -

    - #define CUBOS_LOG(level, - ...) - -

    -

    Used for logging messages.

    - - - - - - - - - - - - - - -
    Parameters
    levelLog level.
    ...Format string and arguments.
    - -
    -
    -

    - #define CUBOS_FAIL(...) - -

    -

    Aborts a program, optionally printing a critical error message.

    - - - - - - - - - - -
    Parameters
    ...Optional format string and arguments.
    -
    -
    -

    - #define CUBOS_UNREACHABLE(...) - -

    -

    Marks a code path as supposedly unreachable. Aborts the program when reached.

    - - - - - - - - - - -
    Parameters
    ...Optional format string and arguments.
    -
    -
    -

    - #define CUBOS_TODO(...) - -

    -

    Marks a code path as unfinished. Aborts the program when reached.

    - - - - - - - - - - -
    Parameters
    ...Optional format string and arguments.
    -
    -
    -

    - #define CUBOS_ASSERT(cond, - ...) - -

    -

    Asserts that a condition is true, aborting the program if it is not.

    - - - - - - - - - - - - - - -
    Parameters
    condCondition to assert.
    ...Optional format string and arguments.
    -
    -
    -

    - #define CUBOS_ASSERT_IMP(cond, - cons, - ...) - -

    -

    Asserts that an implication is true, aborting the program if it is not.

    - - - - - - - - - - - - - - - - - - -
    Parameters
    condImplication condition.
    consImplication consequence.
    ...Optional format string and arguments.
    -
    -
    -

    - #define CUBOS_DEBUG_ASSERT(cond, - ...) - -

    -

    In debug builds asserts that a condition is true, aborting the program if it is not.

    - - - - - - - - - - - - - - -
    Parameters
    condCondition to assert.
    ...Optional format string and arguments.
    -

    #define CUBOS_METRIC(...) - +

    Macro to add a metric.

    -
    -

    - #define CUBOS_PROFILE(...) - -

    -

    Macro to measure the execution time of a function/scope, registering it as a metric.

    - -
    diff --git a/preview/pr-1282/group__tesseratos-debugger-plugin.html b/preview/pr-1282/group__tesseratos-debugger-plugin.html index 46f1c8ab7..e109022d6 100644 --- a/preview/pr-1282/group__tesseratos-debugger-plugin.html +++ b/preview/pr-1282/group__tesseratos-debugger-plugin.html @@ -70,6 +70,8 @@

    Files

    Resource tesseratos::Debugger.
    file plugin.hpp
    Plugin entry point.
    +
    file manager.hpp
    +
    System argument tesseratos::ProjectManager.
    diff --git a/preview/pr-1282/group__tesseratos-project-plugin.html b/preview/pr-1282/group__tesseratos-project-plugin.html new file mode 100644 index 000000000..d927c365e --- /dev/null +++ b/preview/pr-1282/group__tesseratos-project-plugin.html @@ -0,0 +1,151 @@ + + + + + Tesseratos » Project module | Cubos Docs + + + + + + + +
    +
    +
    +
    +
    +

    + Tesseratos » + Project module

    +

    Adds a resource used to manage the currently loaded project.

    + +
    +

    Files

    +
    +
    file plugin.hpp
    +
    Plugin entry point.
    +
    +
    +
    +

    Functions

    +
    +
    + void projectPlugin(cubos::engine::Cubos& cubos) +
    +
    Plugin entry function.
    +
    +
    +
    +

    Function documentation

    +
    +

    + void projectPlugin(cubos::engine::Cubos& cubos) + +

    +

    Plugin entry function.

    + + + + + + + + + + +
    Parameters
    cubosCubos main class
    +
    +
    +
    +
    +
    +
    + + + +
    + + diff --git a/preview/pr-1282/group__tesseratos.html b/preview/pr-1282/group__tesseratos.html index ecb2a55e8..9e522b52e 100644 --- a/preview/pr-1282/group__tesseratos.html +++ b/preview/pr-1282/group__tesseratos.html @@ -69,6 +69,8 @@

    Modules

    Adds a resource used to manage a connection to a Cubos debugger.
    module Asset explorer
    Allows importing files such as .qb through a ImGui window.
    +
    module Project
    +
    Adds a resource used to manage the currently loaded project.
    module Scene editor
    Adds a window to edit scenes and select entities in them.
    module Palette editor
    diff --git a/preview/pr-1282/log_8hpp.html b/preview/pr-1282/level_8hpp.html similarity index 51% rename from preview/pr-1282/log_8hpp.html rename to preview/pr-1282/level_8hpp.html index e964c0908..9dda81193 100644 --- a/preview/pr-1282/log_8hpp.html +++ b/preview/pr-1282/level_8hpp.html @@ -2,7 +2,7 @@ - core/log.hpp file | Cubos Docs + core/tel/level.hpp file | Cubos Docs @@ -46,9 +46,9 @@

    - core/log.hpp file + core/tel/level.hpp file

    -

    Logging and assertion macros.

    +

    Telemetry levels.

    -
    -

    Classes

    +
    +

    Enums

    - class cubos::core::Logger + enum class Level { Trace = CUBOS_TEL_LEVEL_TRACE, + Debug = CUBOS_TEL_LEVEL_DEBUG, + Info = CUBOS_TEL_LEVEL_INFO, + Warn = CUBOS_TEL_LEVEL_WARN, + Error = CUBOS_TEL_LEVEL_ERROR, + Critical = CUBOS_TEL_LEVEL_CRITICAL, + Off = CUBOS_TEL_LEVEL_OFF }
    -
    Singleton which holds the logging state.
    -
    - struct cubos::core::Logger::Location -
    -
    Identifies a location in the code.
    -
    - struct cubos::core::Logger::Timestamp -
    -
    A timestamp used to identify when a logging message was written.
    -
    - struct cubos::core::Logger::Entry -
    -
    Data created by a call to log.
    +
    Represents a telemetry level.

    Functions

    - void abort() + void level(Level level) +
    +
    Set telemetry level.
    +
    + auto level() -> Level -> auto
    -
    Aborts the program and prints a pretty stack trace.
    +
    Get telemetry level.

    Defines

    - #define CUBOS_LOG_LEVEL_TRACE -
    -
    Trace log level, lowest log level. Very verbose.
    -
    - #define CUBOS_LOG_LEVEL_DEBUG -
    -
    Debug log level. Contains messages useful for debugging, but which are not necessary in release builds.
    -
    - #define CUBOS_LOG_LEVEL_INFO -
    -
    Information log level. Contains important events that are not errors.
    -
    - #define CUBOS_LOG_LEVEL_WARN -
    -
    Warn log level. Contains events that are not errors, but which are unexpected and may be problematic.
    -
    - #define CUBOS_LOG_LEVEL_ERROR -
    -
    Error log level. Contains errors which are recoverable from.
    -
    - #define CUBOS_LOG_LEVEL_CRITICAL -
    -
    Critical log level, highest log level. Contains errors which are unrecoverable from.
    -
    - #define CUBOS_LOG_LEVEL_OFF -
    -
    Off log level, disables all logging.
    -
    - #define CUBOS_LOG_LEVEL -
    -
    Log level to compile in.
    -
    - #define CUBOS_TRACE(...) -
    -
    Used for logging very verbose information.
    -
    - #define CUBOS_DEBUG(...) -
    -
    Used for logging information which is useful for debugging but not necessary in release builds.
    -
    - #define CUBOS_INFO(...) -
    -
    Used for logging information which is useful in release builds.
    -
    - #define CUBOS_WARN(...) -
    -
    Used for logging unexpected events.
    -
    - #define CUBOS_ERROR(...) -
    -
    Used for logging recoverable errors.
    -
    - #define CUBOS_CRITICAL(...) + #define CUBOS_TEL_LEVEL_TRACE
    -
    Used for logging unrecoverable errors.
    +
    Trace telemetry level, lowest telemetry level. Very verbose.
    - #define CUBOS_LOG(level, - ...) + #define CUBOS_TEL_LEVEL_DEBUG
    -
    Used for logging messages.
    +
    Debug telemetry level. Contains logs and tracing useful for debugging, but which are not necessary in release builds.
    - #define CUBOS_FAIL(...) + #define CUBOS_TEL_LEVEL_INFO
    -
    Aborts a program, optionally printing a critical error message.
    +
    Information telemetry level. Contains important events that are not errors.
    - #define CUBOS_UNREACHABLE(...) + #define CUBOS_TEL_LEVEL_WARN
    -
    Marks a code path as supposedly unreachable. Aborts the program when reached.
    +
    Warn telemetry level. Contains events that are not errors, but which are unexpected and may be problematic.
    - #define CUBOS_TODO(...) + #define CUBOS_TEL_LEVEL_ERROR
    -
    Marks a code path as unfinished. Aborts the program when reached.
    +
    Error telemetry level. Contains errors which are recoverable from.
    - #define CUBOS_ASSERT(cond, - ...) + #define CUBOS_TEL_LEVEL_CRITICAL
    -
    Asserts that a condition is true, aborting the program if it is not.
    +
    Critical telemetry level, highest log level. Contains errors which are unrecoverable from.
    - #define CUBOS_ASSERT_IMP(cond, - cons, - ...) + #define CUBOS_TEL_LEVEL_OFF
    -
    Asserts that an implication is true, aborting the program if it is not.
    +
    Off telemetry level, disables all logging/tracing.
    - #define CUBOS_DEBUG_ASSERT(cond, - ...) + #define CUBOS_TEL_LEVEL
    -
    In debug builds asserts that a condition is true, aborting the program if it is not.
    +
    Telemetry level to compile in.
    diff --git a/preview/pr-1282/logging_8hpp.html b/preview/pr-1282/logging_8hpp.html new file mode 100644 index 000000000..aa46544bf --- /dev/null +++ b/preview/pr-1282/logging_8hpp.html @@ -0,0 +1,351 @@ + + + + + core/tel/logging.hpp file | Cubos Docs + + + + + + + +
    +
    +
    +
    +
    +

    + core/tel/logging.hpp file +

    +

    Logging and assertion macros.

    + +
    +

    Namespaces

    +
    +
    namespace cubos
    +
    Cubos libraries namespace.
    +
    namespace cubos::core
    +
    Core namespace.
    +
    +
    +
    +

    Classes

    +
    +
    + class cubos::core::tel::Logger +
    +
    Singleton which holds the logging state.
    +
    + struct cubos::core::tel::Logger::Location +
    +
    Identifies a location in the code.
    +
    + struct cubos::core::tel::Logger::Timestamp +
    +
    A timestamp used to identify when a logging message was written.
    +
    + struct cubos::core::tel::Logger::Entry +
    +
    Data created by a call to log.
    +
    +
    +
    +

    Functions

    +
    +
    + void abort() +
    +
    Aborts the program and prints a pretty stack trace.
    +
    +
    +
    +

    Defines

    +
    +
    + #define CUBOS_TRACE(...) +
    +
    Used for logging very verbose information.
    +
    + #define CUBOS_DEBUG(...) +
    +
    Used for logging information which is useful for debugging but not necessary in release builds.
    +
    + #define CUBOS_INFO(...) +
    +
    Used for logging information which is useful in release builds.
    +
    + #define CUBOS_WARN(...) +
    +
    Used for logging unexpected events.
    +
    + #define CUBOS_ERROR(...) +
    +
    Used for logging recoverable errors.
    +
    + #define CUBOS_CRITICAL(...) +
    +
    Used for logging unrecoverable errors.
    +
    + #define CUBOS_LOG(level, + ...) +
    +
    Used for logging messages.
    +
    + #define CUBOS_FAIL(...) +
    +
    Aborts a program, optionally printing a critical error message.
    +
    + #define CUBOS_UNREACHABLE(...) +
    +
    Marks a code path as supposedly unreachable. Aborts the program when reached.
    +
    + #define CUBOS_TODO(...) +
    +
    Marks a code path as unfinished. Aborts the program when reached.
    +
    + #define CUBOS_ASSERT(cond, + ...) +
    +
    Asserts that a condition is true, aborting the program if it is not.
    +
    + #define CUBOS_ASSERT_IMP(cond, + cons, + ...) +
    +
    Asserts that an implication is true, aborting the program if it is not.
    +
    + #define CUBOS_DEBUG_ASSERT(cond, + ...) +
    +
    In debug builds asserts that a condition is true, aborting the program if it is not.
    +
    +
    +
    +

    Define documentation

    +
    +

    + #define CUBOS_TRACE(...) +

    +

    Used for logging very verbose information.

    + + + + + + + + + + +
    Parameters
    ...Format string and arguments.
    + +
    +
    +

    + #define CUBOS_DEBUG(...) +

    +

    Used for logging information which is useful for debugging but not necessary in release builds.

    + + + + + + + + + + +
    Parameters
    ...Format string and arguments.
    + +
    +
    +

    + #define CUBOS_INFO(...) +

    +

    Used for logging information which is useful in release builds.

    + + + + + + + + + + +
    Parameters
    ...Format string and arguments.
    + +
    +
    +

    + #define CUBOS_WARN(...) +

    +

    Used for logging unexpected events.

    + + + + + + + + + + +
    Parameters
    ...Format string and arguments.
    + +
    +
    +

    + #define CUBOS_ERROR(...) +

    +

    Used for logging recoverable errors.

    + + + + + + + + + + +
    Parameters
    ...Format string and arguments.
    + +
    +
    +

    + #define CUBOS_CRITICAL(...) +

    +

    Used for logging unrecoverable errors.

    + + + + + + + + + + +
    Parameters
    ...Format string and arguments.
    + +
    +
    +

    + #define CUBOS_LOG(level, + ...) +

    +

    Used for logging messages.

    + + + + + + + + + + + + + + +
    Parameters
    levelLog level.
    ...Format string and arguments.
    + +
    +
    +
    +
    +
    +
    + + + +
    + + diff --git a/preview/pr-1282/manager_8hpp.html b/preview/pr-1282/manager_8hpp.html new file mode 100644 index 000000000..9af32fd01 --- /dev/null +++ b/preview/pr-1282/manager_8hpp.html @@ -0,0 +1,136 @@ + + + + + tesseratos/project/manager.hpp file | Cubos Docs + + + + + + + +
    +
    + + + +
    + + diff --git a/preview/pr-1282/metrics_8hpp.html b/preview/pr-1282/metrics_8hpp.html index f449dbb64..7734238ba 100644 --- a/preview/pr-1282/metrics_8hpp.html +++ b/preview/pr-1282/metrics_8hpp.html @@ -2,7 +2,7 @@ - core/metrics.hpp file | Cubos Docs + core/tel/metrics.hpp file | Cubos Docs @@ -46,7 +46,7 @@

    - core/metrics.hpp file + core/tel/metrics.hpp file

    Metrics and profiling utilities and macros.

    @@ -91,10 +87,6 @@

    Defines

    #define CUBOS_METRIC(...)
    Macro to add a metric.
    -
    - #define CUBOS_PROFILE(...) -
    -
    Macro to measure the execution time of a function/scope, registering it as a metric.
    diff --git a/preview/pr-1282/modules.html b/preview/pr-1282/modules.html index 325b138c4..2ef955c57 100644 --- a/preview/pr-1282/modules.html +++ b/preview/pr-1282/modules.html @@ -166,12 +166,14 @@

    Modules

  • module Asset explorer Allows viewing and selecting assets through a ImGui window.
  • module Debugger Adds a resource used to manage a connection to a Cubos debugger.
  • module Asset explorer Allows importing files such as .qb through a ImGui window.
  • +
  • module Project Adds a resource used to manage the currently loaded project.
  • module Scene editor Adds a window to edit scenes and select entities in them.
  • module Palette editor Allows the user to open and inspect/edit a palette asset.
  • module Core API C API for the Cubos core library.
  • module Engine API C API for the Cubos engine library.
  • +
  • module Core-tel
  • + +
    + + diff --git a/preview/pr-1282/structcubos_1_1core_1_1Logger_1_1Location.html b/preview/pr-1282/structcubos_1_1core_1_1tel_1_1Logger_1_1Location.html similarity index 83% rename from preview/pr-1282/structcubos_1_1core_1_1Logger_1_1Location.html rename to preview/pr-1282/structcubos_1_1core_1_1tel_1_1Logger_1_1Location.html index 6714e0543..ab57adc3d 100644 --- a/preview/pr-1282/structcubos_1_1core_1_1Logger_1_1Location.html +++ b/preview/pr-1282/structcubos_1_1core_1_1tel_1_1Logger_1_1Location.html @@ -2,7 +2,7 @@ - cubos::core::Logger::Location struct | Cubos Docs + cubos::core::tel::Logger::Location struct | Cubos Docs @@ -46,8 +46,8 @@

    - cubos::core::Logger::Location struct - + cubos::core::tel::Logger::Location struct +

    Identifies a location in the code.