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-2020 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 00064 class SoLDMTileID { 00065 00066 public: 00067 00071 SoLDMTileID() 00072 :m_id(0) {} 00073 00077 SoLDMTileID( LDM_TILE_ID_TYPE tileID) 00078 :m_id(tileID) {} 00079 00083 inline SbBool operator==(const SoLDMTileID&b) const {return (m_id == b.m_id);} 00087 inline SbBool operator!=(const SoLDMTileID&b) const {return (m_id != b.m_id);} 00091 inline SbBool operator<=(const SoLDMTileID&b) const {return m_id <= b.m_id;} 00092 00096 inline SbBool operator>=(const SoLDMTileID&b) const {return m_id >= b.m_id;} 00097 00101 inline SbBool operator<(const SoLDMTileID&b) const {return m_id < b.m_id;} 00102 00106 inline SbBool operator>(const SoLDMTileID&b) const {return m_id > b.m_id;} 00107 00108 00112 inline LDM_TILE_ID_TYPE getID() const 00113 { return m_id; } 00114 00118 inline SoLDMTileID &operator++(); 00119 00123 inline SoLDMTileID operator++(int); 00124 00128 inline SoLDMTileID &operator--(); 00129 00133 inline SoLDMTileID operator--(int); 00134 00135 #if 1 SoDEPRECATED 00146 SoLDMTileID( LDM_TILE_ID_TYPE tileID, bool ) 00147 :m_id(tileID) {} 00148 SoDEPRECATED 00158 inline SoLDMTileID( LDM_TILE_ID_TYPE tileID, unsigned short SO_UNUSED_PARAM(timestep)) 00159 { m_id = tileID; } 00160 SoDEPRECATED 00169 inline unsigned short getTimeStep() const 00170 { return 0; } 00171 SoDEPRECATED 00180 static inline void setCurrentTimeStep(unsigned short SO_UNUSED_PARAM(timestep)) {} 00181 00182 #endif 00184 private: 00185 LDM_TILE_ID_TYPE m_id; 00186 }; 00187 00188 00189 /*******************************************************************************/ 00190 SoLDMTileID & 00191 SoLDMTileID::operator++() 00192 { 00193 m_id++; 00194 return *this; 00195 } 00196 00197 /*******************************************************************************/ 00198 SoLDMTileID 00199 SoLDMTileID::operator++(int) 00200 { 00201 SoLDMTileID tileId = *this; 00202 ++(*this); 00203 00204 return tileId; 00205 } 00206 00207 /*******************************************************************************/ 00208 SoLDMTileID & 00209 SoLDMTileID::operator--() 00210 { 00211 m_id--; 00212 return *this; 00213 } 00214 00215 /*******************************************************************************/ 00216 SoLDMTileID 00217 SoLDMTileID::operator--(int) 00218 { 00219 SoLDMTileID tileId = *this; 00220 --(*this); 00221 00222 return tileId; 00223 } 00224 00228 inline std::ostream& operator << (std::ostream& os, const SoLDMTileID& tile) 00229 { 00230 return os << "(" << tile.getID() << ")"; 00231 } 00232 00233 #endif // _SO_LDM_TILE_ID_ 00234 00235 00236