33 std::string delimiter =
"_";
36 std::vector<std::string> tokens;
37 while ((pos = composite.find(delimiter)) != std::string::npos) {
38 tokens.push_back(composite.substr(0, pos));
39 composite.erase(0, pos + delimiter.length());
41 tokens.push_back(composite);
43 if (tokens.size() == 2) {
46 std::ostringstream os;
51 if (tokens.size() == 1) {
59 ipcAddress(
APN(ipcaddr)), difName(
DAP(difnam))
61 std::ostringstream os;
62 os << ipcaddr <<
"_" << difnam;
108 std::ostringstream os;
131 return os << addr.
info();
136 for (
AddrCItem it = dims.begin(); it != dims.end(); ++it)
137 os << it->info() << endl;
const DAP & getDifName() const
Getter of common DIF name.
void setDifName(const DAP &difName)
Setter of common DIF name.
std::list< Address > Addresses
void setIpcAddress(const APN &ipcAddress)
Setter of IPC Process address which should be unambiguous within DIF.
bool operator==(const Address &other) const
DAP difName
Commong DIF name represented by DAP.
Application Process Name class.
virtual ~Address()
Destructor assigning default values.
APN ipcAddress
IPC Process address represented by APN.
const APN & getIpcAddress() const
Getter of IPC Process address which should be unambiguous within DIF.
static const Address UNSPECIFIED_ADDRESS
std::string info() const
Info text output suitable for << string streams and WATCH.
Addresses::const_iterator AddrCItem
bool operator<(const Address &other) const
const std::string & getName() const
Gets DAP string name representation.
bool isUnspecified() const
Checks whether a given Address is unspecified which means that it has empty attributes.
APN apname
Concatenation of IPC Process address and DIF name represented as APN.
const APN & getApn() const
Getter of unique APN which is initialized during object construction.
const std::string & getName() const
Gets APN string name representation.
Address()
Constructor of blank Address.
Address class holds IPC Process identification.
Distributed Application Process name a.k.a. DAP class.
std::ostream & operator<<(std::ostream &os, const Address &addr)
<< operator overload that calls Address.info() method