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

Method MultiTopicImpl

dds/DCPS/MultiTopicImpl.cpp:39–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39MultiTopicImpl::MultiTopicImpl(const char* name,
40 const char* type_name, const char* subscription_expression,
41 const DDS::StringSeq& expression_parameters,
42 DomainParticipantImpl* participant)
43 : TopicDescriptionImpl(name, type_name,
44 findTypeSupport(participant, type_name),
45 participant)
46 , subscription_expression_(subscription_expression)
47 , expression_parameters_(expression_parameters)
48{
49 const char* out = subscription_expression
50 + std::strlen(subscription_expression);
51 yard::SimpleTextParser parser(subscription_expression, out);
52 if (!parser.Parse<TopicExpressionGrammar::TopicCompleteInput>()) {
53 reportErrors(parser, subscription_expression);
54 }
55
56 for (AstNode* iter = parser.GetAstRoot()->GetFirstChild(); iter;
57 iter = iter->GetSibling()) {
58 if (iter->TypeMatches<TopicExpressionGrammar::SubjectFieldSpec>()) {
59 AstNode* fieldName = iter->GetFirstChild();
60 aggregation_.push_back(SubjectFieldSpec(toString(fieldName),
61 toString(fieldName->GetSibling())));
62 } else if (iter->TypeMatches<TopicExpressionGrammar::TopicName>()) {
63 selection_.push_back(toString(iter));
64 } else {
65 filter_eval_.reset(new FilterEvaluator(iter));
66 }
67 }
68}
69
70MultiTopicImpl::~MultiTopicImpl()
71{

Callers

nothing calls this directly

Calls 8

findTypeSupportFunction · 0.85
reportErrorsFunction · 0.85
toStringFunction · 0.85
GetFirstChildMethod · 0.80
GetAstRootMethod · 0.80
GetSiblingMethod · 0.80
SubjectFieldSpecClass · 0.70
resetMethod · 0.45

Tested by

no test coverage detected