本文整理汇总了C++中boost::serialization::nvp类的典型用法代码示例。如果您正苦于以下问题:C++ nvp类的具体用法?C++ nvp怎么用?C++ nvp使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了nvp类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: save_override
void save_override(
const ::boost::serialization::nvp< T > & t
){
save_start(t.name());
archive::save(* this->This(), t.const_value());
save_end(t.name());
}
开发者ID:ASMlover,项目名称:study,代码行数:7,代码来源:polymorphic_oarchive.hpp
示例2: load_override
void load_override(
const boost::serialization::nvp< T > & t
){
load_start(t.name());
archive::load(* this->This(), t.value());
load_end(t.name());
}
开发者ID:ASMlover,项目名称:study,代码行数:7,代码来源:polymorphic_iarchive.hpp
示例3: load_override
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);
}
}
}
开发者ID:ibrahimshiyam,项目名称:SymphonyIDE,代码行数:34,代码来源:iarchive.hpp
示例4: load_override
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");
}
开发者ID:rdmrocha,项目名称:answer,代码行数:9,代码来源:ws_xml_iarchive.cpp
示例5: save_override
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());
}
开发者ID:bhelmi,项目名称:ALIGATOR2,代码行数:10,代码来源:polymorphic_oarchive.hpp
示例6: load_override
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());
}
开发者ID:GDXN,项目名称:fitsliberator,代码行数:11,代码来源:polymorphic_iarchive.hpp
示例7: load_override
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());
}
开发者ID:Marlinc,项目名称:0ad,代码行数:11,代码来源:basic_xml_iarchive.hpp
示例8: save_override
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());
}
开发者ID:GunioRobot,项目名称:BrowserPlus-Whitebox-Unit-Testing,代码行数:11,代码来源:basic_xml_oarchive.hpp
示例9: operator
void operator () (Archive& ar,
const boost::serialization::nvp<T>& data,
const unsigned int version)
{
// Drop the name
ar << data.value();
}
开发者ID:ibrahimshiyam,项目名称:SymphonyIDE,代码行数:7,代码来源:nvp.hpp
示例10: load_override
void load_override(
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
const
#endif
boost::serialization::nvp< boost::serialization::collection_size_type > &t,
int
)
{
std::string itemName = m_currentName;
std::string cap;
unsigned counter = 0;
m_collectionStart = true;
m_collectionEnd = false;
m_collectionStream << "<item_version>0</item_version>";
while (true)
{
*this >> boost::serialization::make_nvp(itemName.c_str(), cap);
if (m_collectionEnd)
break;
m_collectionStream << "<item>" << cap << "</item>";
counter++;
}
t.value() = counter;
m_collectionSize = counter + 1; // +1 as the same loop sequence will parse item_version
m_collection = std::make_unique<ws_xml_iarchive>(m_collectionStream);
}
开发者ID:rfernandes,项目名称:answer,代码行数:28,代码来源:ws_xml_iarchive.hpp
示例11: load_override
void load_override(const boost::serialization::nvp<T> & t, int){
T& x(t.value());
* this >> x;
}
开发者ID:pelletierts,项目名称:orocos-rtt,代码行数:4,代码来源:binary_data_archive.hpp
示例12: load_override
void json_iarchive::load_override(boost::serialization::nvp<boost::serialization::collection_size_type> const& t, int) {
load_override(t.value(), 0);
}
开发者ID:degarashi,项目名称:JsonArchive,代码行数:3,代码来源:json_iarchive.cpp
注:本文中的boost::serialization::nvp类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论