Wolframe, 0.0.3

intrusiveProperty.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_STRUCT_PROPERTY_HPP_INCLUDED
35 #define _Wolframe_SERIALIZE_STRUCT_PROPERTY_HPP_INCLUDED
37 
38 namespace _Wolframe {
39 namespace serialize {
40 
43 template <typename T>
45 {
46 private:
53 public:
55  {
56  const T* obj = 0;
57  return type_( traits::getCategory(*obj));
58  }
59 };
60 
61 }}//namespace
62 #endif
63 
static StructDescriptionBase::ElementType type()
Definition: intrusiveProperty.hpp:54
Atomic element type.
Definition: structDescriptionBase.hpp:58
ElementType
Type of a structure element.
Definition: structDescriptionBase.hpp:56
static StructDescriptionBase::ElementType type_(const traits::struct_ &)
Definition: intrusiveProperty.hpp:47
category tag for a structure with named elements
Definition: traits_getCategory.hpp:53
defines the type traits for the intrusive part of serialization/deserialization
category tag for a std::vector of any type
Definition: traits_getCategory.hpp:54
Maps the traits based on structure element type properties to an enumeration value.
Definition: intrusiveProperty.hpp:44
static StructDescriptionBase::ElementType type_(const traits::vector_ &)
Definition: intrusiveProperty.hpp:49
category tag for an atomic type
Definition: traits_getCategory.hpp:55
Array of structures or atomic values.
Definition: structDescriptionBase.hpp:60
Structure with fixed number of named elements.
Definition: structDescriptionBase.hpp:59
static StructDescriptionBase::ElementType type_(const traits::atomic_ &)
Definition: intrusiveProperty.hpp:51
boost::enable_if_c< boost::is_same< std::vector< typename T::value_type >,T >::value &&!boost::is_same< std::string, T >::value,const vector_ & >::type getCategory(const T &)
get category vector_ for a type
Definition: traits_getCategory.hpp:90