serialization_test.cpp
Go to the documentation of this file.
00001 /*
00002  * serialization_test.cpp
00003  *
00004  *  Created on: Nov 15, 2013
00005  *      Author: dnad
00006  */
00007 #include <labust/navigation/NavQuestMessages.hpp>
00008 #include <labust/archive/delimited_oarchive.hpp>
00009 #include <labust/archive/delimited_iarchive.hpp>
00010 #include <labust/preprocessor/clean_serializator.hpp>
00011 
00012 #include <boost/serialization/string.hpp>
00013 
00014 PP_LABUST_CLEAN_ARRAY_OSERIALIZATOR_IMPL(labust::archive::delimited_oarchive)
00015 PP_LABUST_CLEAN_ARRAY_ISERIALIZATOR_IMPL(labust::archive::delimited_iarchive)
00016 
00017 std::string nq_data()
00018 {
00019         return "$#NQ.RES 0X0001 1 2 3 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -?13713 -?50937 -17779 -?05940 -313933 ?89842 -?24036 730108 22.40 32.49 325.7 -3.0 17.4 0.005 35.0 1514 9682";
00020 }
00021 
00022 int main()
00023 {
00024         using namespace labust::archive;
00025         using namespace labust::navigation;
00026 
00027         NQRes dvl_data;
00028         std::stringstream ss(nq_data());
00029         std::cout<<"Data:"<<ss.str()<<std::endl;
00030         delimited_iarchive ia(ss);
00031         vec4i kp2={1,2,3,4}, kp2r;
00032         ia>>dvl_data;
00033 
00034         delimited_oarchive oa(std::cout);
00035   //std::string data("hello"),datar;
00036   //oa<<kp2<<data;
00037         std::cout<<"Read:";
00038         oa<<dvl_data;
00039 
00040   return 0;
00041 }


navquest_dvl
Author(s): Gyula Nagy
autogenerated on Thu Jul 10 2014 10:34:00