Loading src/html.cpp +183 −299 File changed.Preview size limit exceeded, changes collapsed. Show changes src/html.h +12 −12 Original line number Original line Diff line number Diff line Loading @@ -70,9 +70,9 @@ namespace libhtmlpp { Element(); Element(); std::unique_ptr<Element> _nextElement; Element* _prevElement; Element* _prevElement; Element* _nextElement; Element* _firstElement; friend class HtmlElement; friend class HtmlElement; friend class TextElement; friend class TextElement; Loading Loading @@ -118,14 +118,14 @@ namespace libhtmlpp { void remove(Element* el); void remove(Element* el); protected: protected: Element* _childElement; std::unique_ptr<Element> _childElement; struct Attributes { struct Attributes { Attributes(); Attributes(); ~Attributes(); ~Attributes(); std::vector<char> _Key; std::vector<char> _Key; std::vector<char> _Value; std::vector<char> _Value; Attributes* _nextAttr; std::unique_ptr<Attributes> _nextAttr; }; }; private: private: Loading @@ -133,7 +133,7 @@ namespace libhtmlpp { std::vector<char> _TagName; std::vector<char> _TagName; //if text Attributes must be zero //if text Attributes must be zero Attributes* _firstAttr; std::unique_ptr<Attributes> _firstAttr; Attributes* _lastAttr; Attributes* _lastAttr; friend class HtmlString; friend class HtmlString; Loading Loading @@ -285,13 +285,13 @@ namespace libhtmlpp { const std::string str(); const std::string str(); const char *c_str(); const char *c_str(); libhtmlpp::Element *parse(); libhtmlpp::Element &parse(); bool validate(std::string *err); private: private: std::unique_ptr<DocElements> firstEl; void _serialelize(std::vector<char> in, HtmlElement* out); void _serialelize(std::vector<char> in, HtmlElement* out); Element *_buildTree(); Element &_buildTree(); void _buildtreenode(const DocElements *firstel,const DocElements *lastel); void _buildtreenode(std::unique_ptr<DocElements> &firstel,DocElements *lastel); std::vector<char> _Data; std::vector<char> _Data; std::string _Str; std::string _Str; std::stack<Element*> _Childs; std::stack<Element*> _Childs; Loading Loading
src/html.h +12 −12 Original line number Original line Diff line number Diff line Loading @@ -70,9 +70,9 @@ namespace libhtmlpp { Element(); Element(); std::unique_ptr<Element> _nextElement; Element* _prevElement; Element* _prevElement; Element* _nextElement; Element* _firstElement; friend class HtmlElement; friend class HtmlElement; friend class TextElement; friend class TextElement; Loading Loading @@ -118,14 +118,14 @@ namespace libhtmlpp { void remove(Element* el); void remove(Element* el); protected: protected: Element* _childElement; std::unique_ptr<Element> _childElement; struct Attributes { struct Attributes { Attributes(); Attributes(); ~Attributes(); ~Attributes(); std::vector<char> _Key; std::vector<char> _Key; std::vector<char> _Value; std::vector<char> _Value; Attributes* _nextAttr; std::unique_ptr<Attributes> _nextAttr; }; }; private: private: Loading @@ -133,7 +133,7 @@ namespace libhtmlpp { std::vector<char> _TagName; std::vector<char> _TagName; //if text Attributes must be zero //if text Attributes must be zero Attributes* _firstAttr; std::unique_ptr<Attributes> _firstAttr; Attributes* _lastAttr; Attributes* _lastAttr; friend class HtmlString; friend class HtmlString; Loading Loading @@ -285,13 +285,13 @@ namespace libhtmlpp { const std::string str(); const std::string str(); const char *c_str(); const char *c_str(); libhtmlpp::Element *parse(); libhtmlpp::Element &parse(); bool validate(std::string *err); private: private: std::unique_ptr<DocElements> firstEl; void _serialelize(std::vector<char> in, HtmlElement* out); void _serialelize(std::vector<char> in, HtmlElement* out); Element *_buildTree(); Element &_buildTree(); void _buildtreenode(const DocElements *firstel,const DocElements *lastel); void _buildtreenode(std::unique_ptr<DocElements> &firstel,DocElements *lastel); std::vector<char> _Data; std::vector<char> _Data; std::string _Str; std::string _Str; std::stack<Element*> _Childs; std::stack<Element*> _Childs; Loading