LCOV - code coverage report
Current view: top level - include/ad/map/serialize - IChecksum.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.h>
      15                 :            : 
      16                 :            : #include "ad/map/serialize/IStorage.hpp"
      17                 :            : 
      18                 :            : /** @brief namespace ad */
      19                 :            : namespace ad {
      20                 :            : /** @brief namespace map */
      21                 :            : namespace map {
      22                 :            : /** @brief namespace serialize */
      23                 :            : namespace serialize {
      24                 :            : 
      25                 :            : /**
      26                 :            :  * @brief Interface for Checksum
      27                 :            :  */
      28                 :            : class IChecksum : virtual public IStorage
      29                 :            : {
      30                 :            : protected: // Constructor/Destructor
      31                 :        169 :   IChecksum() = default;
      32                 :        169 :   virtual ~IChecksum() = default;
      33                 :            : 
      34                 :            : public: // Info
      35                 :            :   virtual const char *getChecksumType() = 0;
      36                 :            : 
      37                 :            : protected: // To be implemented: Checksum
      38                 :            :   virtual void initChecksum() = 0;
      39                 :            :   virtual void updateChecksum(const void *x, size_t bytes) = 0;
      40                 :            :   virtual bool writeChecksum() = 0;
      41                 :            :   virtual bool checksumOK() = 0;
      42                 :            : };
      43                 :            : 
      44                 :            : } // namespace serialize
      45                 :            : } // namespace map
      46                 :            : } // namespace ad

Generated by: LCOV version 1.14