void load_override(
     const boost::serialization::nvp< T > & t
 ){
     load_start(t.name());
     archive::load(* this->This(), t.value());
     load_end(t.name());
 }
 void save_override(
         const ::boost::serialization::nvp< T > & t
     ){
     save_start(t.name());
     archive::save(* this->This(), t.const_value());
     save_end(t.name());
 }
 void save_override(
             #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
             const
             #endif
             ::boost::serialization::nvp<T> & t, int
     ){
     save_start(t.name());
     archive::save(* this->This(), t.const_value());
     save_end(t.name());
 }
 void load_override(
             #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
             const
             #endif
             boost::serialization::nvp<T> & t,
             int
     ){
     load_start(t.name());
     archive::load(* this->This(), t.value());
     load_end(t.name());
 }
Exemple #5
0
 void load_override(
     #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
     const
     #endif
     boost::serialization::nvp<T> & t,
     int
 ){
     this->This()->load_start(t.name());
     this->detail_common_iarchive::load_override(t.value(), 0);
     this->This()->load_end(t.name());
 }
 void save_override(
     #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
     const
     #endif
     ::boost::serialization::nvp<T> & t,
     int
 ){
     this->This()->save_start(t.name());
     this->detail_common_oarchive::save_override(t.const_value(), 0);
     this->This()->save_end(t.name());
 }
 void load_override(const boost::serialization::nvp< std::vector<value_type, allocator_type> > data, int)
 {
     token type = input.type();
     if (type == token_array_begin)
     {
         scope_stack.push(scope(type));
         input.next();
         while (true)
         {
             type = input.type();
             if (type == token_array_end)
             {
                 if (scope_stack.top().group == token_array_begin)
                 {
                     scope_stack.pop();
                 }
                 else
                 {
                     goto error;
                 }
                 break;
             }
             else if ((type == token_eof) || (type == token_error))
             {
                 goto error;
             }
             else
             {
                 value_type item;
                 *this >> boost::serialization::make_nvp(data.name(), item);
                 data.value().push_back(item);
             }
         }
     }
Exemple #8
0
	void ws_xml_iarchive::load_override(
		#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
		const
		#endif
		boost::serialization::nvp< bool > & t, int){
		std::string str;
		base::load_override(boost::serialization::make_nvp<std::string>(t.name(), str), 0);
		t.value() = (str == "true");
	}
  void load_override(
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
    const
#endif
    boost::serialization::nvp< T > &t,
    int
  )
  { 
    if (m_collectionSize)
    {
      // Delegate to inner collection
      m_collection->load_override(t,0);
      
      if (!--m_collectionSize)
      {
        m_collection = nullptr;
      }
      return;
    }
    
    std::streampos lastPos = is.tellg();
    m_currentName = t.name();

//     std::cerr << m_currentName << " [" << char(is.peek()) << "] [" << int(is.tellg())<< ']' <<std::endl;

    if (!m_collectionStart)
    {
      bool startLoaded = this->This()->load_start(t.name(), true);
      if (!startLoaded)
      {
        // Retrace a bit and signal a collection end
        is.seekg(lastPos - std::streampos(m_currentName.size()) - 3);
        m_collectionEnd = true;
        return;
      }
    }
    else
    {
      m_collectionStart = false;
    }
    boost::archive::load(* this->This(), t.value());
    this->This()->load_end(t.name());
  }