KiCad PCB EDA Suite
Loading...
Searching...
No Matches
altium_props_utils.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 (C) 2019-2020 Thomas Pointhuber <[email protected]>
5 * Copyright (C) 2020-2024 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#ifndef _ALTIUM_PROPS_UTILS_H
26#define _ALTIUM_PROPS_UTILS_H
27
28#include <stdint.h>
29#include <map>
30
31#include <wx/string.h>
32
33
35{
36public:
37 static int32_t ConvertToKicadUnit( const double aValue );
38
39 static int ReadInt( const std::map<wxString, wxString>& aProps, const wxString& aKey,
40 int aDefault );
41
42 static double ReadDouble( const std::map<wxString, wxString>& aProps, const wxString& aKey,
43 double aDefault );
44
45 static bool ReadBool( const std::map<wxString, wxString>& aProps, const wxString& aKey,
46 bool aDefault );
47
48 static int32_t ReadKicadUnit( const std::map<wxString, wxString>& aProps, const wxString& aKey,
49 const wxString& aDefault );
50
51 static wxString ReadString( const std::map<wxString, wxString>& aProps, const wxString& aKey,
52 const wxString& aDefault );
53
54 static wxString ReadUnicodeString( const std::map<wxString, wxString>& aProps,
55 const wxString& aKey, const wxString& aDefault );
56};
57
58#endif //_ALTIUM_PROPS_UTILS_H
static int ReadInt(const std::map< wxString, wxString > &aProps, const wxString &aKey, int aDefault)
static int32_t ReadKicadUnit(const std::map< wxString, wxString > &aProps, const wxString &aKey, const wxString &aDefault)
static bool ReadBool(const std::map< wxString, wxString > &aProps, const wxString &aKey, bool aDefault)
static wxString ReadUnicodeString(const std::map< wxString, wxString > &aProps, const wxString &aKey, const wxString &aDefault)
static wxString ReadString(const std::map< wxString, wxString > &aProps, const wxString &aKey, const wxString &aDefault)
static double ReadDouble(const std::map< wxString, wxString > &aProps, const wxString &aKey, double aDefault)
static int32_t ConvertToKicadUnit(const double aValue)