TLM-2.0: include/tlm/tlm_h/tlm_version.h Source File

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

# include/tlm/tlm_h/tlm_version.h

Go to the documentation of this file.

    00001 /*****************************************************************************
    00002
    00003   The following code is derived, directly or indirectly, from the SystemC
    00004   source code Copyright (c) 1996-2009 by all Contributors.
    00005   All Rights reserved.
    00006
    00007   The contents of this file are subject to the restrictions and limitations
    00008   set forth in the SystemC Open Source License Version 3.0 (the "License");
    00009   You may not use this file except in compliance with such restrictions and
    00010   limitations. You may obtain instructions on how to receive a copy of the
    00011   License at http://www.systemc.org/. Software distributed by Contributors
    00012   under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
    00013   ANY KIND, either express or implied. See the License for the specific
    00014   language governing rights and limitations under the License.
    00015
    00016  *****************************************************************************/
    00017
    00018 /* ---------------------------------------------------------------------------------------
    00019  @file tlm_version.h
    00020
    00021  @brief TLM version header
    00022
    00023   Original Author:
    00024     Charles Wilson, XtremeEDA Corporation
    00025
    00026  @description
    00027   This header contains preprocessor and compiler symbols to allow for the determination
    00028    of the TLM version information. This conforms to IEEE 1666-2005 section 8.5.5 - 8.5.7
    00029    .
    00030    The following are provided:
    00031    .
    00032    preprocessor: TLM_VERSION_MAJOR        numeric
    00033                  TLM_VERSION_MINOR        numeric
    00034                  TLM_VERSION_PATCH        numeric
    00035                  TLM_VERSION_ORIGINATOR   string       ([A-Z][a-z][0-9]_)
    00036                  TLM_VERSION_RELEASE_DATE ISO8601 date (YYYYMMDD)
    00037                  TLM_VERSION_PRERELEASE   string       ([A-Z][a-z][0-9]_)
    00038                  TLM_IS_PRERELEASE        bool         (TRUE,FALSE)
    00039                  TLM_VERSION              string       {2.0.0_DR3-TLMWG}
    00040                  TLM_COPYRIGHT            string
    00041    .
    00042    compiler:     tlm_version_major        const unsigned int
    00043                  tlm_version_minor        const unsigned int
    00044                  tlm_version_patch        const unsigned int
    00045                  tlm_version_originator   const std::string
    00046                  tlm_version_release_date const std::string
    00047                  tlm_version_prerelease   const std::string
    00048                  tlm_is_prerelease        const bool
    00049                  tlm_version              const string
    00050                  tlm_copyright            const string
    00051    .
    00052    accessors:    inline const char* tlm_release   (void)
    00053                  inline const char* tlm_version   (void)
    00054                  inline const char* tlm_copyright (void)
    00055
    00056 --------------------------------------------------------------------------------------- */
    00057
    00058 #ifndef __TLM_VERSION_H__
    00059 #define __TLM_VERSION_H__
    00060
    00061 namespace tlm
    00062 {
    00063
    00064 #define TLM_VERSION_MAJOR                   2
    00065 #define TLM_VERSION_MINOR                   0
    00066 #define TLM_VERSION_PATCH                   1
    00067 #define TLM_VERSION_ORIGINATOR              "TLMWG"
    00068 #define TLM_VERSION_SEPARATOR               "."
    00069
    00070 #define TLM_IS_PRERELEASE                   FALSE
    00071 #define TLM_VERSION_PRERELEASE              ""
    00072
    00073 #define TLM_VERSION_RELEASE_YEAR            "2009"
    00074 #define TLM_VERSION_RELEASE_MONTH           "07"
    00075 #define TLM_VERSION_RELEASE_DAY             "15"
    00076
    00077 #define TLM_COPYRIGHT                       "        Copyright (c) 1996-" TLM_VERSION_RELEASE_YEAR " by all Contributors\n" \
    00078                                             "                    ALL RIGHTS RESERVED"
    00079
    00080 /************************** do not modify below this line *******************************/
    00081
    00082 /******************************* preprocessor symbols ***********************************/
    00083
    00084 #define TLM_VERSION_RELEASE_DATE            TLM_VERSION_RELEASE_YEAR \
    00085                                             TLM_VERSION_RELEASE_MONTH \
    00086                                             TLM_VERSION_RELEASE_DAY
    00087
    00088 #define TLM_VERSION_STR(x)                  TLM_VERSION_STR_HELPER(x)
    00089 #define TLM_VERSION_STR_HELPER(x)           #x
    00090
    00091 #define TLM_VERSION_STRING_MAJOR            TLM_VERSION_STR(TLM_VERSION_MAJOR)
    00092 #define TLM_VERSION_STRING_MINOR            TLM_VERSION_STR(TLM_VERSION_MINOR)
    00093 #define TLM_VERSION_STRING_PATCH            TLM_VERSION_STR(TLM_VERSION_PATCH)
    00094
    00095 #define TLM_VERSION_STRING_MMP              TLM_VERSION_STRING_MAJOR TLM_VERSION_SEPARATOR \
    00096                                             TLM_VERSION_STRING_MINOR TLM_VERSION_SEPARATOR \
    00097                                             TLM_VERSION_STRING_PATCH
    00098
    00099 #define TLM_VERSION_STRING_PRE_START        "_"
    00100 #define TLM_VERSION_STRING_PRE_END          "-"
    00101
    00102 #if ( TLM_IS_PRERELEASE == TRUE )
    00103
    00104 #define TLM_VERSION_STRING_PRERELEASE       TLM_VERSION_PRERELEASE
    00105 #define TLM_VERSION_STRING_RELEASE_DATE     ""
    00106
    00107 #else   /* TLM_IS_PRERELEASE == TRUE */
    00108
    00109 #define TLM_VERSION_STRING_PRERELEASE       ""
    00110 #define TLM_VERSION_STRING_RELEASE_DATE     TLM_VERSION_RELEASE_DATE
    00111
    00112 #endif  /* TLM_IS_PRERELEASE == TRUE */
    00113
    00114 #define TLM_VERSION_STRING                  TLM_VERSION_STRING_MMP \
    00115                                             TLM_VERSION_STRING_PRE_START \
    00116                                             TLM_VERSION_STRING_PRERELEASE \
    00117                                             TLM_VERSION_STRING_PRE_END \
    00118                                             TLM_VERSION_ORIGINATOR
    00119
    00120 #define TLM_VERSION_STRING_2                "             TLM " \
    00121                                             TLM_VERSION_STRING_MMP \
    00122                                             " --- " \
    00123                                             TLM_VERSION_RELEASE_YEAR \
    00124                                             "-" \
    00125                                             TLM_VERSION_RELEASE_MONTH \
    00126                                             "-" \
    00127                                             TLM_VERSION_RELEASE_DAY
    00128
    00129 #define TLM_VERSION                         TLM_VERSION_STRING
    00130
    00131 /********************************* compiler symbols **************************************/
    00132
    00133 const unsigned int tlm_version_major        ( TLM_VERSION_MAJOR               );
    00134 const unsigned int tlm_version_minor        ( TLM_VERSION_MINOR               );
    00135 const unsigned int tlm_version_patch        ( TLM_VERSION_PATCH               );
    00136
    00137 const bool         tlm_is_prerelease        (
    00138 #if ( TLM_IS_PRERELEASE == TRUE )
    00139                                               true
    00140 #else   /* TLM_IS_PRERELEASE == TRUE */
    00141                                               false
    00142 #endif  /* TLM_IS_PRERELEASE == TRUE */
    00143                                                                               );
    00144
    00145 const std::string  tlm_version_string       ( TLM_VERSION_STRING              );
    00146 const std::string  tlm_version_originator   ( TLM_VERSION_ORIGINATOR          );
    00147 const std::string  tlm_version_prerelease   ( TLM_VERSION_PRERELEASE          );
    00148 const std::string  tlm_version_release_date ( TLM_VERSION_STRING_RELEASE_DATE );
    00149 const std::string  tlm_copyright_string     ( TLM_COPYRIGHT                   );
    00150 const std::string  tlm_version_string_2     ( TLM_VERSION_STRING_2            );
    00151
    00152 inline const char*
    00153 tlm_release
    00154 ( void
    00155 )
    00156 {
    00157   return tlm_version_string.c_str ();
    00158 }
    00159
    00160 inline const char*
    00161 tlm_version
    00162 ( void
    00163 )
    00164 {
    00165   return tlm_version_string_2.c_str ();
    00166 }
    00167
    00168 inline const char*
    00169 tlm_copyright
    00170 ( void
    00171 )
    00172 {
    00173   return tlm_copyright_string.c_str ();
    00174 }
    00175
    00176 } // namespace tlm
    00177
    00178 #endif /* __TLM_VERSION_H__ */