#define __SYSTEMC_EXT_TLM_CORE_2_SOCKETS_BASE_SOCKET_IF_H__
#include <systemc>
+#include <typeindex>
namespace tlm
{
virtual sc_core::sc_export_base &get_export_base() = 0;
virtual sc_core::sc_export_base const &get_export_base() const = 0;
virtual unsigned int get_bus_width() const = 0;
- virtual sc_core::sc_type_index get_protocol_types() const = 0;
+ virtual std::type_index get_protocol_types() const = 0;
virtual tlm_socket_category get_socket_category() const = 0;
protected:
#ifndef __SYSTEMC_EXT_TLM_CORE_2_SOCKETS_INITIATOR_SOCKET_HH__
#define __SYSTEMC_EXT_TLM_CORE_2_SOCKETS_INITIATOR_SOCKET_HH__
+#include <typeindex>
+
#include "tlm_core/2/interfaces/fw_bw_ifs.hh"
#include "tlm_core/2/sockets/base_socket_if.hh"
virtual const char *kind() const { return "tlm_initiator_socket"; }
- virtual sc_core::sc_type_index
+ virtual std::type_index
get_protocol_types() const
{
return typeid(TYPES);
#ifndef __SYSTEMC_EXT_TLM_CORE_2_SOCKETS_TARGET_SOCKET_HH__
#define __SYSTEMC_EXT_TLM_CORE_2_SOCKETS_TARGET_SOCKET_HH__
+#include <typeindex>
+
#include "tlm_core/2/interfaces/fw_bw_ifs.hh"
#include "tlm_core/2/sockets/base_socket_if.hh"
virtual const char* kind() const { return "tlm_target_socket"; }
- virtual sc_core::sc_type_index
+ virtual std::type_index
get_protocol_types() const
{
return typeid(TYPES);
#include <map>
#include <systemc>
#include <tlm>
-
-using sc_core::sc_type_index;
+#include <typeindex>
namespace tlm
{
class tlm_extension_registry
{
typedef unsigned int key_type;
- typedef std::map<sc_core::sc_type_index, key_type> type_map;
+ typedef std::map<std::type_index, key_type> type_map;
public:
static tlm_extension_registry &
instance()
}
unsigned int
- register_extension(sc_type_index type)
+ register_extension(std::type_index type)
{
type_map::const_iterator it = ids_.find(type);
#include <map>
#include <systemc>
#include <tlm>
+#include <typeindex>
using sc_core::sc_string_view;
-using sc_core::sc_type_index;
namespace tlm
{
}
unsigned int
- register_phase(sc_type_index type, sc_string_view name)
+ register_phase(std::type_index type, sc_string_view name)
{
type_map::const_iterator it = ids_.find(type);
}
private:
- typedef std::map<sc_type_index, key_type> type_map;
+ typedef std::map<std::type_index, key_type> type_map;
typedef std::vector<std::string> name_table;
type_map ids_;
#include <map>
#include <systemc>
#include <tlm>
+#include <typeindex>
namespace tlm
{
class ispex_registry // Copied from tlm_gp.cpp.
{
typedef unsigned int key_type;
- typedef std::map<sc_core::sc_type_index, key_type> type_map;
+ typedef std::map<std::type_index, key_type> type_map;
public:
static ispex_registry &
}
unsigned int
- register_extension(sc_core::sc_type_index type)
+ register_extension(std::type_index type)
{
type_map::const_iterator it = ids_.find(type);