lifetime_default.hpp 1.46 KB
Newer Older
jpbl's avatar
jpbl committed
1
2
/*
 *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
3
 *
jpbl's avatar
jpbl committed
4
 *    Permission is hereby granted, free of charge, to any person obtaining
5
6
 *    a copy of this software and associated documentation files
 *    (cURLpp), to deal in the Software without restriction,
jpbl's avatar
jpbl committed
7
8
 *    including without limitation the rights to use, copy, modify, merge,
 *    publish, distribute, sublicense, and/or sell copies of the Software,
9
 *    and to permit persons to whom the Software is furnished to do so,
jpbl's avatar
jpbl committed
10
 *    subject to the following conditions:
11
 *
jpbl's avatar
jpbl committed
12
13
 *    The above copyright notice and this permission notice shall be included
 *    in all copies or substantial portions of the Software.
14
 *
jpbl's avatar
jpbl committed
15
16
 *    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 *    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
18
19
 *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
jpbl's avatar
jpbl committed
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
 *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

#ifndef LIFETIME_DEFAULT_HPP
#define LIFETIME_DEFAULT_HPP

namespace utilspp
{
   template< typename T >
   class LifetimeDefault
   {
      public:
         static void scheduleDestruction( T *obj, void (*func)() );
         static void onDeadReference();
   };
jpbl's avatar
jpbl committed
36
}
jpbl's avatar
jpbl committed
37

38
#include "lifetime_default.inl"
jpbl's avatar
jpbl committed
39
40

#endif