27 typedef std::vector<Registry::const_iterator>
IdToName;
32 const std::string &
ns);
41 static void defineId(
const std::pair<std::string,std::string> &,
id_type id);
46 static bool exists(
const std::string &
name,
const std::string &
ns);
48 const std::string &
name()
const;
51 const std::string &
ns()
const;
59 operator std::string()
const {
return ns() +
":" +
name(); }
69 static Registry::iterator
registerName(
const std::pair<std::string,std::string> &
s);
83 virtual const std::string &
name()
const=0;
86 virtual const std::string &
ns()
const=0;
91 virtual operator bool()
const=0;
94 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 &out, const ALILine &li)
DDNameInterface provides a common interface to DDD entities.
std::map< std::pair< std::string, std::string >, id_type > Registry
virtual const std::string & ns() const =0
Return the namespace.
const std::string fullname() const
bool operator<(const DDName &rhs) const
virtual const std::string & name() const =0
Returns the name without the namespace.
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.
virtual int id() const =0
don't use !
DDName ddname() const
Return the DDName.