TLM-2.0
2.0.4
Accellera TLM-2.0 proof-of-concept library
convenience_socket_bases.h
Go to the documentation of this file.
1
/*****************************************************************************
2
3
Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4
more contributor license agreements. See the NOTICE file distributed
5
with this work for additional information regarding copyright ownership.
6
Accellera licenses this file to you under the Apache License, Version 2.0
7
(the "License"); you may not use this file except in compliance with the
8
License. You may obtain a copy of the License at
9
10
http://www.apache.org/licenses/LICENSE-2.0
11
12
Unless required by applicable law or agreed to in writing, software
13
distributed under the License is distributed on an "AS IS" BASIS,
14
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15
implied. See the License for the specific language governing
16
permissions and limitations under the License.
17
18
*****************************************************************************/
19
#ifndef TLM_UTILS_CONVENIENCE_SOCKET_BASES_H_INCLUDED_
20
#define TLM_UTILS_CONVENIENCE_SOCKET_BASES_H_INCLUDED_
21
22
#include <
sysc/kernel/sc_cmnhdr.h
>
23
24
namespace
sc_core
{
class
SC_API
sc_object; }
25
26
namespace
tlm_utils
{
27
28
// implementation-defined base class helper for convenience sockets
29
class
SC_API
convenience_socket_base
30
{
31
public
:
32
void
display_warning(
const
char
* msg)
const
;
33
void
display_error(
const
char
* msg)
const
;
34
protected
:
35
virtual
~convenience_socket_base
(){}
36
private
:
37
virtual
const
char
* get_report_type()
const
= 0;
38
virtual
const
sc_core::sc_object
* get_socket()
const
= 0;
39
};
40
41
// implementation-defined base class helper for simple sockets
42
class
SC_API
simple_socket_base
:
public
convenience_socket_base
43
{
44
virtual
const
char
* get_report_type()
const
;
45
protected
:
46
void
elaboration_check(
const
char
* action)
const
;
47
};
48
49
// implementation-defined base class helper for passthrough sockets
50
class
SC_API
passthrough_socket_base
:
public
convenience_socket_base
51
{
52
virtual
const
char
* get_report_type()
const
;
53
};
54
55
// implementation-defined base class helper for multi sockets
56
class
SC_API
multi_socket_base
:
public
convenience_socket_base
57
{
58
virtual
const
char
* get_report_type()
const
;
59
};
60
61
// implementation-defined base class for callback helpers
62
class
SC_API
convenience_socket_cb_holder
63
{
64
public
:
65
void
display_warning(
const
char
* msg)
const
;
66
void
display_error(
const
char
* msg)
const
;
67
68
protected
:
69
explicit
convenience_socket_cb_holder
(
convenience_socket_base
* owner)
70
: m_owner(owner) {}
71
72
private
:
73
convenience_socket_base
* m_owner;
74
};
75
76
}
// namespace tlm_utils
77
#endif // TLM_UTILS_CONVENIENCE_SOCKET_BASES_H_INCLUDED_
sc_cmnhdr.h
tlm_utils::passthrough_socket_base
Definition:
convenience_socket_bases.h:50
tlm_utils
Definition:
convenience_socket_bases.h:26
tlm_utils::convenience_socket_base::~convenience_socket_base
virtual ~convenience_socket_base()
Definition:
convenience_socket_bases.h:35
tlm_utils::convenience_socket_cb_holder
Definition:
convenience_socket_bases.h:62
tlm_utils::simple_socket_base
Definition:
convenience_socket_bases.h:42
sc_core
sc_core::sc_object
tlm_utils::convenience_socket_cb_holder::convenience_socket_cb_holder
convenience_socket_cb_holder(convenience_socket_base *owner)
Definition:
convenience_socket_bases.h:69
tlm_utils::multi_socket_base
Definition:
convenience_socket_bases.h:56
tlm_utils::convenience_socket_base
Definition:
convenience_socket_bases.h:29
SC_API
#define SC_API
tlm_utils
convenience_socket_bases.h
Generated on Sun Oct 28 2018 23:12:14 for TLM-2.0 by
1.8.13