Пример #1
0
static void eachConfigVarHTML(ConfigVarBase::ptr var, Stream::ptr stream)
{
    std::string name = var->name();
    stream->write("<tr><td align=\"right\">", 22);
    stream->write(name.c_str(), name.size());
    stream->write("=</td><td>", 10);
    std::string value = var->toString();
    stream->write(value.c_str(), value.size());
    stream->write("</td></tr>\n", 11);
}
Пример #2
0
static void eachConfigVarHTMLWrite(ConfigVarBase::ptr var, Stream::ptr stream)
{
    std::string name = var->name();
    stream->write("<tr><td align=\"right\">", 22);
    stream->write(name.c_str(), name.size());
    stream->write("=</td><td><form name=\"", 22);
    stream->write(name.c_str(), name.size());
    stream->write("\" method=\"post\"><input type=\"text\" name=\"", 41);
    stream->write(name.c_str(), name.size());
    stream->write("\" value=\"", 9);
    std::string value = var->toString();
    stream->write(value.c_str(), value.size());
    stream->write("\" /><input type=\"submit\" value=\"Change\" /></form></td></tr>\n", 60);
}
Пример #3
0
static void eachConfigVarJSON(ConfigVarBase::ptr var, JSON::Object &object)
{
    object.insert(std::make_pair(var->name(), var->toString()));
}
Пример #4
0
static void listProperties(std::ostringstream *os, ConfigVarBase::ptr var)
{
    *os << "    <property name=\"" << var->name() << "\" value=\""
        << var->toString() << "\" />" << std::endl;
}