32 std::ostringstream description;
33 description <<
NeiTable.size() <<
" entries";
34 this->getDisplayString().setTagArg(
"t", 0, description.str().c_str());
35 this->getDisplayString().setTagArg(
"t", 1,
"t");
59 if (it->getApn() == apn)
81 if (it->hasNeighbor(neighbor)) {
82 apnlist->push_back(it->getApn());
89 cXMLElement* mainTag = NULL;
90 if (config != NULL && config->hasChildren() && config->getFirstChildWithTag(
ELEM_NEIGHTAB))
93 EV <<
"configData parameter not initialized!" << endl;
97 cXMLElementList apnlist = mainTag->getChildrenByTagName(
ELEM_APN);
98 for (cXMLElementList::const_iterator it = apnlist.begin(); it != apnlist.end(); ++it) {
102 EV <<
"\nError when parsing NeighborTable record" << endl;
110 cXMLElementList neighborlist = m->getChildrenByTagName(
ELEM_NEIGHBOR);
111 for (cXMLElementList::const_iterator jt = neighborlist.begin(); jt != neighborlist.end(); ++jt) {
112 cXMLElement* n = *jt;
115 EV <<
"\nError when parsing Synonym record" << endl;
const char * ELEM_NEIGHBOR
Application Process Name class.
void addNewNeighbor(const APN &apn, const APN &neighbor)
void parseConfig(cXMLElement *config)
NeighborEntries::const_iterator NeiEntryCItem
std::list< APN > APNList
APNList represents the list of APNs.
const char * PAR_CONFIGDATA
void addNeighborEntry(const APN &apn)
const char * ELEM_NEIGHTAB
Define_Module(NeighborTable)
void updateDisplayString()
virtual void initialize()
const APNList * findNeighborsByApn(const APN &apn)
virtual void handleMessage(cMessage *msg)
void removeNeighborEntry(const APN &apn)
NeighborTableEntry * findNeighborEntryByApn(const APN &apn)
const APNList * findApnsByNeighbor(const APN &neighbor)
NeighborEntries::iterator NeiEntryItem
void addNeighbor(const APN &neighbor)
const APNList & getNeigbors() const