OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Parser::anonymous_namespace{ParserNode.h} Namespace Reference

Functions

template<typename T >
const std::string * validate_and_get_str (T name_value_assign)
 

Function Documentation

template<typename T >
const std::string* Parser::anonymous_namespace{ParserNode.h}::validate_and_get_str ( name_value_assign)

Definition at line 2245 of file ParserNode.h.

References CHECK.

Referenced by Parser::DefaultValidate< StringLiteral >::operator()(), and Parser::CaseSensitiveValidate::operator()().

2245  {
2246  auto str = dynamic_cast<const StringLiteral*>(name_value_assign->get_value());
2247  if (!str) {
2248  auto option_name = name_value_assign->get_name();
2249  CHECK(option_name);
2250  throw std::runtime_error("The \"" + *option_name + "\" option must be a string.");
2251  }
2252  return str->get_stringval();
2253 }
#define CHECK(condition)
Definition: Logger.h:291

+ Here is the caller graph for this function: