LCOV - code coverage report
Current view: top level - http/data - out_string.hpp (source / functions) Coverage Total Hit
Test: coverage_filtered.info Lines: 100.0 % 9 9
Test Date: 2026-02-20 15:38:22 Functions: 80.0 % 5 4

            Line data    Source code
       1              : #ifndef OUT_STRING_HPP
       2              : #define OUT_STRING_HPP
       3              : 
       4              : #include "out_data.hpp"
       5              : 
       6              : namespace thinger::http::data{
       7              : 
       8              : class out_string : public out_data{
       9              : 
      10              : public:
      11           18 :     out_string(const std::string& str) : str_(str){
      12           18 :     }
      13              : 
      14              :     out_string(){
      15              :     }
      16              : 
      17           18 :     virtual ~out_string() {
      18           18 :     }
      19              : 
      20              :     std::string& get_string(){
      21              :         return str_;
      22              :     }
      23              : 
      24           18 :     size_t get_size() override{
      25           18 :         return str_.size();
      26              :     }
      27              : 
      28            3 :     void to_buffer(std::vector<boost::asio::const_buffer>& buffer) const override{
      29            3 :         buffer.emplace_back(boost::asio::buffer(str_));
      30            3 :     }
      31              : 
      32              : private:
      33              :     std::string str_;
      34              : };
      35              : 
      36              : }
      37              : 
      38              : #endif
        

Generated by: LCOV version 2.0-1