View Issue Details

IDProjectCategoryView StatusLast Update
0002735Spring engineGeneralpublic2013-03-12 21:49
ReporterjK Assigned Toabma  
PrioritylowSeveritytextReproducibilityhave not tried
Status closedResolutionwon't fix 
Summary0002735: CREG's naming scheme is sucks!
Descriptionexample:
void CObject::Serialize(creg::ISerializer* ser)
    if (ser->IsWriting()) {
        int num = listening.size();
        ser->Serialize(&num, sizeof(int));
        ...
    } else {
        int num;
        ser->Serialize(&num, sizeof(int));
        ...
    }
}

What do you think this code does?
It serialize & _deserialize_!

Using the same names & interfaces for deserialization just SUCKS, esp. if it isn't noted in any comment! It's not obvious that it deserialize if the function & class are named Serializer & Serialize!
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

zerver

2011-11-17 16:51

reporter   ~0007621

Good or bad, the MFC serialization system has a very similar interface

http://msdn.microsoft.com/en-us/library/00hh13h0%28v=vs.80%29.aspx#_core_overriding_the_serialize_member_function

abma

2013-03-12 21:49

administrator   ~0010037

QTPFS uses the same:

https://github.com/spring/spring/blob/develop/rts/Sim/Path/QTPFS/Node.cpp#L658

i guess its because its easier to change serialization

(still feel free to change as you currently changed a lot of creg stuff)

Issue History

Date Modified Username Field Change
2011-11-15 14:24 jK New Issue
2011-11-17 16:51 zerver Note Added: 0007621
2013-03-12 21:49 abma Note Added: 0010037
2013-03-12 21:49 abma Status new => closed
2013-03-12 21:49 abma Assigned To => abma
2013-03-12 21:49 abma Resolution open => won't fix