oaTimeStamp.h

Go to the documentation of this file.
00001 // ****************************************************************************
00002 // ****************************************************************************
00003 // oaTimeStamp.h
00004 //
00005 // This file contains the definition of the oaTimeStamp class. This utility
00006 // class provides a simple mechanism for testing if objects have been modified.
00007 //
00008 // ****************************************************************************
00009 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00010 // Integration Initiative, this material may not be copied, modified,
00011 // re-published, uploaded, executed, or distributed in any way, in any medium,
00012 // in whole or in part, without prior written permission from Cadence.
00013 //
00014 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00015 //                           All Rights Reserved.
00016 //
00017 //  $Author: icftcm $
00018 //  $Revision: #1 $
00019 //  $Date: 2010/08/09 $
00020 //  $State: Exp $
00021 // ****************************************************************************
00022 // ****************************************************************************
00023 
00024 
00025 
00026 #if !defined(oaTimeStamp_P)
00027 #define oaTimeStamp_P
00028 
00029 
00030 
00031 // *****************************************************************************
00032 // Nested includes
00033 // *****************************************************************************
00034 #include "oaBaseTypes.h"
00035 
00036 
00037 
00038 // *****************************************************************************
00039 // Declare and define types in the OpenAccess namespace.
00040 // *****************************************************************************
00041 BEGIN_OA_NAMESPACE
00042 
00043 
00044 
00045 // ****************************************************************************
00046 // oaTimeStamp
00047 // ****************************************************************************
00048 class OA_BASE_DLL_API oaTimeStamp {
00049 public:
00050                             oaTimeStamp();
00051                             oaTimeStamp(oaUInt4 value);
00052 
00053     void                    set(oaUInt4 st);
00054     void                    set(const oaTimeStamp &st);
00055 
00056     oaTimeStamp             &operator++();
00057     oaTimeStamp             &operator++(int);
00058     oaTimeStamp             &operator+=(oaUInt4 value);
00059 
00060     oaBoolean               operator==(const oaTimeStamp &timeStamp) const;
00061     oaBoolean               operator!=(const oaTimeStamp &timeStamp) const;
00062 
00063                             operator                oaUInt4() const;
00064 
00065 private:
00066     oaUInt4                 stamp;
00067 
00068     friend oaBoolean        operator==(const oaTimeStamp    &s1,
00069                                        const oaUInt4        s2);
00070     friend oaBoolean        operator==(const oaUInt4        s1,
00071                                        const oaTimeStamp    &s2);
00072     friend oaBoolean        operator!=(const oaTimeStamp    &s1,
00073                                        const oaUInt4        s2);
00074     friend oaBoolean        operator!=(const oaUInt4        s1,
00075                                        const oaTimeStamp    &s2);
00076 };
00077 
00078 
00079 
00080 // *****************************************************************************
00081 // operator==()
00082 // operator!=()
00083 //
00084 // These functions implement the equality and non-equality operators for the
00085 // oaTimeStamp class.
00086 // *****************************************************************************
00087 inline oaBoolean
00088     operator==(const oaTimeStamp    &s1,
00089                const oaUInt4        s2);
00090 
00091 inline oaBoolean
00092     operator==(const oaUInt4        s1,
00093                const oaTimeStamp    &s2);
00094 
00095 inline oaBoolean
00096     operator!=(const oaTimeStamp    &s1,
00097                const oaUInt4        s2);
00098 
00099 inline oaBoolean
00100     operator!=(const oaUInt4        s1,
00101                const oaTimeStamp    &s2);
00102 
00103 
00104 
00105 END_OA_NAMESPACE
00106 
00107 #endif

Return to top of page