Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
WAST::NameScope Struct Reference

Public Member Functions

 NameScope (const char inSigil)
 
void map (std::string &name)
 

Detailed Description

Definition at line 142 of file Print.cpp.

Constructor & Destructor Documentation

◆ NameScope()

WAST::NameScope::NameScope ( const char inSigil)
inline

Definition at line 144 of file Print.cpp.

144: sigil(inSigil) { nameToCountMap[""] = 0; }

Member Function Documentation

◆ map()

void WAST::NameScope::map ( std::string & name)
inline

Definition at line 146 of file Print.cpp.

147 {
148 auto mapIt = nameToCountMap.find(name);
149 if(mapIt == nameToCountMap.end()) { nameToCountMap[name] = 1; }
150 else { name = name + std::to_string(mapIt->second++); }
151 name = sigil + name;
152 }
std::string name
Here is the caller graph for this function:

The documentation for this struct was generated from the following file: