11 os << n.
ns() <<
':' << n.
name();
12 static const char *
ev = getenv(
"DDNAMEID");
13 if (ev) os <<
'[' << n.
id() <<
']';
20 : id_(registerName(std::make_pair(name,ns))->
second)
28 if (result.second ==
"") {
41 if (result.second ==
"") {
73 if (
id <
id_type(id2n.size()) ) {
74 if(id2n[
id]->
first != nm) {
77 throw cms::Exception(
"DDException") <<
"DDName::DDName(std::pair<std::string,std::string>,id_type): id=" + s.str() +
" reg-name=?";
118 const std::pair<std::string,std::string>
p(name,ns);
130 idToName.push_back(reg_.begin());
134 std::pair<Registry::iterator,bool>
result = reg_.insert(val);
136 idToName.push_back(result.first);
const std::string & ns() const
Returns the namespace.
DDName is used to identify DDD entities uniquely.
static std::string & ns()
std::ostream & operator<<(std::ostream &out, const ALILine &li)
U second(std::pair< T, U > const &p)
std::map< std::pair< std::string, std::string >, id_type > Registry
static value_type & instance()
Container::value_type value_type
static void defineId(const std::pair< std::string, std::string > &, id_type id)
register pre-defined ids
std::vector< Registry::const_iterator > IdToName
static bool exists(const std::string &name, const std::string &ns)
true, if a DDName with given name and namespace (ns) already is registerd, otherwise false ...
static Registry::iterator registerName(const std::pair< std::string, std::string > &s)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
const std::string & name() const
Returns the name.