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

Method set_query_parameters

dds/DCPS/QueryConditionImpl.cpp:48–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48DDS::ReturnCode_t
49QueryConditionImpl::set_query_parameters(const DDS::StringSeq& query_parameters)
50{
51 ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, guard, lock_, false);
52
53 // Check sequence of strings that give values to the ‘parameters’ (i.e., "%n" tokens)
54 // in the query_expression matches the size of the parameter sequence.
55 // The tokens start with 0 which means that when the maximum number used is 1 we need
56 // two parameters, (zero and one)
57 if (query_parameters.length() != evaluator_.number_parameters()) {
58 if (DCPS_debug_level > 1) {
59 ACE_ERROR((LM_ERROR,
60 ACE_TEXT("(%P|%t) QueryConditionImpl::set_expression_parameters() - ")
61 ACE_TEXT("passed incorrect set of query parameters, expected %d received %d\n"),
62 evaluator_.number_parameters (), query_parameters.length()));
63 }
64 return DDS::RETCODE_ERROR;
65 }
66
67 query_parameters_ = query_parameters;
68 return DDS::RETCODE_OK;
69}
70
71std::vector<OPENDDS_STRING>
72QueryConditionImpl::getOrderBys() const

Callers 2

create_queryconditionMethod · 0.80

Calls 1

lengthMethod · 0.45

Tested by 1