18dffb485Schristos /* GDB wrapper for splay trees. 28dffb485Schristos 3*5ba1f45fSchristos Copyright (C) 2017-2024 Free Software Foundation, Inc. 48dffb485Schristos 58dffb485Schristos This file is part of GDB. 68dffb485Schristos 78dffb485Schristos This program is free software; you can redistribute it and/or modify 88dffb485Schristos it under the terms of the GNU General Public License as published by 98dffb485Schristos the Free Software Foundation; either version 3 of the License, or 108dffb485Schristos (at your option) any later version. 118dffb485Schristos 128dffb485Schristos This program is distributed in the hope that it will be useful, 138dffb485Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 148dffb485Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 158dffb485Schristos GNU General Public License for more details. 168dffb485Schristos 178dffb485Schristos You should have received a copy of the GNU General Public License 188dffb485Schristos along with this program. If not, see <http://www.gnu.org/licenses/>. */ 198dffb485Schristos 208dffb485Schristos #ifndef COMMON_GDB_SPLAY_TREE_H 218dffb485Schristos #define COMMON_GDB_SPLAY_TREE_H 228dffb485Schristos 238dffb485Schristos #include "splay-tree.h" 248dffb485Schristos 258dffb485Schristos namespace gdb { 268dffb485Schristos 278dffb485Schristos struct splay_tree_deleter 288dffb485Schristos { 298dffb485Schristos void operator() (splay_tree tree) const 308dffb485Schristos { 318dffb485Schristos splay_tree_delete (tree); 328dffb485Schristos } 338dffb485Schristos }; 348dffb485Schristos 358dffb485Schristos } /* namespace gdb */ 368dffb485Schristos 378dffb485Schristos /* A unique pointer to a splay tree. */ 388dffb485Schristos 398dffb485Schristos typedef std::unique_ptr<splay_tree_s, gdb::splay_tree_deleter> 408dffb485Schristos gdb_splay_tree_up; 418dffb485Schristos 428dffb485Schristos #endif /* COMMON_GDB_SPLAY_TREE_H */ 43