MCPcopy Create free account
hub / github.com/Icinga/icinga2 / GetConstString

Method GetConstString

lib/config/applyrule-targeted.cpp:240–245  ·  view source on GitHub ↗

* @returns If the given expression is a constant string, its address. nullptr on failure. */

Source from the content-addressed store, hash-verified

238 * @returns If the given expression is a constant string, its address. nullptr on failure.
239 */
240const String * ApplyRule::GetConstString(Expression* exp, const Dictionary::Ptr& constants)
241{
242 auto cnst (GetConst(exp, constants));
243
244 return cnst && cnst->IsString() ? &cnst->Get<String>() : nullptr;
245}
246
247/**
248 * @returns If the given expression is a constant, its address. nullptr on failure.

Callers

nothing calls this directly

Calls 1

IsStringMethod · 0.80

Tested by

no test coverage detected