oaCommonTypes.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaCommonTypes.h
00004 //
00005 // This file contains type definitions and declarations for this package.
00006 //
00007 // *****************************************************************************
00008 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00009 // Integration Initiative, this material may not be copied, modified,
00010 // re-published, uploaded, executed, or distributed in any way, in any medium,
00011 // in whole or in part, without prior written permission from Cadence.
00012 //
00013 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00014 //                           All Rights Reserved.
00015 //
00016 //  $Author: icftcm $
00017 //  $Revision: #1 $
00018 //  $Date: 2010/08/09 $
00019 //  $State: Exp $
00020 // *****************************************************************************
00021 // *****************************************************************************
00022 
00023 
00024 
00025 #if !defined(oaCommonTypes_P)
00026 #define oaCommonTypes_P
00027 
00028 
00029 
00030 // *****************************************************************************
00031 // Platform macros
00032 // *****************************************************************************
00033 #if defined(_MSC_VER)
00034 #define OA_WINDOWS
00035 #endif
00036 
00037 
00038 
00039 // *****************************************************************************
00040 // Nested includes
00041 // *****************************************************************************
00042 #include <string.h>
00043 #include <functional>
00044 
00045 #if defined(HPUX)
00046 #include <sys/time.h>
00047 #else
00048 #include <time.h>
00049 #endif
00050 
00051 // *****************************************************************************
00052 // Windows DLL export macros
00053 // *****************************************************************************
00054 #if defined(OA_WINDOWS) && defined(OA_COMMON_DLL_EXPORTS)
00055 #define OA_COMMON_DLL_API __declspec(dllexport)
00056 #define OA_COMMON_DLL_PVT __declspec(dllexport)
00057 #define OA_COMMON_DLL_EXTERN
00058 #elif defined(OA_WINDOWS) && !defined(OA_STATIC)
00059 #define OA_COMMON_DLL_API __declspec(dllimport)
00060 #define OA_COMMON_DLL_PVT __declspec(dllimport)
00061 #define OA_COMMON_DLL_EXTERN extern
00062 #else
00063 #define OA_COMMON_DLL_API
00064 #define OA_COMMON_DLL_PVT
00065 #endif
00066 
00067 
00068 
00069 // *****************************************************************************
00070 // Constants
00071 // *****************************************************************************
00072 #if defined(__sparcv9) || defined(__x86_64) || (defined(__LP64__) || defined(__64BIT__)) || __WORDSIZE == 64 || defined(_WIN64)
00073 #define _64BIT
00074 #endif
00075 
00076 
00077 
00078 // *****************************************************************************
00079 // Define the OA namespace macros and alias.
00080 // *****************************************************************************
00081 #define BEGIN_OA_NAMESPACE namespace OpenAccess_4 {
00082 #define END_OA_NAMESPACE }
00083 #define USE_OA_NAMESPACE using namespace OpenAccess_4;
00084 
00085 
00086 BEGIN_OA_NAMESPACE
00087 END_OA_NAMESPACE
00088 
00089 namespace oa = OpenAccess_4;
00090 
00091 
00092 
00093 // *****************************************************************************
00094 // Declare and define types in the oaCommon namespace
00095 // *****************************************************************************
00096 BEGIN_OA_NAMESPACE
00097 
00098 
00099 
00100 // *****************************************************************************
00101 // Primitive Type definitions for cross-platform compatibility.
00102 // *****************************************************************************
00103 typedef char oaChar;
00104 typedef char oaInt1;
00105 typedef short oaInt2;
00106 typedef int oaInt4;
00107 typedef unsigned char oaByte;
00108 typedef unsigned short oaUInt2;
00109 typedef unsigned int oaUInt4;
00110 typedef float oaFloat;
00111 typedef double oaDouble;
00112 typedef int oaBoolean;
00113 typedef time_t oaTime;
00114 
00115 #if defined(OA_WINDOWS)
00116 typedef __int64 oaInt8;
00117 typedef unsigned __int64 oaUInt8;
00118 #else
00119 typedef long long oaInt8;
00120 typedef unsigned long long oaUInt8;
00121 #endif
00122 
00123 #if defined(_64BIT)
00124 #if defined(OA_WINDOWS)
00125 typedef unsigned __int64    oaUIntPtr;
00126 #else
00127 typedef unsigned long long  oaUIntPtr;
00128 #endif
00129 #else
00130 typedef unsigned int oaUIntPtr;
00131 #endif
00132 
00133 
00134 
00135 END_OA_NAMESPACE
00136 
00137 
00138 
00139 
00140 // *****************************************************************************
00141 // Define the OA Common namespace macros
00142 // *****************************************************************************
00143 #define BEGIN_OA_COMMON_NAMESPACE namespace oaCommon {
00144 #define END_OA_COMMON_NAMESPACE }
00145 #define USE_OA_COMMON_NAMESPACE using namespace oaCommon;
00146 
00147 
00148 
00149 BEGIN_OA_COMMON_NAMESPACE
00150 
00151 
00152 
00153 // *****************************************************************************
00154 // Note: these type definitions are deprecated and should not be used. They are
00155 // included for compile-time compatibility only.
00156 //
00157 // Basic type definitions to ensure cross-platform consistency.
00158 // *****************************************************************************
00159 #if !defined(OA_WINDOWS)
00160 typedef unsigned char byte;
00161 #endif
00162 typedef short int16;
00163 typedef unsigned short uint16;
00164 typedef int int32;
00165 typedef unsigned int uint32;
00166 
00167 #if defined(OA_WINDOWS)
00168 typedef __int64 int64;
00169 typedef unsigned __int64 uint64;
00170 #else
00171 typedef long long int64;
00172 typedef unsigned long long uint64;
00173 #endif
00174 
00175 #if defined(_64BIT)
00176 typedef uint64              uintPtr;
00177 #else
00178 typedef unsigned int uintPtr;
00179 #endif
00180 
00181 
00182 
00183 // *****************************************************************************
00184 // Guid
00185 // *****************************************************************************
00186 struct Guid {
00187     oa::oaUInt4             data1;
00188     unsigned short          data2;
00189     unsigned short          data3;
00190     unsigned char           data4[8];
00191 };
00192 
00193 
00194 
00195 END_OA_COMMON_NAMESPACE
00196 
00197 
00198 #endif

Return to top of page