| 1959 | |
| 1960 | template<class NodeType, int PoolElementSize> |
| 1961 | inline NodeType* XMLDocument::CreateUnlinkedNode( MemPoolT<PoolElementSize>& pool ) |
| 1962 | { |
| 1963 | TIXMLASSERT( sizeof( NodeType ) == PoolElementSize ); |
| 1964 | TIXMLASSERT( sizeof( NodeType ) == pool.ItemSize() ); |
| 1965 | NodeType* returnNode = new (pool.Alloc()) NodeType( this ); |
| 1966 | TIXMLASSERT( returnNode ); |
| 1967 | returnNode->_memPool = &pool; |
| 1968 | |
| 1969 | _unlinked.Push(returnNode); |
| 1970 | return returnNode; |
| 1971 | } |
| 1972 | |
| 1973 | /** |
| 1974 | A XMLHandle is a class that wraps a node pointer with null checks; this is |