MCPcopy Create free account
hub / github.com/SoarGroup/Soar / smem_setup_web_crawl

Function smem_setup_web_crawl

Core/SoarKernel/src/semantic_memory.cpp:2237–2265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2235//////////////////////////////////////////////////////////
2236
2237inline soar_module::sqlite_statement* smem_setup_web_crawl(agent* thisAgent, smem_weighted_cue_element* el)
2238{
2239 soar_module::sqlite_statement* q = NULL;
2240
2241 // first, point to correct query and setup
2242 // query-specific parameters
2243 if (el->element_type == attr_t)
2244 {
2245 // attribute_s_id=?
2246 q = thisAgent->smem_stmts->web_attr_all;
2247 }
2248 else if (el->element_type == value_const_t)
2249 {
2250 // attribute_s_id=? AND value_constant_s_id=?
2251 q = thisAgent->smem_stmts->web_const_all;
2252 q->bind_int(2, el->value_hash);
2253 }
2254 else if (el->element_type == value_lti_t)
2255 {
2256 // attribute_s_id=? AND value_lti_id=?
2257 q = thisAgent->smem_stmts->web_lti_all;
2258 q->bind_int(2, el->value_lti);
2259 }
2260
2261 // all require hash as first parameter
2262 q->bind_int(1, el->attr_hash);
2263
2264 return q;
2265}
2266
2267inline bool _smem_process_cue_wme(agent* thisAgent, wme* w, bool pos_cue, smem_prioritized_weighted_cue& weighted_pq, MathQuery* mathQuery)
2268{

Callers 1

smem_process_queryFunction · 0.85

Calls 1

bind_intMethod · 0.80

Tested by

no test coverage detected