/Src/Dependencies/Boost/boost/interprocess/interprocess_fwd.hpp

http://hadesmem.googlecode.com/ · C++ Header · 423 lines · 227 code · 108 blank · 88 comment · 4 complexity · 9e158e82b29d2a6266608da6433b324c MD5 · raw file

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // (C) Copyright Ion Gaztanaga 2005-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. #ifndef BOOST_INTERPROCESS_FWD_HPP
  11. #define BOOST_INTERPROCESS_FWD_HPP
  12. #if defined (_MSC_VER) && (_MSC_VER >= 1200)
  13. # pragma once
  14. #endif
  15. #include <boost/interprocess/detail/config_begin.hpp>
  16. #include <boost/interprocess/detail/workaround.hpp>
  17. #include <cstddef>
  18. //////////////////////////////////////////////////////////////////////////////
  19. // Standard predeclarations
  20. //////////////////////////////////////////////////////////////////////////////
  21. /// @cond
  22. namespace boost{
  23. namespace intrusive{
  24. }}
  25. namespace boost{
  26. namespace interprocess{
  27. namespace bi = boost::intrusive;
  28. }}
  29. namespace std {
  30. template <class T>
  31. class allocator;
  32. template <class T>
  33. struct less;
  34. template <class T1, class T2>
  35. struct pair;
  36. template <class CharType>
  37. struct char_traits;
  38. } //namespace std {
  39. /// @endcond
  40. namespace boost { namespace interprocess {
  41. //////////////////////////////////////////////////////////////////////////////
  42. // permissions
  43. //////////////////////////////////////////////////////////////////////////////
  44. class permissions;
  45. //////////////////////////////////////////////////////////////////////////////
  46. // shared_memory
  47. //////////////////////////////////////////////////////////////////////////////
  48. class shared_memory_object;
  49. #if defined (BOOST_INTERPROCESS_WINDOWS) || defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
  50. class windows_shared_memory;
  51. #endif //#if defined (BOOST_INTERPROCESS_WINDOWS)
  52. //////////////////////////////////////////////////////////////////////////////
  53. // mapped file/mapped region/mapped_file
  54. //////////////////////////////////////////////////////////////////////////////
  55. class file_mapping;
  56. class mapped_region;
  57. class mapped_file;
  58. //////////////////////////////////////////////////////////////////////////////
  59. // Mutexes
  60. //////////////////////////////////////////////////////////////////////////////
  61. class null_mutex;
  62. class interprocess_mutex;
  63. class interprocess_recursive_mutex;
  64. class named_mutex;
  65. class named_recursive_mutex;
  66. class interprocess_semaphore;
  67. class named_semaphore;
  68. //////////////////////////////////////////////////////////////////////////////
  69. // Mutex families
  70. //////////////////////////////////////////////////////////////////////////////
  71. struct mutex_family;
  72. struct null_mutex_family;
  73. //////////////////////////////////////////////////////////////////////////////
  74. // Other synchronization classes
  75. //////////////////////////////////////////////////////////////////////////////
  76. class barrier;
  77. class interprocess_sharable_mutex;
  78. class interprocess_condition;
  79. //////////////////////////////////////////////////////////////////////////////
  80. // Locks
  81. //////////////////////////////////////////////////////////////////////////////
  82. template <class Mutex>
  83. class scoped_lock;
  84. template <class SharableMutex>
  85. class sharable_lock;
  86. template <class UpgradableMutex>
  87. class upgradable_lock;
  88. //////////////////////////////////////////////////////////////////////////////
  89. // STL compatible allocators
  90. //////////////////////////////////////////////////////////////////////////////
  91. template<class T, class SegmentManager>
  92. class allocator;
  93. template<class T, class SegmentManager, std::size_t NodesPerBlock = 64>
  94. class node_allocator;
  95. template<class T, class SegmentManager, std::size_t NodesPerBlock = 64>
  96. class private_node_allocator;
  97. template<class T, class SegmentManager, std::size_t NodesPerBlock = 64>
  98. class cached_node_allocator;
  99. template<class T, class SegmentManager, std::size_t NodesPerBlock = 64, std::size_t MaxFreeBlocks = 2
  100. , unsigned char OverheadPercent = 5
  101. >
  102. class adaptive_pool;
  103. template<class T, class SegmentManager, std::size_t NodesPerBlock = 64, std::size_t MaxFreeBlocks = 2
  104. , unsigned char OverheadPercent = 5
  105. >
  106. class private_adaptive_pool;
  107. template<class T, class SegmentManager, std::size_t NodesPerBlock = 64, std::size_t MaxFreeBlocks = 2
  108. , unsigned char OverheadPercent = 5
  109. >
  110. class cached_adaptive_pool;
  111. //////////////////////////////////////////////////////////////////////////////
  112. // offset_ptr
  113. //////////////////////////////////////////////////////////////////////////////
  114. template <class T>
  115. class offset_ptr;
  116. //////////////////////////////////////////////////////////////////////////////
  117. // Memory allocation algorithms
  118. //////////////////////////////////////////////////////////////////////////////
  119. //Single segment memory allocation algorithms
  120. template<class MutexFamily, class VoidMutex = offset_ptr<void> >
  121. class simple_seq_fit;
  122. template<class MutexFamily, class VoidMutex = offset_ptr<void>, std::size_t MemAlignment = 0>
  123. class rbtree_best_fit;
  124. //////////////////////////////////////////////////////////////////////////////
  125. // Index Types
  126. //////////////////////////////////////////////////////////////////////////////
  127. template<class IndexConfig> class flat_map_index;
  128. template<class IndexConfig> class iset_index;
  129. template<class IndexConfig> class iunordered_set_index;
  130. template<class IndexConfig> class map_index;
  131. template<class IndexConfig> class null_index;
  132. template<class IndexConfig> class unordered_map_index;
  133. //////////////////////////////////////////////////////////////////////////////
  134. // Segment manager
  135. //////////////////////////////////////////////////////////////////////////////
  136. template <class CharType
  137. ,class MemoryAlgorithm
  138. ,template<class IndexConfig> class IndexType>
  139. class segment_manager;
  140. //////////////////////////////////////////////////////////////////////////////
  141. // External buffer managed memory classes
  142. //////////////////////////////////////////////////////////////////////////////
  143. template <class CharType
  144. ,class MemoryAlgorithm
  145. ,template<class IndexConfig> class IndexType>
  146. class basic_managed_external_buffer;
  147. typedef basic_managed_external_buffer
  148. <char
  149. ,rbtree_best_fit<null_mutex_family>
  150. ,iset_index>
  151. managed_external_buffer;
  152. typedef basic_managed_external_buffer
  153. <wchar_t
  154. ,rbtree_best_fit<null_mutex_family>
  155. ,iset_index>
  156. wmanaged_external_buffer;
  157. //////////////////////////////////////////////////////////////////////////////
  158. // managed memory classes
  159. //////////////////////////////////////////////////////////////////////////////
  160. template <class CharType
  161. ,class MemoryAlgorithm
  162. ,template<class IndexConfig> class IndexType>
  163. class basic_managed_shared_memory;
  164. typedef basic_managed_shared_memory
  165. <char
  166. ,rbtree_best_fit<mutex_family>
  167. ,iset_index>
  168. managed_shared_memory;
  169. typedef basic_managed_shared_memory
  170. <wchar_t
  171. ,rbtree_best_fit<mutex_family>
  172. ,iset_index>
  173. wmanaged_shared_memory;
  174. //////////////////////////////////////////////////////////////////////////////
  175. // Windows shared memory managed memory classes
  176. //////////////////////////////////////////////////////////////////////////////
  177. #if defined (BOOST_INTERPROCESS_WINDOWS) || defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
  178. template <class CharType
  179. ,class MemoryAlgorithm
  180. ,template<class IndexConfig> class IndexType>
  181. class basic_managed_windows_shared_memory;
  182. typedef basic_managed_windows_shared_memory
  183. <char
  184. ,rbtree_best_fit<mutex_family>
  185. ,iset_index>
  186. managed_windows_shared_memory;
  187. typedef basic_managed_windows_shared_memory
  188. <wchar_t
  189. ,rbtree_best_fit<mutex_family>
  190. ,iset_index>
  191. wmanaged_windows_shared_memory;
  192. #endif //#if defined (BOOST_INTERPROCESS_WINDOWS)
  193. #if defined(BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS) || defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
  194. template <class CharType
  195. ,class MemoryAlgorithm
  196. ,template<class IndexConfig> class IndexType>
  197. class basic_managed_xsi_shared_memory;
  198. typedef basic_managed_xsi_shared_memory
  199. <char
  200. ,rbtree_best_fit<mutex_family>
  201. ,iset_index>
  202. managed_xsi_shared_memory;
  203. typedef basic_managed_xsi_shared_memory
  204. <wchar_t
  205. ,rbtree_best_fit<mutex_family>
  206. ,iset_index>
  207. wmanaged_xsi_shared_memory;
  208. #endif //#if defined(BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS)
  209. //////////////////////////////////////////////////////////////////////////////
  210. // Fixed address shared memory
  211. //////////////////////////////////////////////////////////////////////////////
  212. typedef basic_managed_shared_memory
  213. <char
  214. ,rbtree_best_fit<mutex_family, void*>
  215. ,iset_index>
  216. fixed_managed_shared_memory;
  217. typedef basic_managed_shared_memory
  218. <wchar_t
  219. ,rbtree_best_fit<mutex_family, void*>
  220. ,iset_index>
  221. wfixed_managed_shared_memory;
  222. //////////////////////////////////////////////////////////////////////////////
  223. // Heap memory managed memory classes
  224. //////////////////////////////////////////////////////////////////////////////
  225. template
  226. <class CharType
  227. ,class MemoryAlgorithm
  228. ,template<class IndexConfig> class IndexType>
  229. class basic_managed_heap_memory;
  230. typedef basic_managed_heap_memory
  231. <char
  232. ,rbtree_best_fit<null_mutex_family>
  233. ,iset_index>
  234. managed_heap_memory;
  235. typedef basic_managed_heap_memory
  236. <wchar_t
  237. ,rbtree_best_fit<null_mutex_family>
  238. ,iset_index>
  239. wmanaged_heap_memory;
  240. //////////////////////////////////////////////////////////////////////////////
  241. // Mapped file managed memory classes
  242. //////////////////////////////////////////////////////////////////////////////
  243. template
  244. <class CharType
  245. ,class MemoryAlgorithm
  246. ,template<class IndexConfig> class IndexType>
  247. class basic_managed_mapped_file;
  248. typedef basic_managed_mapped_file
  249. <char
  250. ,rbtree_best_fit<mutex_family>
  251. ,iset_index>
  252. managed_mapped_file;
  253. typedef basic_managed_mapped_file
  254. <wchar_t
  255. ,rbtree_best_fit<mutex_family>
  256. ,iset_index>
  257. wmanaged_mapped_file;
  258. //////////////////////////////////////////////////////////////////////////////
  259. // Exceptions
  260. //////////////////////////////////////////////////////////////////////////////
  261. class interprocess_exception;
  262. class lock_exception;
  263. class bad_alloc;
  264. //////////////////////////////////////////////////////////////////////////////
  265. // Bufferstream
  266. //////////////////////////////////////////////////////////////////////////////
  267. //bufferstream
  268. template <class CharT
  269. ,class CharTraits = std::char_traits<CharT> >
  270. class basic_bufferbuf;
  271. template <class CharT
  272. ,class CharTraits = std::char_traits<CharT> >
  273. class basic_ibufferstream;
  274. template <class CharT
  275. ,class CharTraits = std::char_traits<CharT> >
  276. class basic_obufferstream;
  277. template <class CharT
  278. ,class CharTraits = std::char_traits<CharT> >
  279. class basic_bufferstream;
  280. //////////////////////////////////////////////////////////////////////////////
  281. // Vectorstream
  282. //////////////////////////////////////////////////////////////////////////////
  283. template <class CharVector
  284. ,class CharTraits = std::char_traits<typename CharVector::value_type> >
  285. class basic_vectorbuf;
  286. template <class CharVector
  287. ,class CharTraits = std::char_traits<typename CharVector::value_type> >
  288. class basic_ivectorstream;
  289. template <class CharVector
  290. ,class CharTraits = std::char_traits<typename CharVector::value_type> >
  291. class basic_ovectorstream;
  292. template <class CharVector
  293. ,class CharTraits = std::char_traits<typename CharVector::value_type> >
  294. class basic_vectorstream;
  295. //////////////////////////////////////////////////////////////////////////////
  296. // Smart pointers
  297. //////////////////////////////////////////////////////////////////////////////
  298. template<class T, class Deleter>
  299. class scoped_ptr;
  300. template<class T, class VoidPointer>
  301. class intrusive_ptr;
  302. template<class T, class VoidAllocator, class Deleter>
  303. class shared_ptr;
  304. template<class T, class VoidAllocator, class Deleter>
  305. class weak_ptr;
  306. //////////////////////////////////////////////////////////////////////////////
  307. // IPC
  308. //////////////////////////////////////////////////////////////////////////////
  309. class message_queue;
  310. }} //namespace boost { namespace interprocess {
  311. //////////////////////////////////////////////////////////////////////////////
  312. // CONTAINERS
  313. //////////////////////////////////////////////////////////////////////////////
  314. #include <boost/interprocess/detail/config_end.hpp>
  315. #endif //#ifndef BOOST_INTERPROCESS_FWD_HPP