PageRenderTime 18ms CodeModel.GetById 10ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 1ms

/Src/Dependencies/Boost/boost/interprocess/allocators/detail/node_tools.hpp

http://hadesmem.googlecode.com/
C++ Header | 50 lines | 27 code | 12 blank | 11 comment | 1 complexity | 6f3355bf9fd257b15a7a32d86b13d1d1 MD5 | raw file
 1//////////////////////////////////////////////////////////////////////////////
 2//
 3// (C) Copyright Ion Gaztanaga 2007-2009. Distributed under the Boost
 4// Software License, Version 1.0. (See accompanying file
 5// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 6//
 7// See http://www.boost.org/libs/interprocess for documentation.
 8//
 9//////////////////////////////////////////////////////////////////////////////
10
11#ifndef BOOST_INTERPROCESS_DETAIL_NODE_TOOLS_HPP
12#define BOOST_INTERPROCESS_DETAIL_NODE_TOOLS_HPP
13
14#if (defined _MSC_VER) && (_MSC_VER >= 1200)
15#  pragma once
16#endif
17
18#include <boost/interprocess/detail/config_begin.hpp>
19#include <boost/interprocess/detail/workaround.hpp>
20
21#include <boost/intrusive/slist.hpp>
22
23namespace boost {
24namespace interprocess {
25namespace detail {
26
27
28template<class VoidPointer>
29struct node_slist
30{
31   //This hook will be used to chain the individual nodes
32    typedef typename bi::make_slist_base_hook
33      <bi::void_pointer<VoidPointer>, bi::link_mode<bi::normal_link> >::type slist_hook_t;
34
35   //A node object will hold node_t when it's not allocated
36   struct node_t
37      :  public slist_hook_t
38   {};
39
40   typedef typename bi::make_slist
41      <node_t, bi::linear<true>, bi::base_hook<slist_hook_t> >::type node_slist_t;
42};
43
44}  //namespace detail {
45}  //namespace interprocess {
46}  //namespace boost {
47
48#include <boost/interprocess/detail/config_end.hpp>
49
50#endif   //#ifndef BOOST_INTERPROCESS_DETAIL_NODE_TOOLS_HPP