oaBuildInfo.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaBuildInfo.h
00004 //
00005 // This file contains the definition of the oaBuildInfo class. The oaBuildInfo
00006 // class implements a utility class for registering and querying build
00007 // information for libraries and executables.
00008 //
00009 // The following information is currently stored in the buildInfo:
00010 //
00011 //  packageName     - The name of the library or executable
00012 //  buildName       - The build name, e.g., "a014"
00013 //  buildTime       - The build time as a string, e.g., "Sun Jun  6 12:08 2004"
00014 //  buildNumber     - The build number, e.g., 14
00015 //  majorReleaseNum - The major release number, e.g., 2
00016 //  minorReleaseNum - The minor release number, e.g., 2
00017 //
00018 // The oaBuildInfoArray class implements a utility array class used to pass
00019 // an array of oaBuildInfo pointers back to the user via 
00020 // oaBuildInfo::getPackages().
00021 //
00022 // *****************************************************************************
00023 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00024 // Integration Initiative, this material may not be copied, modified,
00025 // re-published, uploaded, executed, or distributed in any way, in any medium,
00026 // in whole or in part, without prior written permission from Cadence.
00027 //
00028 //                Copyright 2004-2006 Cadence Design Systems, Inc.
00029 //                           All Rights Reserved.
00030 //
00031 //  $Author: icftcm $
00032 //  $Revision: #4 $
00033 //  $Date: 2010/09/07 $
00034 //  $State: Exp $
00035 // *****************************************************************************
00036 // *****************************************************************************
00037 
00038 
00039 
00040 #if !defined(oaBuildInfo_P)
00041 #define oaBuildInfo_P
00042 
00043 
00044 
00045 // *****************************************************************************
00046 // Nested includes
00047 // *****************************************************************************
00048 #include "oaString.h"
00049 #include "oaArray.h"
00050 #include "oaBuildDef.h"
00051 
00052 
00053 
00054 // *****************************************************************************
00055 // Declare and define types in the OpenAccess namespace.
00056 // *****************************************************************************
00057 BEGIN_OA_NAMESPACE
00058 
00059 
00060 
00061 // *****************************************************************************
00062 // Forward Class Declarations
00063 // *****************************************************************************
00064 class oaBuildInfo;
00065 class oaBuildInfoArray;
00066 
00067 
00068 
00069 // *****************************************************************************
00070 // oaBuildInfo
00071 // *****************************************************************************
00072 class OA_BASE_DLL_API oaBuildInfo {
00073 public:
00074                             oaBuildInfo(const oaString  &packageNameIn,
00075                                         const oaString  &buildNameIn,
00076                                         const oaString  &buildTimeIn,
00077                                         oaUInt4         buildNumberIn,
00078                                         oaUInt4         majorReleaseNum = OA_MAJOR_RELEASE_NUM,
00079                                         oaUInt4         minorReleaseNum = OA_MINOR_RELEASE_NUM);
00080 
00081     static oaBuildInfo      *find(const oaString &packageName);
00082 
00083     static void             getPackages(oaBuildInfoArray &packagesIn);
00084 #if !defined(OA_DEPRECATED)
00085     static oaBuildInfo      **getPackages();
00086 #endif
00087     static oaUInt4          getNumPackages();
00088     static const oaString   getPlatformName();
00089     static const oaString   &getAppBuildName();
00090 
00091     const oaString          &getPackageName() const;
00092     const oaString          &getBuildName() const;
00093     const oaString          &getBuildTime() const;
00094     oaUInt4                 getBuildNumber() const;
00095     oaUInt4                 getMajorReleaseNum() const;
00096     oaUInt4                 getMinorReleaseNum() const;
00097 
00098 private:
00099     oaString                packageName;
00100     oaString                buildName;
00101     oaString                buildTime;
00102     oaUInt4                 buildNumber;
00103     oaUInt4                 majorRelNum;
00104     oaUInt4                 minorRelNum;
00105 
00106     static oaUInt4          numPackages;
00107     static oaUInt4          packageArraySize;
00108     static oaBuildInfo      **packages;
00109     static const oaString   platformName;
00110 };
00111 
00112 
00113 
00114 // *****************************************************************************
00115 // oaBuildInfoArray
00116 // *****************************************************************************
00117 class OA_BASE_DLL_API oaBuildInfoArray : public oaArray<oaBuildInfo*> {
00118 public:
00119                             oaBuildInfoArray(oaUInt4 sizeIn = 0);
00120 
00121     using                   oaArray<oaBuildInfo*>::sort;
00122     void                    sort();
00123 };
00124 
00125 
00126 
00127 END_OA_NAMESPACE
00128 
00129 #endif

Return to top of page