Add 'clear-routes'.

This commit is contained in:
Eitaro Fukamachi 2018-09-17 00:31:56 +09:00
parent 24350cef2d
commit 286230082a
2 changed files with 6 additions and 0 deletions

View file

@ -14,6 +14,7 @@
(:import-from :map-set
:map-set-index)
(:export :mapper
:clear-routes
:make-mapper
:mapper-routes
:member-route
@ -25,6 +26,9 @@
(defstruct mapper
(%routes (make-collector)))
(defun clear-routes (mapper)
(setf (mapper-%routes mapper) (make-collector)))
(defun mapper-routes (mapper)
(funcall (mapper-%routes mapper)))

View file

@ -3,6 +3,7 @@
(:use :cl)
(:import-from :myway.mapper
:mapper
:clear-routes
:mapper-routes
:make-mapper
:member-route
@ -27,6 +28,7 @@
:to-app
:mapper
:clear-routes
:mapper-routes
:add-route
:find-route