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_name_gen.h -- Unique name generator.
23
24  Original Author: Martin Janssen, Synopsys, Inc., 2001-05-21
25
26  CHANGE LOG AT THE END OF THE FILE
27 *****************************************************************************/
28
29
30#ifndef SC_NAME_GEN
31#define SC_NAME_GEN
32
33
34#include <cstdio>
35
36#include "sysc/utils/sc_hash.h"
37
38namespace sc_core{
39
40// ----------------------------------------------------------------------------
41//  CLASS : sc_name_gen
42//
43//  Unique name generator class.
44// ----------------------------------------------------------------------------
45
46class sc_name_gen
47{
48public:
49
50    sc_name_gen();
51    ~sc_name_gen();
52
53    const char* gen_unique_name( const char* basename_,
54                                 bool preserve_first = false
55                               );
56
57private:
58
59    sc_strhash<int*> m_unique_name_map;
60    char             m_unique_name[BUFSIZ];
61
62private:
63
64    // disabled
65    sc_name_gen( const sc_name_gen& );
66    sc_name_gen& operator = ( const sc_name_gen& );
67};
68
69} // namespace sc_core
70
71// $Log: sc_name_gen.h,v $
72// Revision 1.5  2011/08/26 20:46:10  acg
73//  Andy Goodrich: moved the modification log to the end of the file to
74//  eliminate source line number skew when check-ins are done.
75//
76// Revision 1.4  2011/02/18 20:27:14  acg
77//  Andy Goodrich: Updated Copyrights.
78//
79// Revision 1.3  2011/02/13 21:47:37  acg
80//  Andy Goodrich: update copyright notice.
81//
82// Revision 1.2  2008/05/22 17:06:26  acg
83//  Andy Goodrich: updated copyright notice to include 2008.
84//
85// Revision 1.1.1.1  2006/12/15 20:20:05  acg
86// SystemC 2.3
87//
88// Revision 1.3  2006/01/13 18:44:30  acg
89// Added $Log to record CVS changes into the source.
90
91#endif
92
93// Taf!
94