IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
SerializationHdrMacro.h
Go to the documentation of this file.
1 // SerializationHdrMacro.h:
3 // ------------------------
4 //
14 
15 #ifndef __IPSDKSERIALIZATION_SERIALIZATIONHDRMACRO_H__
16 #define __IPSDKSERIALIZATION_SERIALIZATIONHDRMACRO_H__
17 
21 #include <boost/utility/enable_if.hpp>
22 #include <boost/type_traits/is_same.hpp>
23 #include <boost/type_traits/is_base_of.hpp>
24 #include <boost/mpl/and.hpp>
25 #include <boost/mpl/not.hpp>
26 
27 namespace ipsdk {
28 
29  class BaseIArchive;
30  class BaseOArchive;
31  class BaseSerializationObject;
32  template <typename T>
33  class SerializationOItem;
34  template <typename T>
35  class SerializationIItem;
36  template <typename T>
37  typename boost::enable_if_c<
38  boost::mpl::and_<typename boost::is_base_of<ipsdk::BaseSerializationObject, T>::type,
39  typename boost::mpl::not_<typename boost::is_same<ipsdk::BaseSerializationObject, T>::type>::type>::value,
40  ipsdk::BaseIArchive&>::type
42  const ipsdk::SerializationIItem<T>& item);
43  template <typename T>
44  typename boost::enable_if_c<
45  boost::mpl::and_<typename boost::is_base_of<ipsdk::BaseSerializationObject, T>::type,
46  typename boost::mpl::not_<typename boost::is_same<ipsdk::BaseSerializationObject, T>::type>::type>::value,
47  ipsdk::BaseIArchive&>::type
49  const ipsdk::SerializationIItem<T*>& item);
50  template <typename T>
51  typename boost::enable_if_c<
52  boost::mpl::and_<typename boost::is_base_of<ipsdk::BaseSerializationObject, T>::type,
53  typename boost::mpl::not_<typename boost::is_same<ipsdk::BaseSerializationObject, T>::type>::type>::value,
54  ipsdk::BaseOArchive&>::type
56  const ipsdk::SerializationOItem<T>& item);
57 }
58 
61 
64 #define IPSDK_DECLARE_SERIAL(libraryName, className) \
65  public: \
66  static ipsdk::ipUInt32 getVersion(); \
67  protected: \
68  virtual ipsdk::BoolResult write(ipsdk::BaseOArchive& ar) const; \
69  virtual ipsdk::BoolResult read(ipsdk::BaseIArchive& ar);
70 
73 #define IPSDK_DECLARE_SERIAL_WITH_COPY(libraryName, className) \
74  IPSDK_DECLARE_DYNAMIC_WITH_COPY(libraryName, className) \
75  IPSDK_DECLARE_SERIAL(libraryName, className)
76 
79 #define IPSDK_DECLARE_SERIAL_WITHOUT_COPY(libraryName, className) \
80  IPSDK_DECLARE_DYNAMIC_WITHOUT_COPY(libraryName, className) \
81  IPSDK_DECLARE_SERIAL(libraryName, className)
82 
83 
86 #define IPSDK_DECLARE_ABSTRACT_SERIAL(libraryName, className) \
87  IPSDK_DECLARE_SERIAL(libraryName, className)
88 
91 #define IPSDK_DECLARE_ABSTRACT_SERIAL_WITH_COPY(libraryName, className) \
92  IPSDK_DECLARE_ABSTRACT_DYNAMIC_WITH_COPY(libraryName, className) \
93  IPSDK_DECLARE_ABSTRACT_SERIAL(libraryName, className)
94 
97 #define IPSDK_DECLARE_ABSTRACT_SERIAL_WITHOUT_COPY(libraryName, className) \
98  IPSDK_DECLARE_ABSTRACT_DYNAMIC_WITHOUT_COPY(libraryName, className) \
99  IPSDK_DECLARE_ABSTRACT_SERIAL(libraryName, className)
100 
103 
104 #endif // __IPSDKSERIALIZATION_SERIALIZATIONHDRMACRO_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Macro set to manage dynamic objects (header part)
Base macros set for IPSDK library.
Base class for serialization input archives.
Definition: BaseIArchive.h:36
Item used to format outputs during serialization.
Definition: DataItemNodeHdrMacrosDetails.h:37
Base class for serialization output archives.
Definition: BaseOArchive.h:35
Item used to format inputs during serialization.
Definition: DataItemNodeHdrMacrosDetails.h:42
IPSDKBASESHAPEANALYSIS_API ipsdk::BaseIArchive & operator>>(ipsdk::BaseIArchive &ar, const ipsdk::SerializationIItem< ipsdk::shape::analysis::MeasureId > &item)
serialization of ipsdk::shape::analysis::MeasureId structure
Predefined types for processing results management.
IPSDKBASESHAPEANALYSIS_API ipsdk::BaseOArchive & operator<<(ipsdk::BaseOArchive &ar, const ipsdk::SerializationOItem< ipsdk::shape::analysis::MeasureId > &item)
serialization of ipsdk::shape::analysis::MeasureId structure