コード例 #1
0
ファイル: vector.hpp プロジェクト: bistromath/pothos
inline void load(
    Archive & ar,
    std::vector<U, Allocator> &t,
    const unsigned int /* file_version */,
    mpl::true_
){
    collection_size_type count(t.size());
    ar >> POTHOS_SERIALIZATION_NVP(count);
    t.resize(count);
    unsigned int item_version=0;
    if(POTHOS_SERIALIZATION_VECTOR_VERSIONED(ar.get_library_version())) {
        ar >> POTHOS_SERIALIZATION_NVP(item_version);
    }
コード例 #2
0
inline void load(
    Archive & ar,
    std::bitset<size> & t,
    const unsigned int /* version */
){
    std::string bits;
    ar >> POTHOS_SERIALIZATION_NVP( bits );
    t = std::bitset<size>(bits);
}
コード例 #3
0
ファイル: vector.hpp プロジェクト: bistromath/pothos
inline void save(
    Archive & ar,
    const std::vector<U, Allocator> &t,
    const unsigned int /* file_version */,
    mpl::true_
){
    const collection_size_type count(t.size());
    ar << POTHOS_SERIALIZATION_NVP(count);
    if (!t.empty())
        ar << make_array(detail::get_data(t),t.size());
}
コード例 #4
0
inline void save(
    Archive & ar,
    std::bitset<size> const & t,
    const unsigned int /* version */
){
    const std::string bits = t.template to_string<
        std::string::value_type,
        std::string::traits_type,
        std::string::allocator_type
    >();
    ar << POTHOS_SERIALIZATION_NVP( bits );
}