mi024

College project "Projet IAD" master 1
git clone https://esimon.eu/repos/mi024.git
Log | Files | Refs | README

view.hpp (1082B)


      1 #ifndef VIEW_HPP_INCLUDED
      2 #define VIEW_HPP_INCLUDED
      3 
      4 #include <cstddef>
      5 #include <string>
      6 
      7 #include <boost/shared_ptr.hpp>
      8 
      9 #include "nmlp_module_iostream.hpp"
     10 
     11 struct View{
     12 	/** @brief An @b unique identifier of the view (used as key in the DB). */
     13 	std::string name;
     14 
     15 	/** @brief The type of data viewed. */
     16 	std::string kind;
     17 
     18 	/** @brief A description of the view. */
     19 	std::string description;
     20 
     21 	/** @brief The dimension of the viewed vectors. */
     22 	std::size_t view_dimension;
     23 
     24 	/** @brief The dimension of the concept vectors. */
     25 	std::size_t concept_dimension;
     26 
     27 	/** @brief Encode a viewed vector into a concept vector. */
     28 	boost::shared_ptr<SequentialModule> encoder;
     29 
     30 	/** @brief Decode a concept vector into a viewed vector. */
     31 	boost::shared_ptr<SequentialModule> decoder;
     32 
     33 	template<class Archive>
     34 	void serialize(Archive&,unsigned const);
     35 };
     36 
     37 // Function definition
     38 template<class Archive>
     39 void View::serialize(Archive &ar,unsigned const){
     40 	ar & name;
     41 	ar & kind;
     42 	ar & description;
     43 	ar & view_dimension;
     44 	ar & concept_dimension;
     45 	ar & encoder;
     46 	ar & decoder;
     47 }
     48 
     49 #endif
     50