ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change
on this file since 3848e0e was
51b7345,
checked in by Peter A. Buhr <pabuhr@…>, 10 years ago
|
initial commit
|
-
Property mode set to
100644
|
File size:
449 bytes
|
Line | |
---|
1 | /* |
---|
2 | * This file is part of the Cforall project |
---|
3 | * |
---|
4 | * $Id: UniqueName.cc,v 1.1 2002/04/30 03:30:14 rcbilson Exp $ |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include <string> |
---|
9 | #include <strstream> |
---|
10 | |
---|
11 | #include "UniqueName.h" |
---|
12 | |
---|
13 | UniqueName::UniqueName( const std::string &base ) |
---|
14 | : base( base ), count( 0 ) |
---|
15 | { |
---|
16 | } |
---|
17 | |
---|
18 | std::string |
---|
19 | UniqueName::newName( const std::string &additional ) |
---|
20 | { |
---|
21 | std::ostrstream os; |
---|
22 | os << base << additional << count++; |
---|
23 | return std::string( os.str(), os.pcount() ); |
---|
24 | } |
---|
25 | |
---|
Note: See
TracBrowser
for help on using the repository browser.