Redian新闻
>
Does C++ have serializer and deserialzier
avatar
O*d
2
没有
avatar
j*g
3
nor does C#
avatar
g*g
4
How does C# replicate a web session if there's no standard way
to serialize objects?

【在 j********g 的大作中提到】
: nor does C#
avatar
L*r
5
first, serialize is not a feature of language. it can be a feature provided
by sdk. c++ can implement serialize for sure but there might be no standard
way in c++.
the serialize in .net or c# is very good.
first you define the content to be serialized using different pattern. it
can be very simple or complicate. the simple way is to use marker attribute(
the annotation in java). this simple way is almost same as java.
second, you define what is the target format for serialized content. the
forma

【在 g*****g 的大作中提到】
: How does C# replicate a web session if there's no standard way
: to serialize objects?

avatar
g*g
6
Sure C++ can provide serialization, but probably not
without some custom scheme, which is due to its lack of
reflection mechanism. i.e. You can't just say I want to serialize
this object and let SDK do it, at least not in object code level,
you have to provide an implementation to
actually do that. Correct me if I am wrong in that.

provided
standard
attribute(

【在 L*********r 的大作中提到】
: first, serialize is not a feature of language. it can be a feature provided
: by sdk. c++ can implement serialize for sure but there might be no standard
: way in c++.
: the serialize in .net or c# is very good.
: first you define the content to be serialized using different pattern. it
: can be very simple or complicate. the simple way is to use marker attribute(
: the annotation in java). this simple way is almost same as java.
: second, you define what is the target format for serialized content. the
: forma

avatar
L*r
7
you are right. at least, it is the way that i did in c++, even it is
interface based but still need to manually write code to write/read data
into archive stream.

【在 g*****g 的大作中提到】
: Sure C++ can provide serialization, but probably not
: without some custom scheme, which is due to its lack of
: reflection mechanism. i.e. You can't just say I want to serialize
: this object and let SDK do it, at least not in object code level,
: you have to provide an implementation to
: actually do that. Correct me if I am wrong in that.
:
: provided
: standard
: attribute(

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。