Commit e1c9370d authored by jan.koester's avatar jan.koester
Browse files

ostream support

parent 0baeb865
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -528,6 +528,11 @@ void libhtmlpp::HtmlString::_buildTree() {
    _buildtreenode(firstEl.get(),nullptr,_rootEl);
}

std::ostream& operator<<(std::ostream& os, const libhtmlpp::HtmlString& p) {
    os << p.str();
    return os;
}

void libhtmlpp::HtmlString::_serialelize(std::vector<char> in, libhtmlpp::HtmlElement *out) {
    size_t st=0,et=0;

+3 −0
Original line number Diff line number Diff line
@@ -294,6 +294,7 @@ namespace libhtmlpp {
        void _buildtreenode(DocElements *firstel,DocElements *lastel,std::unique_ptr<Element>&html);
        std::vector<char>    _Data;
        friend void HtmlEncode(const std::string &input,HtmlString *output);
        friend std::ostream& operator<<(std::ostream& os, const HtmlString& p);
        friend class HtmlPage;
    };

@@ -374,3 +375,5 @@ namespace libhtmlpp {
        size_t   _count;
    };
};

std::ostream& operator<<(std::ostream& os, const libhtmlpp::HtmlString& p);