/* * Copyright (c) 2010-2015 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(boost::shared_ptr) const; private: boost::shared_ptr textToXML(boost::shared_ptr textElement) const; boost::shared_ptr fieldRefToXML(const std::string& ref) const; boost::shared_ptr reportedRefToXML(boost::shared_ptr reportedRef) const; boost::shared_ptr pageToXML(boost::shared_ptr page) const; boost::shared_ptr sectionToXML(boost::shared_ptr section) const; boost::shared_ptr fieldToXML(boost::shared_ptr field, bool withTypeAttribute) const; void multiLineify(const std::string& text, const std::string& elementName, boost::shared_ptr parent) const; mutable std::vector > fields_; }; }