View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002735 | Spring engine | General | public | 2011-11-15 14:24 | 2013-03-12 21:49 |
| Reporter | jK | Assigned To | abma | ||
| Priority | low | Severity | text | Reproducibility | have not tried |
| Status | closed | Resolution | won't fix | ||
| Summary | 0002735: CREG's naming scheme is sucks! | ||||
| Description | example: 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! | ||||
| Tags | No tags attached. | ||||
| Checked infolog.txt for Errors | |||||
|
|
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 |
|
|
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) |