Swarm-NG  1.1
snapshot.hpp File Reference

Defines and implements load and save functions for ensemble files. More...

#include "common.hpp"
#include "types/ensemble.hpp"
#include "ensemble_alloc.hpp"

Go to the source code of this file.

Classes

struct  swarm::snapshot::header
 Data structure used in binary files. This is meant to be found at offset 0 of the file. More...
 
struct  swarm::snapshot::sys
 Data structure used in binary files. parameters for a system. This comes right after the header and is followed by nbod number of body structs. More...
 
struct  swarm::snapshot::body
 Data structure used in binary files. parameters for each body. nbod instances of this struct follows after each sys data structure. More...
 
struct  swarm::snapshot::readfileexception
 Raised when an error encountered reading a text or binary file. Used in load and load_text. More...
 
struct  swarm::snapshot::writefileexception
 Raised when an error encountered writing to a text or binary file. Used in save and save_text. More...
 

Namespaces

 swarm
 Swarm-NG library.
 
 swarm::snapshot
 Static class containing methods to load/save ensembles to file.
 

Constant Groups

 swarm
 Swarm-NG library.
 
 swarm::snapshot
 Static class containing methods to load/save ensembles to file.
 

Functions

defaultEnsemble swarm::snapshot::load (const string &filename) throw (readfileexception)
 Load binary snapshot file.
 
defaultEnsemble swarm::snapshot::load_text (const string &filename) throw (readfileexception)
 Loads textual snapshot file.
 
void swarm::snapshot::save (defaultEnsemble &ens, const string &filename) throw (writefileexception)
 Save the ensemble to a binary file.
 
void swarm::snapshot::save_text (defaultEnsemble &ens, const string &filename) throw (writefileexception)
 Save the ensemble as a text file.
 

Detailed Description

Defines and implements load and save functions for ensemble files.

Definition in file snapshot.hpp.