| 1924 | |
| 1925 | template<class NodeType, int PoolElementSize> |
| 1926 | inline NodeType* XMLDocument::CreateUnlinkedNode( MemPoolT<PoolElementSize>& pool ) |
| 1927 | { |
| 1928 | TIXMLASSERT( sizeof( NodeType ) == PoolElementSize ); |
| 1929 | TIXMLASSERT( sizeof( NodeType ) == pool.ItemSize() ); |
| 1930 | NodeType* returnNode = new (pool.Alloc()) NodeType( this ); |
| 1931 | TIXMLASSERT( returnNode ); |
| 1932 | returnNode->_memPool = &pool; |
| 1933 | |
| 1934 | _unlinked.Push(returnNode); |
| 1935 | return returnNode; |
| 1936 | } |
| 1937 | |
| 1938 | /** |
| 1939 | A XMLHandle is a class that wraps a node pointer with null checks; this is |