Changeset 644


Ignore:
Timestamp:
12/02/08 01:08:31 (11 years ago)
Author:
Eoin
Message:

Fixed small incompatibility with boost xml archive object_id.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/global/txml_iarchive.hpp

    r573 r644  
    6868                basic_text_iprimitive<std::istream>(stream_, 0 != (flags & arc::no_codecvt)), 
    6969                detail_common_iarchive(flags), 
     70                boost_xml_compat_(false), 
    7071                is_(is),                 
    7172                previous_child_node_(0) 
     
    7475 
    7576                current_node_ = xml_.root_element(); 
     77 
     78                boost_xml_compat_ = (current_node_->value_str() == "boost_serialization"); 
     79                TXML_LOG(boost::wformat(L" << boost_serialization compatibility %1%") % (boost_xml_compat_ ? "on" : "off")); 
     80 
    7681                init(); 
    7782        } 
     
    309314        void load_override(arc::object_id_type& t, int) 
    310315        {  
    311                 t = read_attribute<arc::object_id_type>(arc::OBJECT_ID(), arc::OBJECT_REFERENCE());              
     316                if (boost_xml_compat_) 
     317                { 
     318                        std::string id = read_attribute<std::string>(arc::OBJECT_ID(), arc::OBJECT_REFERENCE()); 
     319 
     320                        t = boost::lexical_cast<int>(id.substr(1)); 
     321                } 
     322                else 
     323                        t = read_attribute<arc::object_id_type>(arc::OBJECT_ID(), arc::OBJECT_REFERENCE());              
    312324        } 
    313325     
     
    327339        } 
    328340 
     341        bool boost_xml_compat_; 
     342 
    329343        xml::document xml_; 
    330344 
  • trunk/src/halEvent.cpp

    r574 r644  
    88 
    99#include "stdAfx.hpp" 
     10 
     11#ifdef TXML_ARCHIVE_LOGGING 
     12#undef TXML_ARCHIVE_LOGGING 
     13#endif 
    1014 
    1115#include "halEvent.hpp" 
  • trunk/src/stdAfx.hpp

    r578 r644  
    2222 
    2323#define HAL_TORRENT_STATE_LOGGING 
    24 // #define TXML_ARCHIVE_LOGGING 
     24#define TXML_ARCHIVE_LOGGING 
    2525 
    2626#pragma warning (push) 
Note: See TracChangeset for help on using the changeset viewer.