Jpp  15.0.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
JLANG::JNullStreamBuffer Class Reference

Null stream buffer. More...

#include <JNullStreamBuffer.hh>

Inheritance diagram for JLANG::JNullStreamBuffer:
JLANG::JNullStream

Public Types

typedef std::streambuf::traits_type traits
 
typedef traits::int_type int_type
 
typedef std::streamsize streamsize
 

Public Member Functions

 JNullStreamBuffer ()
 Default constructor. More...
 
virtual int_type underflow ()
 Check underflow. More...
 
virtual int_type overflow (int_type c)
 Check overflow. More...
 

Static Public Member Functions

static const JNullStreamBuffer & getInstance ()
 Get reference to unique instance of this class object. More...
 

Detailed Description

Null stream buffer.

Definition at line 21 of file JNullStreamBuffer.hh.

Member Typedef Documentation

typedef std::streambuf::traits_type JLANG::JNullStreamBuffer::traits

Definition at line 27 of file JNullStreamBuffer.hh.

typedef traits::int_type JLANG::JNullStreamBuffer::int_type

Definition at line 28 of file JNullStreamBuffer.hh.

typedef std::streamsize JLANG::JNullStreamBuffer::streamsize

Definition at line 29 of file JNullStreamBuffer.hh.

Constructor & Destructor Documentation

JLANG::JNullStreamBuffer::JNullStreamBuffer ( )
inline

Default constructor.

Definition at line 35 of file JNullStreamBuffer.hh.

36  {}

Member Function Documentation

static const JNullStreamBuffer& JLANG::JNullStreamBuffer::getInstance ( )
inlinestatic

Get reference to unique instance of this class object.

Returns
reference to this class object

Definition at line 44 of file JNullStreamBuffer.hh.

45  {
46  static const JNullStreamBuffer null;
47 
48  return null;
49  }
static JNullStream null
Null I/O stream.
Definition: JNullStream.hh:51
Null stream buffer.
virtual int_type JLANG::JNullStreamBuffer::underflow ( )
inlinevirtual

Check underflow.

This method reads nothing.

Returns
0

Definition at line 58 of file JNullStreamBuffer.hh.

59  {
60  return EOF;
61  }
virtual int_type JLANG::JNullStreamBuffer::overflow ( int_type  c)
inlinevirtual

Check overflow.

This method writes nothing.

Parameters
ccharacter
Returns
c

Definition at line 71 of file JNullStreamBuffer.hh.

72  {
73  return c;
74  }

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