refactor: move impl into .cpp + fix include paths

This commit is contained in:
Roland Conybeare 2023-10-11 19:19:44 -04:00
commit 38b8f34b28
9 changed files with 123 additions and 50 deletions

28
src/webutil/Alist.cpp Normal file
View file

@ -0,0 +1,28 @@
/* @file Alist.cpp */
#include "Alist.hpp"
namespace xo {
namespace web {
/* lookup association by name */
std::string_view
Alist::lookup(std::string n) const {
for (auto const & ix : this->assoc_v_) {
if (ix.first == n) {
return ix.second;
}
}
return "";
} /*lookup*/
void
Alist::push_back(std::string n, std::string v) {
this->assoc_v_.push_back(std::make_pair(std::move(n), std::move(v)));
}
} /*namespace web*/
} /*namespace xo*/
/* end Alist.cpp */