34 const string &empty) :
35 _separator(separator),
67 string NameUniquifier::
68 add_name_body(
const string &name,
const string &prefix) {
70 if (_names.insert(name).second) {
83 static const int max_len = 16;
84 char num_str[max_len];
85 sprintf(num_str,
"%d", ++_counter);
86 nassertr((
int)strlen(num_str) <= max_len,
"");
89 temp_name = _empty + num_str;
91 temp_name = prefix + _separator + num_str;
93 }
while (!_names.insert(temp_name).second);
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
NameUniquifier(const std::string &separator=std::string(), const std::string &empty=std::string())
Creates a new NameUniquifier.