LCOV - code coverage report
Current view: top level - data/include/storage - data_change_message.inl (source / functions) Hit Total Coverage
Test: crystal-facet-uml_v1.57.0_covts Lines: 36 43 83.7 %
Date: 2024-04-07 11:14:42 Functions: 3 5 60.0 %

          Line data    Source code
       1             : /* File: data_change_message.inl; Copyright and License: see below */
       2             : 
       3             : #include "u8/u8_log.h"
       4             : 
       5         961 : 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         961 :     (*this_).event = event;
      11         961 :     (*this_).modified = modified;
      12         961 :     (*this_).parent = parent;
      13         961 : }
      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         961 : static inline void data_change_message_destroy ( data_change_message_t *this_ )
      26             : {
      27         961 : }
      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         961 : static inline void data_change_message_trace ( const data_change_message_t *this_ )
      45             : {
      46         961 :     U8_TRACE_INFO( "data_change_message_t" );
      47         961 :     switch ( (*this_).event )
      48             :     {
      49         479 :         case DATA_CHANGE_EVENT_TYPE_CREATE:
      50             :         {
      51         479 :             U8_TRACE_INFO("- event: DATA_CHANGE_EVENT_TYPE_CREATE");
      52             :         }
      53         479 :         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           2 :         case DATA_CHANGE_EVENT_TYPE_MULTI:
      68             :         {
      69           2 :             U8_TRACE_INFO("- event: DATA_CHANGE_EVENT_TYPE_MULTI");
      70             :         }
      71           2 :         break;
      72             : 
      73          56 :         case DATA_CHANGE_EVENT_TYPE_DB_OPENED:
      74             :         {
      75          56 :             U8_TRACE_INFO("- event: DATA_CHANGE_EVENT_TYPE_DB_OPENED");
      76             :         }
      77          56 :         break;
      78             : 
      79          56 :         case DATA_CHANGE_EVENT_TYPE_DB_PREPARE_CLOSE:
      80             :         {
      81          56 :             U8_TRACE_INFO("- event: DATA_CHANGE_EVENT_TYPE_DB_PREPARE_CLOSE");
      82             :         }
      83          56 :         break;
      84             : 
      85          56 :         case DATA_CHANGE_EVENT_TYPE_DB_CLOSED:
      86             :         {
      87          56 :             U8_TRACE_INFO("- event: DATA_CHANGE_EVENT_TYPE_DB_CLOSED");
      88             :         }
      89          56 :         break;
      90             : 
      91           0 :         default:
      92             :         {
      93           0 :             U8_LOG_ERROR("- event: out of range");
      94             :         }
      95           0 :         break;
      96             :     }
      97         961 :     U8_TRACE_INFO( "- modified:" );
      98         961 :     data_id_trace( &((*this_).modified) );
      99         961 :     U8_TRACE_INFO( "- parent:" );
     100         961 :     data_id_trace( &((*this_).parent) );
     101         961 : }
     102             : 
     103             : 
     104             : /*
     105             : Copyright 2018-2024 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 1.16