SMILE  v2.5
Schwarzschild Modelling Interactive expLoratory Environment
Public Member Functions | Private Member Functions | Private Attributes | List of all members
smile::CIOSnapshotNemo Class Reference

NEMO snapshot format. More...

#include <iosnapshot.h>

Inheritance diagram for smile::CIOSnapshotNemo:
Inheritance graph
[legend]
Collaboration diagram for smile::CIOSnapshotNemo:
Collaboration graph
[legend]

Public Member Functions

 CIOSnapshotNemo (const std::string &_fileName, const std::string &_header="")
 create the class to read or write to the file; if writing is intended, may provide a header string in the constructor. More...
 
virtual bool readSnapshot (CPointMassSet< float > *&points)
 read a snapshot from the file; More...
 
virtual bool readSnapshot (CPointMassSet< double > *&points)
 
virtual bool writeSnapshot (const CPointMassSet< float > *points)
 write a snapshot to the file; return success or failure. More...
 
virtual bool writeSnapshot (const CPointMassSet< double > *points)
 

Private Member Functions

template<typename NumT >
bool readSnapshotT (CPointMassSet< NumT > *&points)
 
template<typename NumT >
bool writeSnapshotT (const CPointMassSet< NumT > *points)
 

Private Attributes

const std::string fileName
 
const std::string header
 header string which will be written to the file
 

Detailed Description

NEMO snapshot format.

reading is supported only if compiled with UNSIO library; writing the snapshot is implemented either by this library or by builtin routines.

Constructor & Destructor Documentation

smile::CIOSnapshotNemo::CIOSnapshotNemo ( const std::string &  _fileName,
const std::string &  _header = "" 
)
inline

create the class to read or write to the file; if writing is intended, may provide a header string in the constructor.

Member Function Documentation

virtual bool smile::CIOSnapshotNemo::readSnapshot ( CPointMassSet< float > *&  points)
inlinevirtual

read a snapshot from the file;

Parameters
[in,out]pointsis a pointer to the CPointMassSet class; if it is NULL then a new instance of this class is created, otherwise the content of this object is replaced by the new snapshot.
Returns
success or failure; in the latter case points may contain garbage.

Implements smile::CBasicIOSnapshot.

virtual bool smile::CIOSnapshotNemo::writeSnapshot ( const CPointMassSet< float > *  points)
inlinevirtual

write a snapshot to the file; return success or failure.

Implements smile::CBasicIOSnapshot.


The documentation for this class was generated from the following files: