Line data Source code
1 : /* File: pencil_rules.inl; Copyright and License: see below */
2 :
3 0 : static inline void pencil_rules_init ( pencil_rules_t *this_ )
4 : {
5 0 : (*this_).dummy = 0; /* prevent warnings on uninitialized usage */
6 0 : }
7 :
8 0 : static inline void pencil_rules_destroy ( pencil_rules_t *this_ )
9 : {
10 0 : }
11 :
12 0 : static inline bool pencil_rules_feature_is_implicit_proxy ( const pencil_rules_t *this_,
13 : data_feature_type_t feature_type,
14 : data_classifier_type_t classifier_type,
15 : data_diagram_type_t diagram_type )
16 : {
17 0 : const bool classifier_can_have_lifeline
18 0 : = ! (( classifier_type == DATA_CLASSIFIER_TYPE_REQUIREMENT )
19 0 : || ( classifier_type == DATA_CLASSIFIER_TYPE_COMMENT )
20 0 : || ( classifier_type == DATA_CLASSIFIER_TYPE_INTERACTION )
21 : || ( classifier_type == DATA_CLASSIFIER_TYPE_DIAGRAM_REFERENCE ));
22 0 : const bool diagram_can_show_lifeline
23 : = ( diagram_type == DATA_DIAGRAM_TYPE_UML_SEQUENCE_DIAGRAM )
24 0 : || ( diagram_type == DATA_DIAGRAM_TYPE_UML_TIMING_DIAGRAM );
25 0 : const bool feature_is_lifeline = ( feature_type == DATA_FEATURE_TYPE_LIFELINE );
26 0 : return feature_is_lifeline && (( ! diagram_can_show_lifeline )||( ! classifier_can_have_lifeline ));
27 : }
28 :
29 :
30 : /*
31 : Copyright 2023-2025 Andreas Warnke
32 :
33 : Licensed under the Apache License, Version 2.0 (the "License");
34 : you may not use this file except in compliance with the License.
35 : You may obtain a copy of the License at
36 :
37 : http://www.apache.org/licenses/LICENSE-2.0
38 :
39 : Unless required by applicable law or agreed to in writing, software
40 : distributed under the License is distributed on an "AS IS" BASIS,
41 : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
42 : See the License for the specific language governing permissions and
43 : limitations under the License.
44 : */
|