KiCad PCB EDA Suite
Loading...
Searching...
No Matches
eda_search_data.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef EDA_ITEM_SEARCH_H
21#define EDA_ITEM_SEARCH_H
22
23#include <wx/log.h>
24#include <wx/regex.h>
25#include <wx/string.h>
26
35
37{
38 wxString findString;
39 wxString replaceString;
40
41 mutable wxRegEx regex;
42 mutable wxString regex_string;
43
47
51
53 findString(),
55 searchAndReplace( false ),
56 searchAllFields( false ),
57 searchMetadata( false ),
58 matchCase( false ),
59 markersOnly( false ),
61 {
62 }
63
64 // Need an explicit copy constructor because wxRegEx is not copyable
66 findString( other.findString ),
72 matchCase( other.matchCase ),
73 markersOnly( other.markersOnly ),
74 matchMode( other.matchMode )
75 {
77 {
78 wxLogNull noLogs;
79 regex.Compile( findString, matchCase ? wxRE_DEFAULT : wxRE_ICASE );
80 }
81 }
82
83 virtual ~EDA_SEARCH_DATA() {}
84};
85
105
106#endif
EDA_SEARCH_MATCH_MODE
EDA_SEARCH_MATCH_MODE matchMode
EDA_SEARCH_DATA(const EDA_SEARCH_DATA &other)
virtual ~EDA_SEARCH_DATA()