Home » U++ Library support » U++ Core » (Possible) Serialization issue
(Possible) Serialization issue [message #17131] |
Wed, 30 July 2008 07:14 |
Mindtraveller
Messages: 917 Registered: August 2007 Location: Russia, Moscow rgn.
|
Experienced Contributor |
|
|
Short description: while loading binary data from file, stream.IsStoring() returns true and stream.IsLoading() returns false.
Compatible testcase:class TestClass
{
public:
void Serialize (Stream &stream);
private:
int b;
};
void TestClass::Serialize(Stream &stream)
{
if (stream.IsStoring())
{
int a = 0; //BREAKPOINT STOP HERE!
}
if (!stream.IsLoading())
{
int a = 1; //BREAKPOINT STOP HERE!
}
stream % b;
}
CONSOLE_APP_MAIN
{
TestClass testClass;
LoadFromFile(testClass, ".config");
}
Recommended behaviour: in a number of situations it is vital to know if one loads or saves data. Correct IsStoring/IsLoading behaviour here is welcome.
[Updated on: Wed, 30 July 2008 07:16] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat May 11 14:50:34 CEST 2024
Total time taken to generate the page: 0.02592 seconds
|