//===-- Baton.h -------------------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLDB_UTILITY_BATON_H #define LLDB_UTILITY_BATON_H #include "lldb/lldb-enumerations.h" #include "lldb/lldb-public.h" #include "llvm/Support/raw_ostream.h" #include <memory> namespace lldb_private { class Stream; } namespace lldb_private { /// \class Baton Baton.h "lldb/Core/Baton.h" /// A class designed to wrap callback batons so they can cleanup /// any acquired resources /// /// This class is designed to be used by any objects that have a callback /// function that takes a baton where the baton might need to /// free/delete/close itself. /// /// The default behavior is to not free anything. Subclasses can free any /// needed resources in their destructors. class Baton { … }; class UntypedBaton : public Baton { … }; template <typename T> class TypedBaton : public Baton { … }; } // namespace lldb_private #endif // LLDB_UTILITY_BATON_H