// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 #include "stdafx.h" #include #include #include namespace stoke { namespace max3d { namespace { FPInterfaceDesc theIDAllocatorDesc( IDAllocator_INTERFACE, _M( "IDAllocator" ), 0, NULL, FP_MIXIN, // IDAllocator::kFnReset, _T("Reset"), 0, TYPE_VOID, 0, 0, IDAllocator::kFnAllocateIDs, _T("AllocateIDs"), 0, TYPE_INT64, 0, 1, _T("NumIDs"), 0, TYPE_INT64, p_end ); } IDAllocator::IDAllocator( boost::shared_ptr pImpl ) : m_pImpl( pImpl ) {} IDAllocator::~IDAllocator() {} FPInterfaceDesc* IDAllocator::GetDesc() { return &theIDAllocatorDesc; } boost::shared_ptr IDAllocator::GetImpl() { return m_pImpl; } void IDAllocator::Reset() { // m_pImpl->reset(); } IDAllocator::id_type IDAllocator::AllocateIDs( __int64 numIDs ) { return static_cast( m_pImpl->allocate_ids( static_cast( numIDs ) ) ); } FPInterface* CreateIDAllocator() { return new IDAllocator( boost::make_shared() ); } } // namespace max3d } // namespace stoke