LCOV - code coverage report
Current view: top level - data/include/storage - data_change_message.inl (source / functions) Coverage Total Hit
Test: crystal-facet-uml_v1.63.2_covts Lines: 83.7 % 43 36
Test Date: 2025-05-01 10:10:14 Functions: 60.0 % 5 3

            Line data    Source code
       1              : /* File: data_change_message.inl; Copyright and License: see below */
       2              : 
       3              : #include "u8/u8_log.h"
       4              : 
       5         1962 : static inline void data_change_message_init ( data_change_message_t *this_,
       6              :                                               data_change_event_type_t event,
       7              :                                               data_id_t modified,
       8              :                                               data_id_t parent )
       9              : {
      10         1962 :     (*this_).event = event;
      11         1962 :     (*this_).modified = modified;
      12         1962 :     (*this_).parent = parent;
      13         1962 : }
      14              : 
      15              : static inline void data_change_message_reinit ( data_change_message_t *this_,
      16              :                                                 data_change_event_type_t event,
      17              :                                                 data_id_t modified,
      18              :                                                 data_id_t parent )
      19              : {
      20              :     (*this_).event = event;
      21              :     (*this_).modified = modified;
      22              :     (*this_).parent = parent;
      23              : }
      24              : 
      25         1962 : static inline void data_change_message_destroy ( data_change_message_t *this_ )
      26              : {
      27         1962 : }
      28              : 
      29            0 : static inline data_change_event_type_t data_change_message_get_event ( const data_change_message_t *this_ )
      30              : {
      31            0 :     return (*this_).event;
      32              : }
      33              : 
      34            0 : static inline data_id_t data_change_message_get_modified ( const data_change_message_t *this_ )
      35              : {
      36            0 :     return (*this_).modified;
      37              : }
      38              : 
      39              : static inline data_id_t data_change_message_get_parent ( const data_change_message_t *this_ )
      40              : {
      41              :     return (*this_).parent;
      42              : }
      43              : 
      44         1962 : static inline void data_change_message_trace ( const data_change_message_t *this_ )
      45              : {
      46         1962 :     U8_TRACE_INFO( "data_change_message_t" );
      47         1962 :     switch ( (*this_).event )
      48              :     {
      49         1461 :         case DATA_CHANGE_EVENT_TYPE_CREATE:
      50              :         {
      51         1461 :             U8_TRACE_INFO("- event: DATA_CHANGE_EVENT_TYPE_CREATE");
      52              :         }
      53         1461 :         break;
      54              : 
      55          135 :         case DATA_CHANGE_EVENT_TYPE_UPDATE:
      56              :         {
      57          135 :             U8_TRACE_INFO("- event: DATA_CHANGE_EVENT_TYPE_UPDATE");
      58              :         }
      59          135 :         break;
      60              : 
      61          177 :         case DATA_CHANGE_EVENT_TYPE_DELETE:
      62              :         {
      63          177 :             U8_TRACE_INFO("- event: DATA_CHANGE_EVENT_TYPE_DELETE");
      64              :         }
      65          177 :         break;
      66              : 
      67            3 :         case DATA_CHANGE_EVENT_TYPE_MULTI:
      68              :         {
      69            3 :             U8_TRACE_INFO("- event: DATA_CHANGE_EVENT_TYPE_MULTI");
      70              :         }
      71            3 :         break;
      72              : 
      73           62 :         case DATA_CHANGE_EVENT_TYPE_DB_OPENED:
      74              :         {
      75           62 :             U8_TRACE_INFO("- event: DATA_CHANGE_EVENT_TYPE_DB_OPENED");
      76              :         }
      77           62 :         break;
      78              : 
      79           62 :         case DATA_CHANGE_EVENT_TYPE_DB_PREPARE_CLOSE:
      80              :         {
      81           62 :             U8_TRACE_INFO("- event: DATA_CHANGE_EVENT_TYPE_DB_PREPARE_CLOSE");
      82              :         }
      83           62 :         break;
      84              : 
      85           62 :         case DATA_CHANGE_EVENT_TYPE_DB_CLOSED:
      86              :         {
      87           62 :             U8_TRACE_INFO("- event: DATA_CHANGE_EVENT_TYPE_DB_CLOSED");
      88              :         }
      89           62 :         break;
      90              : 
      91            0 :         default:
      92              :         {
      93            0 :             U8_LOG_ERROR("- event: out of range");
      94              :         }
      95            0 :         break;
      96              :     }
      97         1962 :     U8_TRACE_INFO( "- modified:" );
      98         1962 :     data_id_trace( &((*this_).modified) );
      99         1962 :     U8_TRACE_INFO( "- parent:" );
     100         1962 :     data_id_trace( &((*this_).parent) );
     101         1962 : }
     102              : 
     103              : 
     104              : /*
     105              : Copyright 2018-2025 Andreas Warnke
     106              : 
     107              : Licensed under the Apache License, Version 2.0 (the "License");
     108              : you may not use this file except in compliance with the License.
     109              : You may obtain a copy of the License at
     110              : 
     111              :     http://www.apache.org/licenses/LICENSE-2.0
     112              : 
     113              : Unless required by applicable law or agreed to in writing, software
     114              : distributed under the License is distributed on an "AS IS" BASIS,
     115              : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     116              : See the License for the specific language governing permissions and
     117              : limitations under the License.
     118              : */
        

Generated by: LCOV version 2.0-1