type-ptr.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 //
7 
8 #ifndef SOCI_TYPE_PTR_H_INCLUDED
9 #define SOCI_TYPE_PTR_H_INCLUDED
10 
11 namespace soci { namespace details {
12 
13 template <typename T>
14 class type_ptr
15 {
16 public:
17  type_ptr(T * p) : p_(p) {}
18  ~type_ptr() { delete p_; }
19 
20  T * get() const { return p_; }
21  void release() const { p_ = 0; }
22 
23 private:
24  mutable T * p_;
25 };
26 
27 } // namespace details
28 } // namespace soci
29 
30 #endif // SOCI_TYPE_PTR_H_INCLUDED
void release() const
Definition: type-ptr.h:21


asr_lib_ism
Author(s): Hanselmann Fabian, Heller Florian, Heizmann Heinrich, Kübler Marcel, Mehlhaus Jonas, Meißner Pascal, Qattan Mohamad, Reckling Reno, Stroh Daniel
autogenerated on Wed Jan 8 2020 04:02:41