MULTIBODY SIMULATION SOFTWARE - API documentation

chrono::ChStreamFile Class Reference

#include <CHstream.h>

Inheritance diagram for chrono::ChStreamFile:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 ChStreamFile (const char *filename, std::ios::openmode mmode)
virtual ~ChStreamFile ()
virtual void Write (const char *data, int n)
virtual void Read (char *data, int n)
virtual bool End_of_stream ()
std::fstream & GetFstream ()


Detailed Description

This is a base class for typical output on system's file, on a disk, using the typical C++ 'fstream' handler.

Constructor & Destructor Documentation

chrono::ChStreamFile::ChStreamFile ( const char *  filename,
std::ios::openmode  mmode 
)

Creates a system file, like the C++ fstream, and opens it, given filename on disk, and the opening mode (ex: std::ios::out or std::ios::in)

chrono::ChStreamFile::~ChStreamFile (  )  [virtual]

Destruction means that the file stream is also closed.


Member Function Documentation

void chrono::ChStreamFile::Write ( const char *  data,
int  n 
) [virtual]

Writes to file, up to n chars. If does not succeed, throws exception.

void chrono::ChStreamFile::Read ( char *  data,
int  n 
) [virtual]

Reads from file, up to n chars. If does not succeed, throws exception.

virtual bool chrono::ChStreamFile::End_of_stream (  )  [virtual]

Returns true if end of stream reached.

Reimplemented in chrono::ChStreamInBinaryFile, and chrono::ChStreamInAsciiFile.

std::fstream& chrono::ChStreamFile::GetFstream (  ) 

Reference to fstream encapsulated here.


CHRONO::ENGINE
C++ library for multibody simulation, (C) Alessandro Tasora
This API documentation has been generated on 17 Jul 2009 by Doxygen