MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / get_annotation_member_ev

Function get_annotation_member_ev

dds/idl/annotations.cpp:86–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86AST_Expression::AST_ExprValue* get_annotation_member_ev(
87 AST_Annotation_Appl* appl, const char* member_name, AST_Expression::ExprType type)
88{
89 AST_Annotation_Member* member =
90 dynamic_cast<AST_Annotation_Member*>((*appl)[member_name]);
91 if (member) {
92 AST_Expression* e = member->value();
93 if (e && e->ev()) {
94 if (e->ev()->et != type) {
95 be_util::misc_error_and_abort(std::string("Found unexpected expression type "
96 "while getting value of member \"") +
97 member_name + "\" of annotation \"" +
98 appl->local_name()->get_string() + '"',
99 appl);
100 }
101 return e->ev();
102 }
103 }
104
105 be_util::misc_error_and_abort(std::string("Found null pointer while getting value of member \"") +
106 member_name + "\" of annotation \"" +
107 appl->local_name()->get_string() + '"',
108 appl);
109 return 0;
110}
111
112bool get_bool_annotation_member_value(AST_Annotation_Appl* appl,
113 const char* member_name)

Calls 2

valueMethod · 0.45
get_stringMethod · 0.45

Tested by

no test coverage detected