Kactus2
Kactus2 reference guide
Loading...
Searching...
No Matches
utils.h
Go to the documentation of this file.
1/*
2 *
3 * Created on: 7.2.2011
4 * Author: Antti Kamppi
5 * filename: utils.h
6 *
7 * Description: This file contains declarations for general purpose
8 * functions that can be used in the whole software.
9 */
10
11#ifndef UTILS_H
12#define UTILS_H
13
14#include <KactusAPI/KactusAPIGlobal.h>
15
16#include <QObject>
17#include <QRegularExpression>
18
19namespace Utils
20{
23 {
25 bool hw_{ true };
26
28 bool sw_{ true };
29
31 bool system_{ true };
32
37 KACTUS2_API ImplementationOptions() = default;
38 };
39
42 {
44 bool flat_{ true };
45
47 bool product_{ true };
48
50 bool board_{ true };
51
53 bool chip_{ true };
54
56 bool soc_{ true };
57
59 bool ip_{ true };
60
65 KACTUS2_API HierarchyOptions() = default;
66 };
67
70 {
72 bool templates_{ true };
73
75 bool mutable_{ true };
76
78 bool fixed_{ true };
79
84 KACTUS2_API FirmnessOptions() = default;
85 };
86
89 {
91 bool components_{ true };
92
94 bool buses_{ true };
95
97 bool catalogs_{ true };
98
100 bool apis_{ true };
101
103 bool advanced_{ true };
104
109 KACTUS2_API TypeOptions() = default;
110 };
111
113 {
115 bool valid_{ true };
116
118 bool invalid_{ true };
119
124 KACTUS2_API ValidityOptions() = default;
125 };
126
128 {
130 bool std14_{ true };
131
133 bool std22_{ true };
134
139 KACTUS2_API RevisionOptions() = default;
140 };
141
168
169
171 inline const QRegularExpression URL_VALIDITY_REG_EXP(
172 "^[a-z]{3,9}[:][/]{2}[a-z0-9]+([-.][a-z0-9]+)*([/][-a-z0-9_.;,?=&%#~+]*)*$",
173 QRegularExpression::CaseInsensitiveOption);
174
178 KACTUS2_API QString getCurrentUser();
179}
180
181#endif // UTILS_H
Definition utils.h:20
KACTUS2_API QString getCurrentUser()
const QRegularExpression URL_VALIDITY_REG_EXP("^[a-z]{3,9}[:][/]{2}[a-z0-9]+([-.][a-z0-9]+)*([/][-a-z0-9_.;,?=&%#~+]*)*$", QRegularExpression::CaseInsensitiveOption)
Regular expression to validate URLs.
Utils::TypeOptions type
Contains Type settings.
Definition utils.h:145
Utils::ValidityOptions validity
Contains Validity settings.
Definition utils.h:160
Utils::HierarchyOptions hierarchy
Contains Hierarchy settings.
Definition utils.h:151
Utils::RevisionOptions revision
Contains Revision settings.
Definition utils.h:157
Utils::ImplementationOptions implementation
Contains Implementation settings.
Definition utils.h:148
Utils::FirmnessOptions firmness
Contains Firmness settings.
Definition utils.h:154
KACTUS2_API FilterOptions()=default
Contains the Re-usability search filters.
Definition utils.h:70
bool mutable_
If true then mutables should be included in search.
Definition utils.h:75
bool templates_
If true then templates should be included in search.
Definition utils.h:72
KACTUS2_API FirmnessOptions()=default
bool fixed_
If true then fixeds should be included in search.
Definition utils.h:78
Contains the search settings for hierarchy.
Definition utils.h:42
bool product_
If true then product objects should be included in search.
Definition utils.h:47
bool board_
If true then board objects should be included in search.
Definition utils.h:50
bool chip_
If true then chip objects should be included in search.
Definition utils.h:53
bool ip_
If true then ip objects should be included in search.
Definition utils.h:59
KACTUS2_API HierarchyOptions()=default
bool flat_
If true then global objects should be included in search.
Definition utils.h:44
bool soc_
If true then soc objects should be included in search.
Definition utils.h:56
Contains firmness search settings.
Definition utils.h:23
bool system_
If true then system components should be included in search.
Definition utils.h:31
bool sw_
If true then software components should be included in search.
Definition utils.h:28
bool hw_
If true then hardware components should be included in search.
Definition utils.h:25
KACTUS2_API ImplementationOptions()=default
bool std14_
If true then 2014 std objects should be included in search.
Definition utils.h:130
bool std22_
If true then 2022 std objects should be included in search.
Definition utils.h:133
KACTUS2_API RevisionOptions()=default
Contains the search options for document types.
Definition utils.h:89
bool components_
If true then components should be included in search.
Definition utils.h:91
KACTUS2_API TypeOptions()=default
bool buses_
If true then bus definitions should be included in search.
Definition utils.h:94
bool apis_
If true then APIs/Coms should be included in search.
Definition utils.h:100
bool advanced_
If true then other IP-Xact types should be included in search.
Definition utils.h:103
bool catalogs_
If true then catalogs should be included in search.
Definition utils.h:97
bool invalid_
If true then invalid objects should be included in search.
Definition utils.h:118
bool valid_
If true then valid objects should be included in search.
Definition utils.h:115
KACTUS2_API ValidityOptions()=default