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
20/*****************************************************************************
21
22  sc_utils_ids.cpp -- Report ids for the utils code.
23
24  Original Author: Martin Janssen, Synopsys, Inc., 2002-01-17
25
26  CHANGE LOG AT END OF FILE
27 *****************************************************************************/
28
29
30#include <cstdlib>
31#include <cstring>
32
33#include "sysc/utils/sc_report.h"
34
35
36namespace sc_core {
37#define SC_DEFINE_MESSAGE(id,unused,text) extern const char id[] = text;
38#include "sysc/utils/sc_utils_ids.h"
39#include "sysc/kernel/sc_kernel_ids.h"
40#include "sysc/communication/sc_communication_ids.h"
41#include "sysc/datatypes/bit/sc_bit_ids.h"
42#include "sysc/datatypes/fx/sc_fx_ids.h"
43#include "sysc/datatypes/int/sc_int_ids.h"
44#include "sysc/tracing/sc_tracing_ids.h"
45#undef SC_DEFINE_MESSAGE
46
47
48static sc_msg_def texts[] = {
49#define SC_DEFINE_MESSAGE(id,n,unused) \
50    { (id), 0u, {0u}, 0u, {0u}, 0u, 0u, {0u}, 0, n },
51
52#undef SC_UTILS_IDS_H
53#include "sysc/utils/sc_utils_ids.h"
54
55#undef SC_KERNEL_IDS_H
56#include "sysc/kernel/sc_kernel_ids.h"
57
58#undef SC_COMMUNICATION_IDS_H
59#include "sysc/communication/sc_communication_ids.h"
60
61#undef SC_BIT_IDS_H
62#include "sysc/datatypes/bit/sc_bit_ids.h"
63
64#undef SC_FX_IDS_H
65#include "sysc/datatypes/fx/sc_fx_ids.h"
66
67#undef SC_INT_IDS_H
68#include "sysc/datatypes/int/sc_int_ids.h"
69
70#undef SC_TRACING_IDS_H
71#include "sysc/tracing/sc_tracing_ids.h"
72
73#undef SC_DEFINE_MESSAGE
74};
75static sc_report_handler::msg_def_items items = {
76    texts, sizeof(texts)/sizeof(*texts), false, 0
77};
78
79static
80int initialize()
81{
82    sc_report_handler::add_static_msg_types(&items);
83
84    // PROCESS ANY ENVIRONMENTAL OVERRIDES:
85
86    const char* deprecation_warn = std::getenv("SC_DEPRECATION_WARNINGS");
87    if ( (deprecation_warn!=0) && !std::strcmp(deprecation_warn,"DISABLE") )
88    {
89        sc_report_handler::set_actions( SC_ID_IEEE_1666_DEPRECATION_
90                                      , SC_DO_NOTHING);
91    }
92    return 42;
93}
94
95static int forty_two = initialize();
96
97} // namespace sc_core
98
99/*****************************************************************************
100
101  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
102  changes you are making here.
103
104      Name, Affiliation, Date:
105  Description of Modification:
106
107  Alex Riesen, Synopsys, Inc., 2003-02-02
108  ported to SystemC 2.1 exception reporting.
109
110 *****************************************************************************/
111
112
113// $Log: sc_utils_ids.cpp,v $
114// Revision 1.5  2011/08/26 20:46:19  acg
115//  Andy Goodrich: moved the modification log to the end of the file to
116//  eliminate source line number skew when check-ins are done.
117//
118// Revision 1.4  2011/02/18 20:38:44  acg
119//  Andy Goodrich: Updated Copyright notice.
120//
121// Revision 1.3  2009/02/28 00:27:57  acg
122//  Andy Goodrich: includes for C++ library types to keep compiler happy.
123//
124// Revision 1.2  2008/05/20 20:43:21  acg
125//  Andy Goodrich: Added includes <cstdlib> and <cstring> to pick up their
126//  declarations.
127//
128// Revision 1.1.1.1  2006/12/15 20:20:06  acg
129// SystemC 2.3
130//
131// Revision 1.6  2006/01/31 21:42:07  acg
132//  Andy Goodrich: Added checks for SC_DEPRECATED_WARNINGS being defined as
133//  DISABLED. If so, we turn off the /IEEE_Std_1666/deprecated message group.
134//
135// Revision 1.5  2006/01/24 21:59:59  acg
136//  Andy Goodrich: removed sc_trace_ids.h since its only message has been
137//  replaced by SC_ID_IEEE_1666_DEPRECATION_ message.
138//
139// Revision 1.4  2006/01/24 20:53:41  acg
140// Andy Goodrich: added warnings indicating that use of integer ids in reports
141// is deprecated. Added tracing/sc_trace_ids.h to message list.
142//
143// Revision 1.3  2006/01/13 18:53:11  acg
144// Andy Goodrich: Added $Log command so that CVS comments are reproduced in
145// the source.
146
147// Taf!
148