Table of Contents

include/AK/Tools/Common/AkListBareLight.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
00003 released in source code form as part of the SDK installer package.
00004 
00005 Commercial License Usage
00006 
00007 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
00008 may use this file in accordance with the end user license agreement provided 
00009 with the software or, alternatively, in accordance with the terms contained in a
00010 written agreement between you and Audiokinetic Inc.
00011 
00012 Apache License Usage
00013 
00014 Alternatively, this file may be used under the Apache License, Version 2.0 (the 
00015 "Apache License"); you may not use this file except in compliance with the 
00016 Apache License. You may obtain a copy of the Apache License at 
00017 http://www.apache.org/licenses/LICENSE-2.0.
00018 
00019 Unless required by applicable law or agreed to in writing, software distributed
00020 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
00021 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
00022 the specific language governing permissions and limitations under the License.
00023 
00024   Version: <VERSION>  Build: <BUILDNUMBER>
00025   Copyright (c) <COPYRIGHTYEAR> Audiokinetic Inc.
00026 *******************************************************************************/
00027 
00028 // AkListBareLight.h
00029 
00030 #ifndef _AKLISTBARELIGHT_H
00031 #define _AKLISTBARELIGHT_H
00032 
00033 #include <AK/Tools/Common/AkListBare.h>
00034 
00035 // this one lets you define the structure
00036 // only requirement is that T must have member pNextLightItem,
00037 // or use the template getter.
00038 // client is responsible for allocation/deallocation of T.
00039 
00040 // WATCH OUT !
00041 // - remember that removeall/term can't delete the elements for you.
00042 // - be sure to destroy elements AFTER removing them from the list, as remove will
00043 // access members of the element.
00044 // WARNING : Each AkListBareLight item can be used in only one AkListBareLight at 
00045 //           once since the member pNextLightItem cannot be re-used.
00046 
00047 /// Next item name policy.
00048 template <class T> struct AkListBareLightNextItem
00049 {
00050     /// Default policy.
00051     static AkForceInline T *& Get( T * in_pItem ) 
00052     {
00053         return in_pItem->pNextLightItem;
00054     }
00055 };
00056 
00057 /// Implementation of List Bare Light.
00058 template <class T, template <class> class U_NEXTITEM = AkListBareLightNextItem > class AkListBareLight : public AkListBare< T, U_NEXTITEM, AkCountPolicyNoCount, AkLastPolicyNoLast > {};
00059 
00060 #endif // _AKLISTBARELIGHT_H