| 1 |
/* File: pencil_rules.h; Copyright and License: see below */ |
| 2 |
|
| 3 |
#ifndef PENCIL_RULES_H |
| 4 |
#define PENCIL_RULES_H |
| 5 |
|
| 6 |
/* public file for the doxygen documentation: */ |
| 7 |
/*! |
| 8 |
* \file |
| 9 |
* \brief Defines filters for uml elements to display. |
| 10 |
* |
| 11 |
* Via this class, one can check if |
| 12 |
* - a lifeline is visible or if it implicitly proxies a classifier, |
| 13 |
* - a relationship is visible or if it is implicitly shown by being contained in an outer classifier. |
| 14 |
*/ |
| 15 |
|
| 16 |
#include "entity/data_classifier_type.h" |
| 17 |
#include "entity/data_feature_type.h" |
| 18 |
#include "entity/data_relationship_type.h" |
| 19 |
#include "entity/data_diagram_type.h" |
| 20 |
#include <stdbool.h> |
| 21 |
|
| 22 |
/*! |
| 23 |
* \brief attributes of a pencil_rules_t |
| 24 |
* |
| 25 |
* \note This class is stateless. |
| 26 |
* It may either be instantiated once and used many times or be instantiated per use. |
| 27 |
*/ |
| 28 |
struct pencil_rules_struct { |
| 29 |
int dummy; /*!< rules have no attributes */ |
| 30 |
}; |
| 31 |
|
| 32 |
typedef struct pencil_rules_struct pencil_rules_t; |
| 33 |
|
| 34 |
/*! |
| 35 |
* \brief initializes the pencil_rules_t struct |
| 36 |
* |
| 37 |
* \param this_ pointer to own object attributes |
| 38 |
*/ |
| 39 |
static inline void pencil_rules_init ( pencil_rules_t *this_ ); |
| 40 |
|
| 41 |
/*! |
| 42 |
* \brief destroys the pencil_rules_t struct |
| 43 |
* |
| 44 |
* \param this_ pointer to own object attributes |
| 45 |
*/ |
| 46 |
static inline void pencil_rules_destroy ( pencil_rules_t *this_ ); |
| 47 |
|
| 48 |
/*! |
| 49 |
* \brief determines if the feature is a lifeline and if the lifeline in the current diagram is only an implicit proxy. |
| 50 |
* |
| 51 |
* \param this_ pointer to own object attributes |
| 52 |
* \param feature_type the feature type |
| 53 |
* \param classifier_type the classifier type |
| 54 |
* \param diagram_type the diagram type |
| 55 |
* \return false if the feature type is not DATA_FEATURE_TYPE_LIFELINE |
| 56 |
* or the diagram type is not DATA_DIAGRAM_TYPE_UML_SEQUENCE_DIAGRAM |
| 57 |
* and not DATA_DIAGRAM_TYPE_UML_TIMING_DIAGRAM |
| 58 |
* or the classifier_type is DATA_CLASSIFIER_TYPE_DEPRECATED_FEATURE |
| 59 |
* or DATA_CLASSIFIER_TYPE_REQUIREMENT or DATA_CLASSIFIER_TYPE_COMMENT |
| 60 |
* or DATA_CLASSIFIER_TYPE_INTERACTION or DATA_CLASSIFIER_TYPE_INTERACTION_USE |
| 61 |
*/ |
| 62 |
static inline bool pencil_rules_feature_is_implicit_proxy ( const pencil_rules_t *this_, |
| 63 |
data_feature_type_t feature_type, |
| 64 |
data_classifier_type_t classifier_type, |
| 65 |
data_diagram_type_t diagram_type |
| 66 |
); |
| 67 |
|
| 68 |
#include "filter/pencil_rules.inl" |
| 69 |
|
| 70 |
#endif /* PENCIL_RULES_H */ |
| 71 |
|
| 72 |
|
| 73 |
/* |
| 74 |
Copyright 2023-2026 Andreas Warnke |
| 75 |
|
| 76 |
Licensed under the Apache License, Version 2.0 (the "License"); |
| 77 |
you may not use this file except in compliance with the License. |
| 78 |
You may obtain a copy of the License at |
| 79 |
|
| 80 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 81 |
|
| 82 |
Unless required by applicable law or agreed to in writing, software |
| 83 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 84 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 85 |
See the License for the specific language governing permissions and |
| 86 |
limitations under the License. |
| 87 |
*/ |