diff --git a/src/xrAICore/Navigation/data_storage_constructor.h b/src/xrAICore/Navigation/data_storage_constructor.h index 2b0c49bb4fe..a9713d0c1a7 100644 --- a/src/xrAICore/Navigation/data_storage_constructor.h +++ b/src/xrAICore/Navigation/data_storage_constructor.h @@ -11,7 +11,36 @@ template class CEmptyClassTemplate {}; template class CEmptyClassTemplate2 {}; -#include "xrAICore/Navigation/manager_builder_allocator_constructor.h" +template < + typename _manager, + typename _builder, // CVertexPath + typename _allocator +> +struct CManagerBuilderAllocatorConstructor { + template < + template class _vertex = CEmptyClassTemplate, + template class _index_vertex = CEmptyClassTemplate2 + > + class CDataStorage : + public _manager::template CDataStorage<_builder, _allocator, _vertex, _index_vertex> + { + public: + typedef typename _manager::template CDataStorage<_builder, _allocator, _vertex, _index_vertex> inherited; + typedef typename inherited::CDataStorageAllocator inherited_allocator; + typedef typename inherited::CGraphVertex CGraphVertex; + typedef typename CGraphVertex::_index_type _index_type; + + public: + CDataStorage(const u32 vertex_count) : + inherited(vertex_count) + {} + virtual ~CDataStorage() {} + void init() { inherited::init(); } + CGraphVertex &create_vertex(const _index_type &vertex_id) + { return inherited::create_vertex(inherited_allocator::create_vertex(), vertex_id); } + }; +}; + // instantiated in CDijkstra template < typename _algorithm, // CDataStorageBucketList|CDataStorageBinaryHeap diff --git a/src/xrAICore/Navigation/manager_builder_allocator_constructor.h b/src/xrAICore/Navigation/manager_builder_allocator_constructor.h index 943df7c2238..1310ef21269 100644 --- a/src/xrAICore/Navigation/manager_builder_allocator_constructor.h +++ b/src/xrAICore/Navigation/manager_builder_allocator_constructor.h @@ -7,38 +7,3 @@ //////////////////////////////////////////////////////////////////////////// #pragma once - -template < - typename _manager, - typename _builder, // CVertexPath - typename _allocator -> -struct CManagerBuilderAllocatorConstructor { - template < - template class _vertex = CEmptyClassTemplate, - template class _index_vertex = CEmptyClassTemplate2 - > - class CDataStorage : - public _manager::template CDataStorage< - _builder, - _allocator, - _vertex, - _index_vertex - > - { - public: - typedef typename _manager::template CDataStorage<_builder, _allocator, _vertex, _index_vertex> inherited; - typedef typename inherited::CDataStorageAllocator inherited_allocator; - typedef typename inherited::CGraphVertex CGraphVertex; - typedef typename CGraphVertex::_index_type _index_type; - - public: - CDataStorage(const u32 vertex_count) : - inherited(vertex_count) - {} - virtual ~CDataStorage() {} - void init() { inherited::init(); } - CGraphVertex &create_vertex(const _index_type &vertex_id) - { return inherited::create_vertex(inherited_allocator::create_vertex(), vertex_id); } - }; -};