mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 09:05:10 -07:00
* [DeckList] Extract deck metadata XML serialization DeckList still serialized its metadata inline: a ten-branch readElement dispatch and a static writeMetadata that duplicated the tree plumbing. The metadata arms (name, comments, format, timestamp, banner card, playmat, tags) move to DeckListMetadataXml free functions over the Metadata struct, leaving DeckList::readElement a thin dispatcher between metadata, zones and sideboard plans. The playmat clamping helper moves along with the element that uses it. * [DeckList] Make deck metadata XML serialization instance methods * [DeckList] Inline deck metadata XML serialization Fold DeckList::Metadata::readElement and write back into deck_list.cpp alongside isEmpty(), and drop the separate deck_list_metadata_xml translation unit. The metadata arms are instance methods of the nested Metadata struct, so keeping them in the same file as its other method keeps the class from being scattered across two .cpp files; the rest of the refactor (readElement as a thin dispatcher, element-wise reads, clamped playmat params) is unchanged. --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de> |
||
|---|---|---|
| .. | ||
| tree | ||
| deck_list.cpp | ||
| deck_list.h | ||
| deck_list_history_manager.cpp | ||
| deck_list_history_manager.h | ||
| deck_list_memento.h | ||
| deck_list_node_tree.cpp | ||
| deck_list_node_tree.h | ||
| deck_list_plain_text_parser.cpp | ||
| deck_list_plain_text_parser.h | ||
| playmat_resolver.cpp | ||
| playmat_resolver.h | ||
| sideboard_plan.cpp | ||
| sideboard_plan.h | ||