/** * Implementation of AutoConnectElementBasis classes. * @file AutoConnectElementImpl.h * @author hieromon@gmail.com * @version 0.9.11 * @date 2019-06-25 * @copyright MIT license. */ #ifndef _AUTOCONNECTELEMENTBASISIMPL_H_ #define _AUTOCONNECTELEMENTBASISIMPL_H_ #include #include #if defined(ARDUINO_ARCH_ESP8266) #include #elif defined(ARDUINO_ARCH_ESP32) #include #endif #include "AutoConnectElementBasis.h" /** * Append post-tag accoring by the post attribute. * @param s An original string * @return A string that appended the post tag */ const String AutoConnectElementBasis::posterior(const String& s) const { String html; if (post == AC_Tag_BR) html = s + String(F("
")); else if (post == AC_Tag_P) html = String("

") + s + String(F("

")); else html = s; return html; } /** * Generate an HTML ")); html = AutoConnectElementBasis::posterior(html); } return html; } /** * Generate an HTML element. * A "value" is associated with the input tag and sent by the form * action as the value of "name". If the label member is contained, it * is placed to the right side of the checkbox to be labeled. * f the label member is empty, only the checkbox is placed. * @return An HTML string. */ const String AutoConnectCheckboxBasis::toHTML(void) const { String html = String(""); if (enable) { html = String(F("