LCOV - code coverage report
Current view: top level - pencil/include/layout - layout_subelement_id.inl (source / functions) Hit Total Coverage
Test: crystal-facet-uml_v1.61.0_covts Lines: 0 18 0.0 %
Date: 2024-10-26 21:44:38 Functions: 0 6 0.0 %

          Line data    Source code
       1             : /* File: layout_subelement_id.inl; Copyright and License: see below */
       2             : 
       3             : #include "u8/u8_trace.h"
       4             : #include <assert.h>
       5             : 
       6             : static inline void layout_subelement_id_init( layout_subelement_id_t *this_ ,
       7             :                                               layout_subelement_kind_t kind,
       8             :                                               const data_full_id_t *id )
       9             : {
      10             :     (*this_).kind = kind;
      11             :     data_full_id_copy( &((*this_).id), id );
      12             : }
      13             : 
      14           0 : static inline void layout_subelement_id_init_void( layout_subelement_id_t *this_ )
      15             : {
      16           0 :     (*this_).kind = LAYOUT_SUBELEMENT_KIND_VOID;
      17           0 :     data_full_id_init_void( &((*this_).id) );
      18           0 : }
      19             : 
      20           0 : static inline void layout_subelement_id_reinit( layout_subelement_id_t *this_,
      21             :                                                 layout_subelement_kind_t kind,
      22             :                                                 const data_full_id_t *id )
      23             : {
      24           0 :     (*this_).kind = kind;
      25           0 :     data_full_id_replace( &((*this_).id ), id );
      26           0 : }
      27             : 
      28             : static inline void layout_subelement_id_init_solo( layout_subelement_id_t *this_,
      29             :                                                    layout_subelement_kind_t kind,
      30             :                                                    const data_id_t *id )
      31             : {
      32             :     (*this_).kind = kind;
      33             :     data_full_id_init_solo( &((*this_).id ), id );
      34             : }
      35             : 
      36           0 : static inline void layout_subelement_id_reinit_solo( layout_subelement_id_t *this_,
      37             :                                                      layout_subelement_kind_t kind,
      38             :                                                      const data_id_t *id )
      39             : {
      40           0 :     (*this_).kind = kind;
      41           0 :     data_full_id_reinit_solo( &((*this_).id ), id );
      42           0 : }
      43             : 
      44             : static inline void layout_subelement_id_copy( layout_subelement_id_t *this_, const layout_subelement_id_t *that )
      45             : {
      46             :     (*this_).kind = (*that).kind;
      47             :     data_full_id_copy( &((*this_).id), &((*that).id) );
      48             : }
      49             : 
      50             : static inline void layout_subelement_id_replace( layout_subelement_id_t *this_, const layout_subelement_id_t *that )
      51             : {
      52             :     (*this_).kind = (*that).kind;
      53             :     data_full_id_replace( &((*this_).id), &((*that).id) );
      54             : }
      55             : 
      56             : static inline void layout_subelement_id_destroy( layout_subelement_id_t *this_ )
      57             : {
      58             :     data_full_id_destroy( &((*this_).id) );
      59             : }
      60             : 
      61           0 : static inline bool layout_subelement_id_is_valid( const layout_subelement_id_t *this_ )
      62             : {
      63           0 :     return (( (*this_).kind != LAYOUT_SUBELEMENT_KIND_VOID )&&( data_full_id_is_valid( &((*this_).id) ) ));
      64             : }
      65             : 
      66           0 : static inline layout_subelement_kind_t layout_subelement_id_get_kind( const layout_subelement_id_t *this_ )
      67             : {
      68           0 :     return (*this_).kind;
      69             : }
      70             : 
      71           0 : static inline const data_full_id_t *layout_subelement_id_get_id_const( const layout_subelement_id_t *this_ )
      72             : {
      73           0 :     return &((*this_).id);
      74             : }
      75             : 
      76             : 
      77             : /*
      78             : Copyright 2024-2024 Andreas Warnke
      79             : 
      80             : Licensed under the Apache License, Version 2.0 (the "License");
      81             : you may not use this file except in compliance with the License.
      82             : You may obtain a copy of the License at
      83             : 
      84             :     http://www.apache.org/licenses/LICENSE-2.0
      85             : 
      86             : Unless required by applicable law or agreed to in writing, software
      87             : distributed under the License is distributed on an "AS IS" BASIS,
      88             : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      89             : See the License for the specific language governing permissions and
      90             : limitations under the License.
      91             : */

Generated by: LCOV version 1.16