LCOV - code coverage report
Current view: top level - include/ad/map/serialize - IStorage.hpp (source / functions) Hit Total Coverage
Test: ad_map_access Lines: 2 2 100.0 %
Date: 2022-10-04 09:48:07 Functions: 2 2 100.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : // ----------------- BEGIN LICENSE BLOCK ---------------------------------
       2                 :            : //
       3                 :            : // Copyright (C) 2018-2021 Intel Corporation
       4                 :            : //
       5                 :            : // SPDX-License-Identifier: MIT
       6                 :            : //
       7                 :            : // ----------------- END LICENSE BLOCK -----------------------------------
       8                 :            : /**
       9                 :            :  * @file
      10                 :            :  */
      11                 :            : 
      12                 :            : #pragma once
      13                 :            : 
      14                 :            : #include <string>
      15                 :            : 
      16                 :            : /** @brief namespace ad */
      17                 :            : namespace ad {
      18                 :            : /** @brief namespace map */
      19                 :            : namespace map {
      20                 :            : /** @brief namespace serialize */
      21                 :            : namespace serialize {
      22                 :            : 
      23                 :            : /**
      24                 :            :  * @brief Storage Interface
      25                 :            :  */
      26                 :            : class IStorage
      27                 :            : {
      28                 :            : protected: // Constructor/Destructor
      29                 :        169 :   IStorage() = default;
      30                 :        169 :   virtual ~IStorage() = default;
      31                 :            : 
      32                 :            : public: // To be implemented
      33                 :            :   virtual const char *getStorageType() = 0;
      34                 :            : 
      35                 :            : protected: // To be implemented
      36                 :            :   virtual bool doOpenForRead(std::string const &config) = 0;
      37                 :            :   virtual bool doOpenForWrite(std::string const &config) = 0;
      38                 :            :   virtual bool doCloseForRead() = 0;
      39                 :            :   virtual bool doCloseForWrite() = 0;
      40                 :            :   virtual bool doWrite(const void *x, std::size_t bytes) = 0;
      41                 :            :   virtual bool doRead(void *x, std::size_t bytes) = 0;
      42                 :            : };
      43                 :            : 
      44                 :            : } // namespace serialize
      45                 :            : } // namespace map
      46                 :            : } // namespace ad

Generated by: LCOV version 1.14