Wolframe, 0.0.3

ddlFormSerializer.hpp
Go to the documentation of this file.
1 /************************************************************************
2 Copyright (C) 2011 - 2014 Project Wolframe.
3 All rights reserved.
4 
5 This file is part of Project Wolframe.
6 
7 Commercial Usage
8 Licensees holding valid Project Wolframe Commercial licenses may
9 use this file in accordance with the Project Wolframe
10 Commercial License Agreement provided with the Software or,
11 alternatively, in accordance with the terms contained
12 in a written agreement between the licensee and Project Wolframe.
13 
14 GNU General Public License Usage
15 Alternatively, you can redistribute this file and/or modify it
16 under the terms of the GNU General Public License as published by
17 the Free Software Foundation, either version 3 of the License, or
18 (at your option) any later version.
19 
20 Wolframe is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 GNU General Public License for more details.
24 
25 You should have received a copy of the GNU General Public License
26 along with Wolframe. If not, see <http://www.gnu.org/licenses/>.
27 
28 If you have questions regarding the use of this file, please contact
29 Project Wolframe.
30 
31 ************************************************************************/
34 #ifndef _Wolframe_serialize_DDL_FORM_SERIALIZER_HPP_INCLUDED
35 #define _Wolframe_serialize_DDL_FORM_SERIALIZER_HPP_INCLUDED
36 #include "types/form.hpp"
37 #include "types/variantStruct.hpp"
40 
41 namespace _Wolframe {
42 namespace serialize {
43 
44 
49 {
50 public:
53 
55  explicit DDLFormSerializer( const types::FormR& form_)
56  :DDLStructSerializer(form_.get())
57  ,m_form(form_){}
58 
60  explicit DDLFormSerializer( const types::FormR& form_, const types::VariantStruct* substructure)
61  :DDLStructSerializer(substructure)
62  ,m_form(form_){}
63 
67  ,m_form(o.m_form){}
69  virtual ~DDLFormSerializer(){}
70 
73  {
75  m_form = o.m_form;
76  return *this;
77  }
78 
80  const types::FormR& form() const {return m_form;}
81 
82 private:
84 };
85 
86 }}//namespace
87 #endif
88 
Iterator on a DDL structure (serializer of VariantStruct)
Definition: ddlStructSerializer.hpp:50
DDLFormSerializer(const types::FormR &form_, const types::VariantStruct *substructure)
Constructor.
Definition: ddlFormSerializer.hpp:60
DDLFormSerializer()
Default constructor.
Definition: ddlFormSerializer.hpp:52
DDLFormSerializer(const DDLFormSerializer &o)
Copy constructor.
Definition: ddlFormSerializer.hpp:65
boost::shared_ptr< Form > FormR
shared ownership reference to form data structure
Definition: form.hpp:173
Structure of variant type atoms or substructures.
Definition: variantStruct.hpp:57
virtual ~DDLFormSerializer()
Destructor.
Definition: ddlFormSerializer.hpp:69
Serializer of a form defined by a DDL.
Definition: ddlFormSerializer.hpp:47
Defines the unified form data structure as defined by a DDL (data definition language). A form data structure represents the document unit of a wolframe request or answer.
const types::FormR & form() const
Get a shared reference to the form of this serializer.
Definition: ddlFormSerializer.hpp:80
DDLStructSerializer & operator=(const DDLStructSerializer &o)
Assignment operator.
Defines the DDL structure serialization.
DDLFormSerializer & operator=(const DDLFormSerializer &o)
Assignment operator.
Definition: ddlFormSerializer.hpp:72
types::FormR m_form
reference to the form of this serializer
Definition: ddlFormSerializer.hpp:83
DDLFormSerializer(const types::FormR &form_)
Constructor.
Definition: ddlFormSerializer.hpp:55
Structures of variant types.
Description of structures of variant types.