Browse Source
Remove basic masking class map_string_utf8
Remove basic masking class map_string_utf8
This is just std::map<std::string, UTF8>, using the class just masks what it is and adds unclear functions.jobs
85 changed files with 364 additions and 475 deletions
-
1common/CMakeLists.txt
-
15common/dialogs/dialog_plugin_options.cpp
-
6common/io/io_base.cpp
-
12common/lib_table_base.cpp
-
37common/string_utf8_map.cpp
-
2eeschema/cross-probing.cpp
-
4eeschema/dialogs/panel_sym_lib_table.cpp
-
2eeschema/files-io.cpp
-
2eeschema/project_rescue.cpp
-
3eeschema/project_rescue.h
-
2eeschema/sch_edit_frame.h
-
12eeschema/sch_io/altium/sch_io_altium.cpp
-
14eeschema/sch_io/altium/sch_io_altium.h
-
21eeschema/sch_io/cadstar/sch_io_cadstar_archive.cpp
-
12eeschema/sch_io/cadstar/sch_io_cadstar_archive.h
-
6eeschema/sch_io/database/sch_io_database.cpp
-
6eeschema/sch_io/database/sch_io_database.h
-
11eeschema/sch_io/eagle/sch_io_eagle.cpp
-
11eeschema/sch_io/eagle/sch_io_eagle.h
-
10eeschema/sch_io/easyeda/sch_io_easyeda.cpp
-
8eeschema/sch_io/easyeda/sch_io_easyeda.h
-
14eeschema/sch_io/easyedapro/sch_io_easyedapro.cpp
-
8eeschema/sch_io/easyedapro/sch_io_easyedapro.h
-
8eeschema/sch_io/http_lib/sch_io_http_lib.cpp
-
8eeschema/sch_io/http_lib/sch_io_http_lib.h
-
30eeschema/sch_io/kicad_legacy/sch_io_kicad_legacy.cpp
-
29eeschema/sch_io/kicad_legacy/sch_io_kicad_legacy.h
-
28eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr.cpp
-
27eeschema/sch_io/kicad_sexpr/sch_io_kicad_sexpr.h
-
2eeschema/sch_io/ltspice/sch_io_ltspice.cpp
-
2eeschema/sch_io/ltspice/sch_io_ltspice.h
-
19eeschema/sch_io/sch_io.cpp
-
18eeschema/sch_io/sch_io.h
-
2eeschema/sch_io/sch_io_mgr.cpp
-
3eeschema/sch_io/sch_io_mgr.h
-
11eeschema/symbol_library.cpp
-
3eeschema/symbol_library.h
-
4eeschema/symbol_library_manager.cpp
-
7include/dialogs/dialog_plugin_options.h
-
10include/io/io_base.h
-
13include/lib_table_base.h
-
60include/string_utf8_map.h
-
6kicad/import_proj.h
-
3pcbnew/cross-probing.cpp
-
4pcbnew/dialogs/panel_fp_lib_table.cpp
-
3pcbnew/exporters/board_exporter_base.h
-
7pcbnew/files.cpp
-
4pcbnew/kicad_clipboard.cpp
-
4pcbnew/kicad_clipboard.h
-
5pcbnew/pcb_edit_frame.h
-
2pcbnew/pcb_io/altium/pcb_io_altium_circuit_maker.cpp
-
2pcbnew/pcb_io/altium/pcb_io_altium_circuit_maker.h
-
2pcbnew/pcb_io/altium/pcb_io_altium_circuit_studio.cpp
-
2pcbnew/pcb_io/altium/pcb_io_altium_circuit_studio.h
-
6pcbnew/pcb_io/altium/pcb_io_altium_designer.cpp
-
6pcbnew/pcb_io/altium/pcb_io_altium_designer.h
-
2pcbnew/pcb_io/altium/pcb_io_solidworks.cpp
-
2pcbnew/pcb_io/altium/pcb_io_solidworks.h
-
18pcbnew/pcb_io/cadstar/pcb_io_cadstar_archive.cpp
-
8pcbnew/pcb_io/cadstar/pcb_io_cadstar_archive.h
-
18pcbnew/pcb_io/eagle/pcb_io_eagle.cpp
-
8pcbnew/pcb_io/eagle/pcb_io_eagle.h
-
6pcbnew/pcb_io/easyeda/pcb_io_easyeda_plugin.cpp
-
6pcbnew/pcb_io/easyeda/pcb_io_easyeda_plugin.h
-
11pcbnew/pcb_io/easyedapro/pcb_io_easyedapro.cpp
-
6pcbnew/pcb_io/easyedapro/pcb_io_easyedapro.h
-
2pcbnew/pcb_io/fabmaster/pcb_io_fabmaster.cpp
-
2pcbnew/pcb_io/fabmaster/pcb_io_fabmaster.h
-
14pcbnew/pcb_io/geda/pcb_io_geda.cpp
-
14pcbnew/pcb_io/geda/pcb_io_geda.h
-
3pcbnew/pcb_io/ipc2581/pcb_io_ipc2581.cpp
-
6pcbnew/pcb_io/ipc2581/pcb_io_ipc2581.h
-
11pcbnew/pcb_io/kicad_legacy/pcb_io_kicad_legacy.cpp
-
10pcbnew/pcb_io/kicad_legacy/pcb_io_kicad_legacy.h
-
30pcbnew/pcb_io/kicad_sexpr/pcb_io_kicad_sexpr.cpp
-
28pcbnew/pcb_io/kicad_sexpr/pcb_io_kicad_sexpr.h
-
2pcbnew/pcb_io/pcad/pcb_io_pcad.cpp
-
2pcbnew/pcb_io/pcad/pcb_io_pcad.h
-
23pcbnew/pcb_io/pcb_io.cpp
-
25pcbnew/pcb_io/pcb_io.h
-
6pcbnew/pcb_io/pcb_io_mgr.cpp
-
7pcbnew/pcb_io/pcb_io_mgr.h
-
3pcbnew/pcbnew_jobs_handler.cpp
-
3pcbnew/tools/pcb_control.cpp
-
4thirdparty/pybind11/tools/pybind11Config.cmake.in
@ -1,37 +0,0 @@ |
|||||
/*
|
|
||||
* This program source code file is part of KICAD, a free EDA CAD application. |
|
||||
* |
|
||||
* Copyright (C) 2016 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com> |
|
||||
* Copyright (C) 2016 Kicad Developers, see AUTHORS.txt for contributors. |
|
||||
* |
|
||||
* This program is free software; you can redistribute it and/or |
|
||||
* modify it under the terms of the GNU General Public License |
|
||||
* as published by the Free Software Foundation; either version 2 |
|
||||
* of the License, or (at your option) any later version. |
|
||||
* |
|
||||
* This program is distributed in the hope that it will be useful, |
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
* GNU General Public License for more details. |
|
||||
* |
|
||||
* You should have received a copy of the GNU General Public License along |
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||
*/ |
|
||||
|
|
||||
#include <string_utf8_map.h>
|
|
||||
|
|
||||
|
|
||||
bool STRING_UTF8_MAP::Value( const char* aName, UTF8* aFetchedValue ) const |
|
||||
{ |
|
||||
STRING_UTF8_MAP::const_iterator it = find( aName ); |
|
||||
|
|
||||
if( it != end() ) |
|
||||
{ |
|
||||
if( aFetchedValue ) |
|
||||
*aFetchedValue = it->second; |
|
||||
|
|
||||
return true; |
|
||||
} |
|
||||
|
|
||||
return false; |
|
||||
} |
|
||||
@ -1,60 +0,0 @@ |
|||||
#ifndef _PROPERTIES_H_ |
|
||||
#define _PROPERTIES_H_ |
|
||||
|
|
||||
/* |
|
||||
* This program source code file is part of KICAD, a free EDA CAD application. |
|
||||
* |
|
||||
* Copyright (C) 2016 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com> |
|
||||
* Copyright (C) 2016-2020 KiCad Developers, see AUTHORS.txt for contributors. |
|
||||
* |
|
||||
* This program is free software; you can redistribute it and/or |
|
||||
* modify it under the terms of the GNU General Public License |
|
||||
* as published by the Free Software Foundation; either version 2 |
|
||||
* of the License, or (at your option) any later version. |
|
||||
* |
|
||||
* This program is distributed in the hope that it will be useful, |
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
* GNU General Public License for more details. |
|
||||
* |
|
||||
* You should have received a copy of the GNU General Public License along |
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>. |
|
||||
*/ |
|
||||
|
|
||||
#include <string> |
|
||||
#include <map> |
|
||||
#include <core/utf8.h> |
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* A name/value tuple with unique names and optional values. The names |
|
||||
* may be iterated alphabetically. |
|
||||
*/ |
|
||||
class STRING_UTF8_MAP : public std::map< std::string, UTF8 > |
|
||||
{ |
|
||||
public: |
|
||||
bool Clear( const std::string& aProperty ) |
|
||||
{ |
|
||||
return erase( aProperty ) > 0; |
|
||||
} |
|
||||
|
|
||||
bool Exists( const std::string& aProperty ) const |
|
||||
{ |
|
||||
return count( aProperty ) > 0; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* Fetch a property by \a aName and returns true if that property was found, else false. |
|
||||
* If not found, \a aFetchedValue is not touched. |
|
||||
* |
|
||||
* @param aName is the property or option to look for. |
|
||||
* @param aFetchedValue is where to put the value of the property if it exists and |
|
||||
* \a aFetchedValue is not NULL. |
|
||||
* @return true if property is found, else false. |
|
||||
*/ |
|
||||
bool Value( const char* aName, UTF8* aFetchedValue = nullptr ) const; |
|
||||
}; |
|
||||
|
|
||||
#endif // _PROPERTIES_H_ |
|
||||
|
|
||||
// LocalWords: aName aFetchedValue |
|
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue