On 6/9/20 2:53 PM, Maurice Rohracker wrote:
Thanks, Peter, that helped so far!

Another question would be, how would then the serialize function look like if one has another class as a member of a class. So, in this case, how would the serialize function look like if one has a class House and two of its member are of the type Room?
A serializing of nested objects so to speak.

The pack()/unpack() functions make use of the fact that many of the deal.II classes have save()/load() functions (sometimes combined into a serialize() function) that recursively save/load/serialize the member variables of these classes. Here is an example:

In these functions, operator& is used to serialize variables into/out of the given stream. If these variables are themselves classes, then that just calls these classes' respective save/load/serialize functions.


Wolfgang Bangerth          email:                 bange...@colostate.edu
                           www: http://www.math.colostate.edu/~bangerth/

The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Reply via email to