LibreOffice Module reportdesign (master) 1
conditionalexpression.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#ifndef INCLUDED_REPORTDESIGN_INC_CONDITIONALEXPRESSION_HXX
21#define INCLUDED_REPORTDESIGN_INC_CONDITIONALEXPRESSION_HXX
22
23#include "dllapi.h"
24
25#include <rtl/ustring.hxx>
26#include <map>
27#include <memory>
28
29namespace rptui
30{
31
32
33 // = ConditionalExpression
34
36 {
37 private:
38 const OUString m_sPattern;
39
40 public:
41 ConditionalExpression( const char* _pAsciiPattern );
42
45 OUString assembleExpression( const OUString& _rFieldDataSource, const OUString& _rLHS, const OUString& _rRHS ) const;
46
60 bool matchExpression( std::u16string_view _rExpression, const std::u16string_view _rFieldDataSource, OUString& _out_rLHS, OUString& _out_rRHS ) const;
61 };
62
63
64 //= ConditionType
65
67 {
69 eExpression = 1
70 };
71
72
73 //= ComparisonOperation
74
76 {
84 eLessOrEqual = 7
85 };
86
87 typedef std::shared_ptr< ConditionalExpression > PConditionalExpression;
88 typedef ::std::map< ComparisonOperation, PConditionalExpression > ConditionalExpressions;
89
90
91 // = ConditionalExpressionFactory
92
94 {
95 public:
97 static size_t getKnownConditionalExpressions( ConditionalExpressions& _out_rCondExp );
98
99 private:
102 };
103
104} // namespace rptui
105
106
107#endif // INCLUDED_REPORTDESIGN_INC_CONDITIONALEXPRESSION_HXX
108
109/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ConditionalExpressionFactory(const ConditionalExpressionFactory &)=delete
ConditionalExpressionFactory & operator=(const ConditionalExpressionFactory &)=delete
#define REPORTDESIGN_DLLPUBLIC
Definition: dllapi.h:28
std::shared_ptr< ConditionalExpression > PConditionalExpression
::std::map< ComparisonOperation, PConditionalExpression > ConditionalExpressions