43 std::vector<std::string> &
split(
const std::string &s,
char delim, std::vector<std::string> &elems);
44 std::vector<std::string>
split(
const std::string &s,
char delim);
50 std::string
join(
const std::vector<std::string> &elems,
const unsigned int n,
const char delim);
57 bool isPrefix(std::string prefix, std::string s);
90 template<
typename modType>
93 std::initializer_list<const char*> modPath,
94 bool nullCheck =
true)
96 std::ostringstream modulePath;
97 while (parentLevel--) { modulePath <<
".^"; }
98 for (
auto elem : modPath) { modulePath <<
"." << elem; }
99 cModule* mod = curMod->getModuleByPath(modulePath.str().c_str());
100 return (nullCheck ? check_and_cast<modType>(mod) :
dynamic_cast<modType
>(mod));
std::string join(const std::vector< std::string > &elems, const unsigned int n, const char delim)
modType getRINAModule(cModule *curMod, int parentLevel, std::initializer_list< const char * > modPath, bool nullCheck=true)
std::vector< std::string > & split(const std::string &s, char delim, std::vector< std::string > &elems)
void interconnectModules(cModule *m1, cModule *m2, std::string n1, std::string n2)
bool isPrefix(std::string prefix, std::string s)
void setPolicyDisplayString(cModule *mod, const char *str=nullptr)