/** @brief Parse a single event. * * @param event Pointer to the \<event\> node. * @param tuple Pointer to the tuple info struct for this event. */ static void parser_event(xmlNodePtr event, tupleinfo *tuple) { resource *res; resourcetype *restype; xmlChar *type; int n; xmlNodePtr cur; assert(tuple!=NULL); assert(event!=NULL); cur=event->children; while(cur!=NULL) { if(!xmlStrcmp(cur->name, XMLCHAR "resource")) { type=parser_getprop_str(cur, XMLCHAR "type"); restype=restype_find(CHAR type); if(restype==NULL) INVPROP("type", cur); xmlFree(type); } cur=cur->next; } for(n=0; n<dat_typenum; n++) { restype=&dat_restype[n]; res=parser_event_get_res(event, restype); if(res==NULL&&(!restype->var)) { fatal(_("Definition of event '%s' is missing constant " "resource type '%s' (line %d)"), tuple->name, restype->type, xmlGetLineNo(event)); } if(res!=NULL) tuple_set(tuple, res); } }
proxy& set(T&& item) { tuple_set(std::make_index_sequence<std::tuple_size<meta::unqualified_t<key_type>>::value>(), std::forward<T>(item)); return *this; }