| VRS - The Virtual Rendering System |
| version 3.3 |
00001 /****************************************************************************** 00002 * VRS - The Virtual Rendering System 00003 * Copyright (C) 2000-2004 Computer Graphics Systems Group at the 00004 * Hasso-Plattner-Institute (HPI), Potsdam, Germany. 00005 * 00006 * This library is free software; you can redistribute it and/or modify it 00007 * under the terms of the GNU Lesser General Public License as published by 00008 * the Free Software Foundation; either version 2.1 of the License, or (at 00009 * your option) any later version. This library is distributed in the hope 00010 * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 00011 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Lesser General Public License for more details. You should have received 00013 * a copy of the GNU Lesser+ General Public License along with this library; if 00014 * not, write to the FreeSoftware Foundation, Inc., 59 Temple Place, Suite 330, 00015 * Boston, MA, 02111-1307, USA. 00016 ******************************************************************************/ 00017 00018 // $Id: transactionno.h 6136 2007-11-14 11:56:35Z Konstantin_Baumann $ 00019 // $Date: 2007-11-14 12:56:35 +0100 (Wed, 14 Nov 2007) $ 00020 // $Revision: 6136 $ 00021 // $State$ 00022 // $Author: Konstantin_Baumann $ 00023 // 00024 // $Log$ 00025 // Revision 1.13 2005/01/03 01:43:08 klimetschek 00026 // - modified win32 project layout, splitted vrs.vcproj into vrs_container, vrs_core, vrs_sg, vrs_image, vrs_opengl and vrs_io 00027 // - removed vrs.vcproj 00028 // minor things: 00029 // - added all glutexamples to vrs4glut.sln 00030 // - fixed some problems in glutexamples 00031 // - removed all project references from all VS projects (using solution wide project dependencies instead) 00032 // 00033 // Revision 1.12 2004/11/05 13:58:10 basch 00034 // Class comment changed (Doxygen style) 00035 // 00036 // Revision 1.11 2004/03/26 13:39:24 baumann 00037 // code cleanup 00038 // 00039 // Revision 1.10 2004/03/12 16:28:39 baumann 00040 // macros VRS_NAMESPACE_BEGIN/_END expanded and removed 00041 // 00042 // Revision 1.9 2004/03/04 16:01:51 kirsch 00043 // renamed VRS_HAS_LONG_LONG to VRS_HAS_INT64, and defined it for windows 00044 // this way, transaction numbers are now counted with 64bit ints also with windows 00045 // 00046 // Revision 1.8 2003/11/07 14:19:24 kirsch 00047 // removed leading underscore from include guards 00048 // 00049 // Revision 1.7 2003/06/23 09:47:42 baumann 00050 // - new compile time switch VRS_HAS_WSTRING added 00051 // - renamed macros VRS_HAVE_* to VRS_HAS_* 00052 // - removed "typedef std::string String;" 00053 // - Font uses ImageTexture2D instead of ImageTexture2DGL 00054 // 00055 // Revision 1.6 2002/02/20 18:44:30 kosta 00056 // changed MAM/VRS to VRS 00057 // 00058 // Revision 1.5 2002/02/19 10:34:13 kosta 00059 // undone all changes since 2002-02-15 00060 // 00061 // Revision 1.3 2002/01/15 16:25:54 kosta 00062 // macros rewritten for a better namespace support 00063 // 00064 // Revision 1.2 2001/11/13 16:36:31 kirsch 00065 // changed line feed to unix style (removed control-M) 00066 // 00067 // Revision 1.1.1.1 2001/06/08 08:09:20 kirsch 00068 // imported alpha-version by olli 00069 // 00070 00071 #ifndef VRS_TRANSACTIONNO_H 00072 #define VRS_TRANSACTIONNO_H 00073 00074 #include <vrs/config.h> 00075 00076 namespace VRS { 00077 00078 #ifdef NDEBUG 00079 00080 typedef UINT64 TransactionNo; 00081 00082 #else // NDEBUG 00083 00085 class VRS_CORE_API TransactionNo { 00086 public: 00087 TransactionNo(UINT64 initValue) : no_(initValue) { } 00088 TransactionNo(const TransactionNo& other) : no_(other.no_) { } 00089 00090 TransactionNo& operator++() { ++no_; return *this; } 00091 TransactionNo operator++(int) { return TransactionNo(no_ + 1); } 00092 00093 bool operator==(const TransactionNo& other) const { return (no_ == other.no_); } 00094 bool operator!=(const TransactionNo& other) const { return (no_ != other.no_); } 00095 bool operator< (const TransactionNo& other) const { return (no_ < other.no_); } 00096 bool operator> (const TransactionNo& other) const { return (no_ > other.no_); } 00097 bool operator<=(const TransactionNo& other) const { return (no_ <= other.no_); } 00098 bool operator>=(const TransactionNo& other) const { return (no_ >= other.no_); } 00099 00100 friend VRS_CORE_API std::ostream& operator<<(std::ostream& out, const TransactionNo& no) { return (out << no.no_); } 00101 00102 private: 00103 UINT64 no_; 00104 }; // class TransactionNo 00105 00106 #endif // NDEBUG 00107 00108 } // namespace VRS 00109 00110 #endif // VRS_TRANSACTIONNO_H