/* * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once #include #include #include #include #include #include #include namespace Swift { class SWIFTEN_API FormSerializer : public GenericPayloadSerializer
{ public: FormSerializer(); virtual std::string serializePayload(std::shared_ptr) const; private: std::shared_ptr textToXML(std::shared_ptr textElement) const; std::shared_ptr fieldRefToXML(const std::string& ref) const; std::shared_ptr reportedRefToXML(std::shared_ptr reportedRef) const; std::shared_ptr pageToXML(std::shared_ptr page) const; std::shared_ptr sectionToXML(std::shared_ptr section) const; std::shared_ptr fieldToXML(std::shared_ptr field, bool withTypeAttribute) const; void multiLineify(const std::string& text, const std::string& elementName, std::shared_ptr parent) const; mutable std::vector > fields_; }; }