FS2_Open
Open source remastering of the Freespace 2 engine
vmallocator.h
Go to the documentation of this file.
1 #ifndef _VMALLOCATOR_H_INCLUDED_
2 #define _VMALLOCATOR_H_INCLUDED_
3 
4 /* SCP_vm_allocator - maintained by portej05 (i.e. please don't patch this one yourself!) */
5 
6 #include <vector>
7 #include <list>
8 #include <map>
9 #include <string>
10 #include <sstream>
11 #include <queue>
12 #include <deque>
13 #include <unordered_map>
14 
15 template< typename T >
16 class SCP_vector : public std::vector< T, std::allocator< T > > { };
17 
18 template< typename T >
19 class SCP_list : public std::list< T, std::allocator< T > > { };
20 
21 typedef std::basic_string<char, std::char_traits<char>, std::allocator<char> > SCP_string;
22 
23 typedef std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > SCP_stringstream;
24 
25 template< typename T, typename U >
26 class SCP_map : public std::map<T, U, std::less<T>, std::allocator<std::pair<const T, U> > > { };
27 
28 template< typename T, typename U >
29 class SCP_multimap : public std::multimap<T, U, std::less<T>, std::allocator<std::pair<const T, U> > > { };
30 
31 template< typename T >
32 class SCP_queue : public std::queue< T, std::deque< T, std::allocator< T > > > { };
33 
34 template< typename T >
35 class SCP_deque : public std::deque< T, std::allocator< T > > { };
36 
37 template< typename Key, typename T, typename Hash = std::hash<Key>, typename KeyEqual = std::equal_to<Key> >
38 class SCP_unordered_map : public std::unordered_map< Key, T, Hash, KeyEqual, std::allocator< std::pair<const Key, T> > > { };
39 
40 
41 #endif // _VMALLOCATOR_H_INCLUDED_
std::basic_stringstream< char, std::char_traits< char >, std::allocator< char > > SCP_stringstream
Definition: vmallocator.h:23
std::basic_string< char, std::char_traits< char >, std::allocator< char > > SCP_string
Definition: vmallocator.h:21