Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
Ifstream Class Reference

#include <core_out.h>

Inheritance diagram for Ifstream:
Collaboration diagram for Ifstream:

Public Member Functions

 Ifstream (std::string file_name)
 
 ~Ifstream ()
 

Detailed Description

class Ifstream handles opening and closing files

Definition at line 33 of file core_out.h.

Constructor & Destructor Documentation

Ifstream::Ifstream ( std::string  file_name)

Definition at line 30 of file core_out.cpp.

30  : std::ifstream(file_name)
31 {
32  if (!this->is_open()) throw std::runtime_error("Error while opening '" + file_name + "'");
33 }
Ifstream::~Ifstream ( )

Definition at line 35 of file core_out.cpp.

36 {
37  if (this->is_open()) this->close();
38 }

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