Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

BitMask.h

Go to the documentation of this file.
00001 // Copyright NVIDIA Corporation 2002-2004
00002 // TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
00003 // *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
00004 // OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
00005 // AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS
00006 // BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES
00007 // WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS,
00008 // BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS)
00009 // ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS
00010 // BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES 
00011 
00012 #pragma once
00013 
00015 #include "nvsgcommon.h"
00016 
00017 namespace nvutil
00018 {
00019 
00021 template <int n>
00022 class Bit
00023 {
00024 public:
00025   enum { mask = 1<<n };
00026 };
00027 
00028 //  Don't need to document these tiny little helper defines !!!
00029 #if ! defined( DOXYGEN_IGNORE )
00030 
00031 #define BIT(n) nvutil::Bit<n>::mask
00032 
00033 #define BIT0  BIT(0)
00034 #define BIT1  BIT(1)
00035 #define BIT2  BIT(2)
00036 #define BIT3  BIT(3)
00037 #define BIT4  BIT(4)
00038 #define BIT5  BIT(5)
00039 #define BIT6  BIT(6)
00040 #define BIT7  BIT(7)
00041 #define BIT8  BIT(8)
00042 #define BIT9  BIT(9)
00043 #define BIT10 BIT(10)
00044 #define BIT11 BIT(11)
00045 #define BIT12 BIT(12)
00046 #define BIT13 BIT(13)
00047 #define BIT14 BIT(14)
00048 #define BIT15 BIT(15)
00049 #define BIT16 BIT(16)
00050 #define BIT17 BIT(17)
00051 #define BIT18 BIT(18)
00052 #define BIT19 BIT(19)
00053 #define BIT20 BIT(20)
00054 #define BIT21 BIT(21)
00055 #define BIT22 BIT(22)
00056 #define BIT23 BIT(23)
00057 #define BIT24 BIT(24)
00058 #define BIT25 BIT(25)
00059 #define BIT26 BIT(26)
00060 #define BIT27 BIT(27)
00061 #define BIT28 BIT(28)
00062 #define BIT29 BIT(29)
00063 #define BIT30 BIT(30)
00064 #define BIT31 BIT(31)
00065 
00066 #endif  //  DOXYGEN_IGNORE
00067 
00068 } // namespace nvutil
00069 

Generated on Tue Mar 1 13:19:16 2005 for NVSGSDK by NVIDIA