KiCad PCB EDA Suite
tool_event.cpp File Reference
#include <cstring>
#include <string>
#include <tool/tool_event.h>
#include <tool/tool_action.h>
#include <tool/tool_manager.h>
#include <tool/actions.h>
#include <cassert>

Go to the source code of this file.

Classes

struct  FlagString
 

Functions

static const std::string flag2string (int aFlag, const FlagString *aExps)
 

Function Documentation

◆ flag2string()

static const std::string flag2string ( int  aFlag,
const FlagString aExps 
)
static

Definition at line 46 of file tool_event.cpp.

47 {
48  std::string rv;
49 
50  for( int i = 0; aExps[i].str.length(); i++ )
51  {
52  if( aExps[i].flag & aFlag )
53  rv += aExps[i].str + " ";
54  }
55 
56  return rv;
57 }
std::string str
Definition: tool_event.cpp:42

References flag, and FlagString::str.

Referenced by TOOL_EVENT::Format().