Poster of Linux kernelThe best gift for a Linux geek
OFStream

OFStream

Section: C Library Functions (3) Updated: Thu Apr 7 2011
Local index Up
 

NAME

OFStream -  

SYNOPSIS


#include <o_f_stream.h>  

Public Types


typedef std::string::size_type sizetype
 

Public Member Functions


OFStream ()

~OFStream ()

template<typename T > OFStream & scientific (const sizetype w, const T r)

template<> OFStream & scientific (const sizetype w, const Complex r)
 

Detailed Description

This class provides a compatibility class for broken features in the std::ofstream of the older GCC versions. Other compilers do not see this class.

Definition at line 110 of file o_f_stream.h.  

Member Typedef Documentation

 

typedef std::string::size_type OFStream::sizetypeconvenient typedef

Definition at line 122 of file o_f_stream.h.  

Constructor & Destructor Documentation

 

OFStream::OFStream () [inline]Default constructor.

Definition at line 117 of file o_f_stream.h.

{};
 

OFStream::~OFStream () [inline]Default destructor.

Definition at line 122 of file o_f_stream.h.

{};
 

Member Function Documentation

 

template<typename T > OFStream & OFStream::scientific (const sizetypew, const Tr)Returns:

a OFStream, where r was directed in scientific style with size w.

Definition at line 37 of file o_f_stream.C.

{
  libmesh_assert (w < 30);
  char buf[30];  
  char format[8];
  // form the format for r
  sprintf (format, '%%%de', w);
  // form string as desired
  sprintf (buf, format, r);
  *this << buf;
  return *this;
}
 

template<> OFStream& OFStream::scientific (const sizetypew, const Complexr)

Definition at line 57 of file o_f_stream.C.

{
  libmesh_assert (w < 30);
  char buf[60];  
  char format[16];
  // form the format for r
  sprintf (format, '%%%de %%%de', w, w);
  // form string as desired
  sprintf (buf, format, r.real(), r.imag());
  *this << buf;
  return *this;
}

 

Author

Generated automatically by Doxygen for libMesh from the source code.


 

Index

NAME
SYNOPSIS
Public Types
Public Member Functions
Detailed Description
Member Typedef Documentation
typedef std::string::size_type OFStream::sizetypeconvenient typedef
Constructor & Destructor Documentation
OFStream::OFStream () [inline]Default constructor.
OFStream::~OFStream () [inline]Default destructor.
Member Function Documentation
template<typename T > OFStream & OFStream::scientific (const sizetypew, const Tr)Returns:
template<> OFStream& OFStream::scientific (const sizetypew, const Complexr)
Author

This document was created by man2html, using the manual pages.
Time: 21:51:45 GMT, April 16, 2011