void select_multiple::load(cgicc::Cgicc const &cgi) { chosen.clear(); cgicc::const_form_iterator p=cgi.getElements().begin(),e=cgi.getElements().end(); for(;p!=e;++p) { if(p->getName()==name) { map<string,string>::iterator orig=available.find(p->getValue()); if(orig!=available.end()) chosen.insert(orig->first); } } is_set=true; }
void checkbox::load(cgicc::Cgicc const &cgi) { cgicc::const_form_iterator p=cgi.getElements().begin(),e=cgi.getElements().end(); while(p!=e) { if(p->getName()==name && p->getValue()==input_value) { value=true; return; } ++p; } value=false; }
void submit::load(cgicc::Cgicc const &cgi) { is_set=true; cgicc::const_form_iterator v=cgi.getElement(name); if(v!=cgi.getElements().end()) pressed=true; }
void text::load(cgicc::Cgicc const &cgi) { cgicc::const_form_iterator v=cgi.getElement(name); if(v!=cgi.getElements().end()) { value=**v; is_set=true; } }
void select_base::load(cgicc::Cgicc const &cgi) { cgicc::const_form_iterator p=cgi.getElement(name); if(p==cgi.getElements().end()) { is_set=false; } else { value=**p; is_set=true; } }