本文整理汇总了C++中boost::serialization::nvp::name方法的典型用法代码示例。如果您正苦于以下问题:C++ nvp::name方法的具体用法?C++ nvp::name怎么用?C++ nvp::name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boost::serialization::nvp
的用法示例。
在下文中一共展示了nvp::name方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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());
}
示例2: 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());
}
示例3: 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());
}
示例4: 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());
}
示例5: 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());
}
示例6: 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());
}
示例7: 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);
}
}
}
示例8: 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");
}
示例9: load_override
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());
}