From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- .../nel/classNLMISC_1_1CSTLBlockAllocator.html | 228 +++++++++++++++++++++ 1 file changed, 228 insertions(+) create mode 100644 docs/doxygen/nel/classNLMISC_1_1CSTLBlockAllocator.html (limited to 'docs/doxygen/nel/classNLMISC_1_1CSTLBlockAllocator.html') diff --git a/docs/doxygen/nel/classNLMISC_1_1CSTLBlockAllocator.html b/docs/doxygen/nel/classNLMISC_1_1CSTLBlockAllocator.html new file mode 100644 index 00000000..b71e4050 --- /dev/null +++ b/docs/doxygen/nel/classNLMISC_1_1CSTLBlockAllocator.html @@ -0,0 +1,228 @@ + + + + nevrax.org : docs + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
+
+ + +
+ + +
+Docs + +
+  + + + + + +
Documentation 
+ +
+Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  
+

NLMISC::CSTLBlockAllocator Class Template Reference

#include <stl_block_allocator.h> +

+List of all members. + + + + + + + +

Public Methods

 CSTLBlockAllocator (CBlockMemory< T, false > *bm)
 Constructor. Must gives a blockMemory to ctor. NB: must gives a CBlockMemory<T, false> !!! More...

 CSTLBlockAllocator (const CSTLBlockAllocator< T > &other)
 copy ctor. More...

 ~CSTLBlockAllocator ()
 dtor. More...

+


Detailed Description

+

template<class T>
+ class NLMISC::CSTLBlockAllocator< T >

+ +see CBlockMemory for description of block memory management/advantages. +

+This class works with STLPort. It implements __stl_alloc_rebind() (not C++ standard??) to work properly with list<>/set<> etc... node allocations. +

+NB: if used with a vector<> or a deque<> (ie if allocate(..,n) is called with n>1), it's still work, but it's use malloc()/free() instead, so it is fully unusefull in this case :) +

+CSTLBlockAllocator use a pointer on a CBlockMemory, so multiple containers can share the same blockMemory, for maximum space/speed efficiency. +

+Because of CBlockMemory allocation scheme, only same containers of same types can share the same CBlockMemory instance (eg: "list<uint, &myBlockMemory>; vector<uint, &myBlockMemory>;" is invalid and will assert when allocations will occur). +

+To construct a container which use this allocator, do like this: list<uint, CSTLBlockAllocator<uint>> myList( ptrOnBlockMemory ); +

+But see CSTLBlockList for easier list instanciation, because using it, you'll do like this: CSTLBlockList<uint> myList(ptrOnBlockMemory); +

+Note: CSTLBlockAllocator take only 4 bytes in memory (a ptr on a CBlockMemory) +

+

+Author:
+Lionel Berenguier , Nevrax France
+Date:
+2001
+Todo:
+ yoyo: make it work under linux. For now, use std allocator instead...
+

+ +

+Definition at line 192 of file stl_block_allocator.h.


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + + + + + +
+template<class T>
NLMISC::CSTLBlockAllocator< T >::CSTLBlockAllocator CBlockMemory< T, false > *   bm [inline]
+
+ + + + + +
+   + + +

+Constructor. Must gives a blockMemory to ctor. NB: must gives a CBlockMemory<T, false> !!! +

+ +

+Definition at line 197 of file stl_block_allocator.h.

+

+ + + + +
+ + + + + + + + + + + + + +
+template<class T>
NLMISC::CSTLBlockAllocator< T >::CSTLBlockAllocator const CSTLBlockAllocator< T > &   other [inline]
+
+ + + + + +
+   + + +

+copy ctor. +

+ +

+Definition at line 201 of file stl_block_allocator.h.

+

+ + + + +
+ + + + + + + + + + + + +
+template<class T>
NLMISC::CSTLBlockAllocator< T >::~CSTLBlockAllocator   [inline]
+
+ + + + + +
+   + + +

+dtor. +

+ +

+Definition at line 205 of file stl_block_allocator.h.

+


The documentation for this class was generated from the following file: + + + +
                                                                                                                                                                    +
+ + -- cgit v1.2.1