24 typedef std::map<std::pair<std::string,std::string>,id_type>
Registry;
25 typedef std::vector<Registry::const_iterator>
IdToName;
38 static void defineId(
const std::pair<std::string,std::string> &, id_type
id);
58 id_type
id()
const {
return id_;}
66 static Registry::iterator
registerName(
const std::pair<std::string,std::string> &
s);
87 virtual operator bool()
const=0;
90 virtual int id()
const=0;
Streaming the DDD transient store from/into a std::istream/std::ostream */.
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.