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.42.0_alltests Lines: 20 27 74.1 %
Date: 2022-10-01 11:23:42 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /* File: data_change_message.inl; Copyright and License: see below */
       2             : 
       3             : #include "tslog/tslog.h"
       4             : 
       5       74841 : 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       74841 :     (*this_).event = event;
      11       74841 :     (*this_).modified = modified;
      12       74841 :     (*this_).parent = parent;
      13             : }
      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       74841 : static inline void data_change_message_destroy ( data_change_message_t *this_ )
      26             : {
      27       74841 : }
      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       74841 : static inline void data_change_message_trace ( const data_change_message_t *this_ )
      45             : {
      46       74841 :     TRACE_INFO( "data_change_message_t" );
      47       74841 :     switch ( (*this_).event )
      48             :     {
      49             :         case DATA_CHANGE_EVENT_TYPE_CREATE:
      50             :         {
      51       74841 :             TRACE_INFO("- event: DATA_CHANGE_EVENT_TYPE_CREATE");
      52             :         }
      53             :         break;
      54             : 
      55             :         case DATA_CHANGE_EVENT_TYPE_UPDATE:
      56             :         {
      57       74841 :             TRACE_INFO("- event: DATA_CHANGE_EVENT_TYPE_UPDATE");
      58             :         }
      59             :         break;
      60             : 
      61             :         case DATA_CHANGE_EVENT_TYPE_DELETE:
      62             :         {
      63       74841 :             TRACE_INFO("- event: DATA_CHANGE_EVENT_TYPE_DELETE");
      64             :         }
      65             :         break;
      66             : 
      67             :         case DATA_CHANGE_EVENT_TYPE_DB_OPENED:
      68             :         {
      69       74841 :             TRACE_INFO("- event: DATA_CHANGE_EVENT_TYPE_DB_OPENED");
      70             :         }
      71             :         break;
      72             : 
      73             :         case DATA_CHANGE_EVENT_TYPE_DB_PREPARE_CLOSE:
      74             :         {
      75       74841 :             TRACE_INFO("- event: DATA_CHANGE_EVENT_TYPE_DB_PREPARE_CLOSE");
      76             :         }
      77             :         break;
      78             : 
      79             :         case DATA_CHANGE_EVENT_TYPE_DB_CLOSED:
      80             :         {
      81       74841 :             TRACE_INFO("- event: DATA_CHANGE_EVENT_TYPE_DB_CLOSED");
      82             :         }
      83             :         break;
      84             : 
      85           0 :         default:
      86             :         {
      87           0 :             TSLOG_ERROR("- event: out of range");
      88             :         }
      89           0 :         break;
      90             :     }
      91       74841 :     TRACE_INFO( "- modified:" );
      92       74841 :     data_id_trace( &((*this_).modified) );
      93       74841 :     TRACE_INFO( "- parent:" );
      94       74841 :     data_id_trace( &((*this_).parent) );
      95       74841 : }
      96             : 
      97             : 
      98             : /*
      99             : Copyright 2018-2022 Andreas Warnke
     100             : 
     101             : Licensed under the Apache License, Version 2.0 (the "License");
     102             : you may not use this file except in compliance with the License.
     103             : You may obtain a copy of the License at
     104             : 
     105             :     http://www.apache.org/licenses/LICENSE-2.0
     106             : 
     107             : Unless required by applicable law or agreed to in writing, software
     108             : distributed under the License is distributed on an "AS IS" BASIS,
     109             : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     110             : See the License for the specific language governing permissions and
     111             : limitations under the License.
     112             : */

Generated by: LCOV version 1.14