Changes between Version 4 and Version 5 of Documentation/Serialization
- Timestamp:
- Feb 4, 2010, 6:33:55 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Documentation/Serialization
v4 v5 79 79 * string and char* support, T( char* | std::string ) 80 80 81 It is always best to use types that have a specified length, e.g. {{{uint8_t}}}, {{{uint16_t}}}, ... etc. If you are serializing through a 81 It is always best to use types that have a specified length, e.g. {{{uint8_t}}}, {{{uint16_t}}}, ... etc. If you are serializing through a inherited type where the serialization is provided in the base class, use the {{{&}}} operator before. Such a case is e.g. the {{{NodeID}}} class: 82 {{{ 83 #!cpp 84 NodeID n; 85 SpoVNetID s 86 ... 87 sznBeginDefault( Classname, X ) { 88 X && &n && &s; 89 } sznEnd(); 90 }}} 82 91 83 84 In your {*.cpp} class you require a further macro. In case of the !PingPong sample this is simply: 92 In your {{{*.cpp}}} class you require a further macro. In case of the !PingPong sample this is simply: 85 93 {{{ 86 94 #!cpp 87 95 vsznDefault(PingPongMessage); 88 96 }}} 97 98 99 100 101 if (X.isDeserializer()) 89 102 90 103 … … 99 112 100 113 114 {{{ 115 #!comment 101 116 102 117 Non-virtual inline serialization is reasonable on small or bit-sensitive objects (for example IP-Adresses, Ports etc.). … … 159 174 == Message specification, serialization and deserialization == 160 175 161 176 }}}