SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
version.h
Go to the documentation of this file.
1/*
2 © 2016 Intel Corporation
3
4 This software and the related documents are Intel copyrighted materials, and
5 your use of them is governed by the express license under which they were
6 provided to you ("License"). Unless the License provides otherwise, you may
7 not use, modify, copy, publish, distribute, disclose or transmit this software
8 or the related documents without Intel's prior written permission.
9
10 This software and the related documents are provided as is, with no express or
11 implied warranties, other than those that are expressly stated in the License.
12*/
13
14#ifndef SIMICS_SYSTEMC_VERSION_H
15#define SIMICS_SYSTEMC_VERSION_H
16
18
19#include <map>
20#include <string>
21
22namespace simics {
23namespace systemc {
24
25#ifndef SCL_VERSION
26#error "SCL_VERSION is not defined"
27#else
28static_assert(SCL_VERSION >= 7000 && SCL_VERSION <= 8000,
29 "SCL_VERSION must be a 4-digit Simics 7 build-id");
30#endif
31
32#define CONCAT_DEFERRED_(a, b) a ## b
33#define CONCAT_(a, b) CONCAT_DEFERRED_(a, b)
34#define SCL_VERSION_STRING CONCAT_(SCL_VERSION_, SCL_VERSION)
35
38};
39static SCL_VERSION_STRING scl_version_string;
40
42 public:
44 const char *kernel_version() const override;
45 const char *library_version() const override;
46 const char *library_kernel_version() const override;
47 const std::map<std::string, std::string> *versions() const override;
48 bool operator ==(const iface::ScVersionInterface &rhs) const;
49 bool operator !=(const iface::ScVersionInterface &rhs) const;
50
51 protected:
52 void setVersion(const std::string &key, const std::string &value);
53
54 private:
55 std::map<std::string, std::string> versions_;
56};
57
58} // namespace systemc
59} // namespace simics
60
61#endif // SIMICS_SYSTEMC_VERSION_H
62
Definition: version.h:41
bool operator!=(const iface::ScVersionInterface &rhs) const
void setVersion(const std::string &key, const std::string &value)
const char * library_version() const override
const char * library_kernel_version() const override
bool operator==(const iface::ScVersionInterface &rhs) const
const std::map< std::string, std::string > * versions() const override
const char * kernel_version() const override
Definition: sc_version_interface.h:25
Definition: adapter.h:79
Definition: version.h:36