23 typedef std::map<std::pair<std::string,std::string>,id_type>
Registry;
24 typedef std::vector<Registry::const_iterator>
IdToName;
37 static void defineId(
const std::pair<std::string,std::string> &, id_type
id);
57 id_type
id()
const {
return id_;}
65 static Registry::iterator
registerName(
const std::pair<std::string,std::string> &
s);
86 virtual operator bool()
const=0;
89 virtual int id()
const=0;
const std::string & ns() const
Returns the namespace.
DDName is used to identify DDD entities uniquely.
std::ostream & operator<<(std::ostream &os, const DDName &n)
DDNameInterface provides a common interface to DDD entities.
std::map< std::pair< std::string, std::string >, id_type > Registry
const std::string fullname() const
bool operator<(const DDName &rhs) const
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 ...
bool operator==(const DDName &rhs) const
virtual ~DDNameInterface()
static Registry::iterator registerName(const std::pair< std::string, std::string > &s)
const std::string & name() const
Returns the name.
DDName ddname() const
Return the DDName.