LCOV - code coverage report
Current view: top level - mq/src - IMQSocket.hpp (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 2 2
Test Date: 2025-06-11 17:47:30 Functions: 66.7 % 3 2
Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : #ifndef MQ_SOCKET_HPP
       2                 :             : #define MQ_SOCKET_HPP
       3                 :             : 
       4                 :             : #include <cstdint>
       5                 :             : #include <optional>
       6                 :             : #include <string>
       7                 :             : #include <vector>
       8                 :             : 
       9                 :             : namespace MQ {
      10                 :             : 
      11                 :             : class IMQSocket {
      12                 :             :    protected:
      13                 :             :     // Constructors
      14                 :           9 :     IMQSocket() = default;
      15                 :             :     IMQSocket(const IMQSocket&) = default;
      16                 :             :     IMQSocket(IMQSocket&&) = default;
      17                 :             : 
      18                 :             :     // Asignment operators
      19                 :             :     auto operator=(const IMQSocket&) -> IMQSocket& = default;
      20                 :             :     auto operator=(IMQSocket&&) -> IMQSocket& = default;
      21                 :             : 
      22                 :             :    public:
      23                 :           9 :     virtual ~IMQSocket() = default;
      24                 :             :     virtual auto connect(const std::string& endpoint) -> bool = 0;
      25                 :             :     virtual auto subscribe(const std::string& topic) -> bool = 0;
      26                 :             :     virtual auto bind(const std::string& endpoint) -> bool = 0;
      27                 :             :     virtual auto send(const std::vector<uint8_t>& data) -> bool = 0;
      28                 :             :     virtual auto receive() -> std::optional<std::vector<uint8_t>> = 0;
      29                 :             :     virtual void close() = 0;
      30                 :             : };
      31                 :             : }  // namespace MQ
      32                 :             : 
      33                 :             : #endif
        

Generated by: LCOV version 2.0-1