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

            Line data    Source code
       1              : /* File: data_change_notifier.inl; Copyright and License: see below */
       2              : 
       3              : #include "entity/data_id.h"
       4              : #include "u8/u8_log.h"
       5              : #include <assert.h>
       6              : 
       7          304 : static inline void data_change_notifier_emit_signal_without_parent ( data_change_notifier_t *this_,
       8              :                                                                      data_change_event_type_t event_type,
       9              :                                                                      data_table_t table,
      10              :                                                                      data_row_t row_id )
      11              : {
      12              :     /* only classifier may be created without providing a parent object */
      13          304 :     assert( (DATA_CHANGE_EVENT_TYPE_CREATE != event_type) || (DATA_TABLE_CLASSIFIER == table) );
      14              : 
      15          304 :     data_change_notifier_emit_signal ( this_,
      16              :                                        event_type,
      17              :                                        table,
      18              :                                        row_id,
      19              :                                        DATA_TABLE_VOID,
      20              :                                        DATA_ROW_VOID
      21              :                                      );
      22          304 : }
      23              : 
      24            3 : static inline void data_change_notifier_enable_stealth_mode ( data_change_notifier_t *this_ )
      25              : {
      26            3 :     (*this_).stealth_mode = true;
      27            3 : }
      28              : 
      29          127 : static inline void data_change_notifier_disable_stealth_mode ( data_change_notifier_t *this_ )
      30              : {
      31          127 :     const bool send_notification = (*this_).stealth_mode;
      32          127 :     (*this_).stealth_mode = false;
      33              : 
      34          127 :     if ( send_notification )
      35              :     {
      36              :         /* send notification that things have changed */
      37            3 :         data_change_notifier_emit_signal( this_,
      38              :                                           DATA_CHANGE_EVENT_TYPE_MULTI,
      39              :                                           DATA_TABLE_VOID,
      40              :                                           DATA_ROW_VOID,
      41              :                                           DATA_TABLE_VOID,
      42              :                                           DATA_ROW_VOID
      43              :                                         );
      44              :     }
      45          127 : }
      46              : 
      47              : 
      48              : /*
      49              : Copyright 2018-2025 Andreas Warnke
      50              : 
      51              : Licensed under the Apache License, Version 2.0 (the "License");
      52              : you may not use this file except in compliance with the License.
      53              : You may obtain a copy of the License at
      54              : 
      55              :     http://www.apache.org/licenses/LICENSE-2.0
      56              : 
      57              : Unless required by applicable law or agreed to in writing, software
      58              : distributed under the License is distributed on an "AS IS" BASIS,
      59              : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      60              : See the License for the specific language governing permissions and
      61              : limitations under the License.
      62              : */
        

Generated by: LCOV version 2.0-1