KiCad PCB EDA Suite
wx_stl_compat.h File Reference
#include <wx/gdicmn.h>
#include <wx/string.h>

Go to the source code of this file.

Classes

struct  std::hash< wxString >
 
struct  std::hash< wxPoint >
 
struct  std::less< wxPoint >
 

Namespaces

 std
 

Macros

#define USE_KICAD_WXSTRING_HASH
 Template specialization to enable wxStrings for certain containers (e.g. unordered_map) More...
 
#define USE_KICAD_WXPOINT_LESS_AND_HASH
 Required to use wxPoint as key type in maps. More...
 

Functions

std::ostream & operator<< (std::ostream &out, const wxSize &size)
 Helper function to print the given wxSize to a stream. More...
 
std::ostream & operator<< (std::ostream &out, const wxPoint &pt)
 Helper function to print the given wxPoint to a stream. More...
 

Macro Definition Documentation

◆ USE_KICAD_WXPOINT_LESS_AND_HASH

#define USE_KICAD_WXPOINT_LESS_AND_HASH

Required to use wxPoint as key type in maps.

Definition at line 41 of file wx_stl_compat.h.

◆ USE_KICAD_WXSTRING_HASH

#define USE_KICAD_WXSTRING_HASH

Template specialization to enable wxStrings for certain containers (e.g. unordered_map)

Definition at line 29 of file wx_stl_compat.h.

Function Documentation

◆ operator<<() [1/2]

std::ostream& operator<< ( std::ostream &  out,
const wxSize &  size 
)

Helper function to print the given wxSize to a stream.

Used for debugging functions like EDA_ITEM::Show and also in unit testing fixtures.

Definition at line 52 of file wx_stl_compat.cpp.

53 {
54  out << " width=\"" << size.GetWidth() << "\" height=\"" << size.GetHeight() << "\"";
55  return out;
56 }

◆ operator<<() [2/2]

std::ostream& operator<< ( std::ostream &  out,
const wxPoint &  pt 
)

Helper function to print the given wxPoint to a stream.

Used for debugging functions like EDA_ITEM::Show and also in unit testing fixtures.

Definition at line 59 of file wx_stl_compat.cpp.

60 {
61  out << " x=\"" << pt.x << "\" y=\"" << pt.y << "\"";
62  return out;
63 }