Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Roqc/ide/rocqide/   (Beweissystem des Inria Version 9.1.0©)  Datei vom 15.8.2025 mit Größe 1 kB image not shown  

Quelle  wg_RoutedMessageViews.ml   Sprache: SML

 
(************************************************************************)
(*         *      The Rocq Prover / The Rocq Development Team           *)
(*  v      *         Copyright INRIA, CNRS and contributors             *)
(* <O___,, * (see version control and CREDITS file for authors & dates) *)
(*   \VV/  **************************************************************)
(*    //   *    This file is distributed under the terms of the         *)
(*         *     GNU Lesser General Public License Version 2.1          *)
(*         *     (see LICENSE file for the text of the license)         *)
(************************************************************************)

class type message_views_router = object
  method route : int -> Wg_MessageView.message_view
  method default_route : Wg_MessageView.message_view

  method select_all : unit -> unit
  method has_selection : bool
  method get_selected_text : string

  method register_route : int -> Wg_MessageView.message_view -> unit
  method delete_route : int -> unit
end

let message_views ~route_0 : message_views_router =
  let route_table = Hashtbl.create 17 in
  let () = Hashtbl.add route_table 0 route_0 in
object
  method route i =
    try Hashtbl.find route_table i
    with Not_found ->
      (* at least the message will be printed somewhere*)
      Hashtbl.find route_table 0

  method default_route = route_0

  method register_route i mv = Hashtbl.add route_table i mv

  method delete_route i = Hashtbl.remove route_table i

  method select_all () = Hashtbl.iter (fun _ v -> v#select_all ()) route_table

  method has_selection =
    Hashtbl.fold (fun _ v -> (||) v#has_selection) route_table false

  method get_selected_text =
    Option.default ""
      (Hashtbl.fold (fun _ v acc ->
         if v#has_selection then Some v#get_selected_text else acc)
      route_table None)

end

98%


¤ Dauer der Verarbeitung: 0.5 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.