00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00030 #include "pinapa-parser-all.h"
00031
00032 #ifndef PINAPA_PORT_PLUS_H
00033 #define PINAPA_PORT_PLUS_H
00034
00035 #include "pinapa-systemc-light.h"
00036 #include <ext/hash_set>
00037 #include "tlm_port.h"
00038
00039
00040
00046 namespace std {
00047 template <>
00048 struct equal_to<sc_port_base *> : public binary_function<sc_port_base *,
00049 sc_port_base *,
00050 bool> {
00051 bool operator()(sc_port_base * s1, sc_port_base * s2) const {
00052 return s1 == s2;
00053 }
00054 };
00055 }
00056
00057 namespace HASH_NAMESPACE {
00058 template <>
00059 struct hash<sc_port_base *> {
00060 size_t operator()(const sc_port_base * s) const {
00061 #ifdef PINAPA_DETERMINISTIC_LUSTRE
00062 return 0;
00063 #else
00064 hash<int> H;
00065 return H((int)s);
00066 #endif
00067 }
00068 };
00069 }
00070
00071 namespace std {
00072 template <>
00073 struct equal_to<tlm_port *> : public binary_function<tlm_port *,
00074 tlm_port *,
00075 bool> {
00076 bool operator()(tlm_port * s1, tlm_port * s2) const {
00077 return s1 == s2;
00078 }
00079 };
00080 }
00081
00082 namespace HASH_NAMESPACE {
00083 template <>
00084 struct hash<tlm_port *> {
00085 size_t operator()(const tlm_port * s) const {
00086 #ifdef PINAPA_DETERMINISTIC_LUSTRE
00087 return 0;
00088 #else
00089 hash<int> H;
00090 return H((int)s);
00091 #endif
00092 }
00093 };
00094 }
00095
00101 #endif // PINAPA_PORT_PLUS_H
00102