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
36
37wxValidator* RoutePointNameValidator::Clone() const {
38 return new RoutePointNameValidator(m_wp_ptr);
39}
40
44wxString RoutePointNameValidator::IsValid(const wxString& val) const {
45 Route* route = FindRouteContainingWaypoint(m_wp_ptr);
46 return route ? route->IsPointNameValid(m_wp_ptr, val) : "";
47}
Route point name validator.
wxValidator * Clone() const override
Member to implement the instance clone.
RoutePointNameValidator(RoutePoint *wp_ptr)
wxString IsValid(const wxString &val) const override
Validate route point name.
Represents a waypoint or mark within the navigation system.
Definition route_point.h:71
Represents a navigational route in the navigation system.
Definition route.h:99
Base class for member to implement validation rules.
Definition field_text.h:73
Route abstraction.
Route dialog validation checks.
Route Manager.