00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2018 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : J.HUMMEL (Dec 2002) 00022 ** Modified by : T.DUFOUR (MMM yyyy) 00023 **=======================================================================*/ 00024 #ifndef _SO_LDM_TILE_ID_ 00025 #define _SO_LDM_TILE_ID_ 00026 00027 #include <Inventor/nodes/SoSubNode.h> 00028 00029 #define LDM_TILE_ID_TYPE int64_t 00030 00063 class SoLDMTileID { 00064 00065 public: 00066 00070 SoLDMTileID() 00071 :m_id(0) {} 00072 00076 SoLDMTileID( LDM_TILE_ID_TYPE tileID) 00077 :m_id(tileID) {} 00078 00082 inline bool operator==(const SoLDMTileID&b) const {return (m_id == b.m_id);} 00086 inline bool operator!=(const SoLDMTileID&b) const {return (m_id != b.m_id);} 00090 inline bool operator<=(const SoLDMTileID&b) const {return m_id <= b.m_id;} 00091 00095 inline bool operator>=(const SoLDMTileID&b) const {return m_id >= b.m_id;} 00096 00100 inline bool operator<(const SoLDMTileID&b) const {return m_id < b.m_id;} 00101 00105 inline bool operator>(const SoLDMTileID&b) const {return m_id > b.m_id;} 00106 00107 00111 inline LDM_TILE_ID_TYPE getID() const 00112 { return m_id; } 00113 00117 inline SoLDMTileID &operator++(); 00118 00122 inline SoLDMTileID operator++(int); 00123 00127 inline SoLDMTileID &operator--(); 00128 00132 inline SoLDMTileID operator--(int); 00133 00134 private: 00135 LDM_TILE_ID_TYPE m_id; 00136 }; 00137 00138 00139 /*******************************************************************************/ 00140 SoLDMTileID & 00141 SoLDMTileID::operator++() 00142 { 00143 m_id++; 00144 return *this; 00145 } 00146 00147 /*******************************************************************************/ 00148 SoLDMTileID 00149 SoLDMTileID::operator++(int) 00150 { 00151 SoLDMTileID tileId = *this; 00152 ++(*this); 00153 00154 return tileId; 00155 } 00156 00157 /*******************************************************************************/ 00158 SoLDMTileID & 00159 SoLDMTileID::operator--() 00160 { 00161 m_id--; 00162 return *this; 00163 } 00164 00165 /*******************************************************************************/ 00166 SoLDMTileID 00167 SoLDMTileID::operator--(int) 00168 { 00169 SoLDMTileID tileId = *this; 00170 --(*this); 00171 00172 return tileId; 00173 } 00174 00178 inline std::ostream& operator << (std::ostream& os, const SoLDMTileID& tile) 00179 { 00180 return os << "(" << tile.getID() << ")"; 00181 } 00182 00183 #endif // _SO_LDM_TILE_ID_ 00184 00185 00186