SystemC 3.0.0
Accellera SystemC proof-of-concept library
sc_name_gen.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
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#include <string>
34#include "sysc/utils/sc_hash.h"
35
36namespace sc_core{
37
38// ----------------------------------------------------------------------------
39// CLASS : sc_name_gen
40//
41// Unique name generator class.
42// ----------------------------------------------------------------------------
43
45{
46public:
47
50
51 const char* gen_unique_name( const char* basename_,
52 bool preserve_first = false );
53
54private:
55
56 sc_strhash<int*> m_unique_name_map;
57 std::string m_unique_name;
58
59private:
60
61 // disabled
62 sc_name_gen( const sc_name_gen& );
63 sc_name_gen& operator = ( const sc_name_gen& );
64};
65
66} // namespace sc_core
67
68// $Log: sc_name_gen.h,v $
69// Revision 1.5 2011/08/26 20:46:10 acg
70// Andy Goodrich: moved the modification log to the end of the file to
71// eliminate source line number skew when check-ins are done.
72//
73// Revision 1.4 2011/02/18 20:27:14 acg
74// Andy Goodrich: Updated Copyrights.
75//
76// Revision 1.3 2011/02/13 21:47:37 acg
77// Andy Goodrich: update copyright notice.
78//
79// Revision 1.2 2008/05/22 17:06:26 acg
80// Andy Goodrich: updated copyright notice to include 2008.
81//
82// Revision 1.1.1.1 2006/12/15 20:20:05 acg
83// SystemC 2.3
84//
85// Revision 1.3 2006/01/13 18:44:30 acg
86// Added $Log to record CVS changes into the source.
87
88#endif
89
90// Taf!
const char * gen_unique_name(const char *basename_, bool preserve_first=false)