#include <sch_validators.h>
|
wxString | IsValid (const wxString &aVal) const override |
|
Definition at line 78 of file sch_validators.h.
◆ SCH_NETNAME_VALIDATOR() [1/3]
SCH_NETNAME_VALIDATOR::SCH_NETNAME_VALIDATOR |
( |
wxString * |
aVal = nullptr | ) |
|
|
inline |
◆ SCH_NETNAME_VALIDATOR() [2/3]
SCH_NETNAME_VALIDATOR::SCH_NETNAME_VALIDATOR |
( |
bool |
aAllowSpaces | ) |
|
|
inline |
◆ SCH_NETNAME_VALIDATOR() [3/3]
◆ Clone()
virtual wxObject* SCH_NETNAME_VALIDATOR::Clone |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ IsValid()
wxString SCH_NETNAME_VALIDATOR::IsValid |
( |
const wxString & |
aVal | ) |
const |
|
overrideprotected |
- Returns
- the error message if the contents of aVal are invalid.
Definition at line 209 of file sch_validators.cpp.
217 if( str.Length() == 1 )
226 return _(
"Signal name contains '{' and '}' but is not a valid bus name" );
228 else if( str.Contains(
'[' ) || str.Contains(
']' ) )
231 return _(
"Signal name contains '[' or ']' but is not a valid bus name." );
static bool ParseBusGroup(const wxString &aGroup, wxString *name, std::vector< wxString > *aMemberList)
Parse a bus group label into the name and a list of components.
static wxRegEx m_busGroupRegex
static bool ParseBusVector(const wxString &aBus, wxString *aName, std::vector< wxString > *aMemberList)
Parse a bus vector (e.g.
wxString IsValid(const wxString &aVal) const override
References _, NETNAME_VALIDATOR::IsValid(), m_busGroupRegex, NET_SETTINGS::ParseBusGroup(), and NET_SETTINGS::ParseBusVector().
◆ TransferFromWindow()
virtual bool NETNAME_VALIDATOR::TransferFromWindow |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ TransferToWindow()
virtual bool NETNAME_VALIDATOR::TransferToWindow |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ Validate()
bool NETNAME_VALIDATOR::Validate |
( |
wxWindow * |
aParent | ) |
|
|
overridevirtualinherited |
Definition at line 340 of file validators.cpp.
343 if ( !m_validatorWindow->IsEnabled() )
346 wxTextEntry *
const text = GetTextEntry();
351 const wxString& errormsg =
IsValid(
text->GetValue() );
353 if( !errormsg.empty() )
355 m_validatorWindow->SetFocus();
356 wxMessageBox( errormsg,
_(
"Invalid signal name" ), wxOK | wxICON_EXCLAMATION, aParent );
wxString IsValid(const wxString &aVal) const override
References _, NETNAME_VALIDATOR::IsValid(), and text.
◆ m_busGroupRegex
wxRegEx SCH_NETNAME_VALIDATOR::m_busGroupRegex |
|
staticprivate |
The documentation for this class was generated from the following files: