16 #ifndef __OMNETPP_CTOPOLOGY_H    17 #define __OMNETPP_CTOPOLOGY_H    21 #include "cownedobject.h"    22 #include "csimulation.h"    32 #define INFINITY HUGE_VAL    72         std::vector<Link*> inLinks;
    73         std::vector<Link*> outLinks;
    83         Node(
int moduleId=-1) {this->moduleId=moduleId; weight=0; enabled=
true; dist=INFINITY; outPath=
nullptr;}
   197         Link(
double weight=1) {srcNode=destNode=
nullptr; srcGateId=destGateId=-1; this->weight=weight; enabled=
true;}
   333         virtual bool matches(
cModule *module) = 0;
   337     std::vector<Node*> nodes;
   341     static bool lessByModuleId(
Node *a, 
Node *b) { 
return (
unsigned int)a->moduleId < (
unsigned int)b->moduleId; }
   342     static bool isModuleIdLess(
Node *a, 
int moduleId) { 
return (
unsigned int)a->moduleId < (
unsigned int)moduleId; }
   344     void unlinkFromSourceNode(
Link *link);
   345     void unlinkFromDestNode(
Link *link);
   354     explicit cTopology(
const char *name=
nullptr);
   385     virtual std::string str() 
const override;
   392     virtual void parsimPack(
cCommBuffer *buffer) 
const override;
   399     virtual void parsimUnpack(
cCommBuffer *buffer) 
override;
   417     virtual void extractFromNetwork(
bool (*selfunc)(
cModule *,
void *), 
void *userdata=
nullptr);
   422     virtual void extractFromNetwork(
Predicate *predicate);
   433     virtual void extractByModulePath(
const std::vector<std::string>& fullPathPatterns);
   445     virtual void extractByNedTypeName(
const std::vector<std::string>& nedTypeNames);
   465     virtual void extractByProperty(
const char *propertyName, 
const char *value=
nullptr);
   473     virtual void extractByParameter(
const char *paramName, 
const char *paramValue=
nullptr);
   478     virtual void clear();
   488     virtual int addNode(
Node *node);
   494     virtual void deleteNode(
Node *node);
   501     virtual void addLink(
Link *link, 
Node *srcNode, 
Node *destNode);
   510     virtual void addLink(
Link *link, 
cGate *srcGate, 
cGate *destGate);
   516     virtual void deleteLink(
Link *link);
   536     virtual Node *getNode(
int i);
   560     virtual void calculateUnweightedSingleShortestPathsTo(
Node *target);
   567     virtual void calculateWeightedSingleShortestPathsTo(
Node *target);
 Supporting class for cTopology, represents a node in the graph. 
Definition: ctopology.h:64
 
cGate * getRemoteGate() const 
Definition: ctopology.h:269
 
Node * getLocalNode() const 
Definition: ctopology.h:300
 
double getDistanceToTarget() const 
Definition: ctopology.h:160
 
Represents a module gate. 
Definition: cgate.h:63
 
int getNumPaths() const 
Definition: ctopology.h:166
 
int getLocalGateId() const 
Definition: ctopology.h:264
 
cModule * getModule(int id) const 
Definition: csimulation.h:215
 
void setWeight(double d)
Definition: ctopology.h:109
 
virtual cTopology * dup() const override
Definition: ctopology.h:379
 
Node * getRemoteNode() const 
Definition: ctopology.h:249
 
virtual Link * createLink()
Definition: ctopology.h:585
 
int getRemoteGateId() const 
Definition: ctopology.h:259
 
virtual int getNumNodes() const 
Definition: ctopology.h:530
 
cGate * getLocalGate() const 
Definition: ctopology.h:320
 
Node * getRemoteNode() const 
Definition: ctopology.h:295
 
void enable()
Definition: ctopology.h:222
 
double getWeight() const 
Definition: ctopology.h:204
 
cGate * getRemoteGate() const 
Definition: ctopology.h:315
 
bool isEnabled() const 
Definition: ctopology.h:115
 
cGate * getLocalGate() const 
Definition: ctopology.h:274
 
void disable()
Definition: ctopology.h:228
 
This class represents modules in the simulation. 
Definition: cmodule.h:47
 
bool isEnabled() const 
Definition: ctopology.h:216
 
int getRemoteGateId() const 
Definition: ctopology.h:305
 
int getLocalGateId() const 
Definition: ctopology.h:310
 
int getNumInLinks() const 
Definition: ctopology.h:136
 
Buffer for the communications layer of parallel simulation. 
Definition: ccommbuffer.h:41
 
Link(double weight=1)
Definition: ctopology.h:197
 
LinkOut * getPath(int) const 
Definition: ctopology.h:173
 
virtual Node * getTargetNode() const 
Definition: ctopology.h:573
 
A cObject that keeps track of its owner. It serves as base class for many classes in the OMNeT++ libr...
Definition: cownedobject.h:104
 
Supporting class for cTopology, represents a link in the graph. 
Definition: ctopology.h:181
 
cModule * getModule() const 
Definition: ctopology.h:97
 
void setWeight(double d)
Definition: ctopology.h:210
 
virtual Node * createNode(cModule *module)
Definition: ctopology.h:580
 
Routing support. The cTopology class was designed primarily to support routing in telecommunication o...
Definition: ctopology.h:54
 
Base class for selector objects used in extract...() methods of cTopology. 
Definition: ctopology.h:329
 
Definition: cabstracthistogram.h:21
 
int getId() const 
Definition: ccomponent.h:361
 
Node(int moduleId=-1)
Definition: ctopology.h:83
 
Supporting class for cTopology. 
Definition: ctopology.h:286
 
Supporting class for cTopology. 
Definition: ctopology.h:240
 
void enable()
Definition: ctopology.h:121
 
double getWeight() const 
Definition: ctopology.h:103
 
cSimulation * getSimulation()
Returns the currently active simulation. 
Definition: csimulation.h:575
 
int getNumOutLinks() const 
Definition: ctopology.h:146
 
void disable()
Definition: ctopology.h:127
 
Node * getLocalNode() const 
Definition: ctopology.h:254
 
int getModuleId() const 
Definition: ctopology.h:92