LibreOffice Module connectivity (master) 1
macabcondition.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <sal/config.h>
23
24#include <string_view>
25
26#include "MacabHeader.hxx"
27#include "MacabRecord.hxx"
28
30
31namespace connectivity::macab
32{
33
35{
36 public:
37 virtual ~MacabCondition();
38 virtual bool isAlwaysTrue() const = 0;
39 virtual bool isAlwaysFalse() const = 0;
40 virtual bool eval(const MacabRecord *aRecord) const = 0;
41};
42
44{
45 protected:
47
48 public:
49 explicit MacabConditionConstant(const bool bValue);
50 virtual bool isAlwaysTrue() const override;
51 virtual bool isAlwaysFalse() const override;
52 virtual bool eval(const MacabRecord *aRecord) const override;
53};
54
56{
57 protected:
58 sal_Int32 m_nFieldNumber;
59
60 public:
63 const MacabHeader *header,
64 std::u16string_view sColumnName);
65 virtual bool isAlwaysTrue() const override;
66 virtual bool isAlwaysFalse() const override;
67};
68
70{
71 public:
74 const MacabHeader *header,
75 std::u16string_view sColumnName);
76 virtual bool eval(const MacabRecord *aRecord) const override;
77};
78
80{
81 public:
84 const MacabHeader *header,
85 std::u16string_view sColumnName);
86 virtual bool eval(const MacabRecord *aRecord) const override;
87};
88
90{
91 protected:
92 const OUString m_sMatchString;
93
94 public:
97 const MacabHeader *header,
98 std::u16string_view sColumnName,
99 const OUString &sMatchString);
100};
101
103{
104 public:
107 const MacabHeader *header,
108 std::u16string_view sColumnName,
109 const OUString &sMatchString);
110 virtual bool eval(const MacabRecord *aRecord) const override;
111};
112
114{
115 public:
118 const MacabHeader *header,
119 std::u16string_view sColumnName,
120 const OUString &sMatchString);
121 virtual bool eval(const MacabRecord *aRecord) const override;
122};
123
125{
126 public:
129 const MacabHeader *header,
130 std::u16string_view sColumnName,
131 const OUString &sMatchString);
132 virtual bool eval(const MacabRecord *aRecord) const override;
133};
134
136{
137 protected:
139
140 public:
142 virtual ~MacabConditionBoolean() override;
143};
144
146{
147 public:
149 virtual bool isAlwaysTrue() const override;
150 virtual bool isAlwaysFalse() const override;
151 virtual bool eval(const MacabRecord *aRecord) const override;
152};
153
155{
156 public:
158 virtual bool isAlwaysTrue() const override;
159 virtual bool isAlwaysFalse() const override;
160 virtual bool eval(const MacabRecord *aRecord) const override;
161};
162
163}
164
165/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
constexpr sal_Int8 header[]
MacabConditionAnd(MacabCondition *pLeft, MacabCondition *pRight)
virtual bool isAlwaysTrue() const override
virtual bool isAlwaysFalse() const override
virtual bool eval(const MacabRecord *aRecord) const override
MacabConditionBoolean(MacabCondition *pLeft, MacabCondition *pRight)
virtual bool isAlwaysTrue() const override
virtual bool isAlwaysFalse() const override
MacabConditionColumn(const MacabHeader *header, std::u16string_view sColumnName)
MacabConditionCompare(const MacabHeader *header, std::u16string_view sColumnName, const OUString &sMatchString)
virtual bool isAlwaysFalse() const override
virtual bool eval(const MacabRecord *aRecord) const override
virtual bool isAlwaysTrue() const override
MacabConditionDifferent(const MacabHeader *header, std::u16string_view sColumnName, const OUString &sMatchString)
virtual bool eval(const MacabRecord *aRecord) const override
MacabConditionEqual(const MacabHeader *header, std::u16string_view sColumnName, const OUString &sMatchString)
virtual bool eval(const MacabRecord *aRecord) const override
virtual bool eval(const MacabRecord *aRecord) const override
MacabConditionNotNull(const MacabHeader *header, std::u16string_view sColumnName)
virtual bool eval(const MacabRecord *aRecord) const override
MacabConditionNull(const MacabHeader *header, std::u16string_view sColumnName)
virtual bool isAlwaysFalse() const override
virtual bool eval(const MacabRecord *aRecord) const override
MacabConditionOr(MacabCondition *pLeft, MacabCondition *pRight)
virtual bool isAlwaysTrue() const override
MacabConditionSimilar(const MacabHeader *header, std::u16string_view sColumnName, const OUString &sMatchString)
virtual bool eval(const MacabRecord *aRecord) const override
virtual bool isAlwaysFalse() const =0
virtual bool isAlwaysTrue() const =0
virtual bool eval(const MacabRecord *aRecord) const =0