OpenCPN Partial API docs
Loading...
Searching...
No Matches
route_validator.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
* Copyright (C) 2022 by David S. Register *
3
* *
4
* This program is free software; you can redistribute it and/or modify *
5
* it under the terms of the GNU General Public License as published by *
6
* the Free Software Foundation; either version 2 of the License, or *
7
* (at your option) any later version. *
8
* *
9
* This program is distributed in the hope that it will be useful, *
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12
* GNU General Public License for more details. *
13
* *
14
* You should have received a copy of the GNU General Public License *
15
* along with this program; if not, see <https://www.gnu.org/licenses/>. *
16
**************************************************************************/
17
24
#include "
route_validator.h
"
25
26
#include "
model/routeman.h
"
27
#include "
model/route.h
"
28
32
RoutePointNameValidator::RoutePointNameValidator
(
RoutePoint
* wp_ptr)
33
:
TextValidator
() {
34
m_wp_ptr = wp_ptr;
35
}
36
37
wxValidator*
RoutePointNameValidator::Clone
()
const
{
38
return
new
RoutePointNameValidator
(m_wp_ptr);
39
}
40
44
wxString
RoutePointNameValidator::IsValid
(
const
wxString& val)
const
{
45
Route
* route = FindRouteContainingWaypoint(m_wp_ptr);
46
return
route ? route->IsPointNameValid(m_wp_ptr, val) :
""
;
47
}
RoutePointNameValidator
Route point name validator.
Definition
route_validator.h:37
RoutePointNameValidator::Clone
wxValidator * Clone() const override
Member to implement the instance clone.
Definition
route_validator.cpp:37
RoutePointNameValidator::RoutePointNameValidator
RoutePointNameValidator(RoutePoint *wp_ptr)
Definition
route_validator.cpp:32
RoutePointNameValidator::IsValid
wxString IsValid(const wxString &val) const override
Validate route point name.
Definition
route_validator.cpp:44
RoutePoint
Represents a waypoint or mark within the navigation system.
Definition
route_point.h:71
Route
Represents a navigational route in the navigation system.
Definition
route.h:99
TextValidator
Base class for member to implement validation rules.
Definition
field_text.h:73
route.h
Route abstraction.
route_validator.h
Route dialog validation checks.
routeman.h
Route Manager.
gui
src
route_validator.cpp
Generated on Fri Oct 10 2025 02:28:05 for OpenCPN Partial API docs by
1.9.8