Jpp 19.3.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
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.
 
virtual int_type underflow ()
 Check underflow.
 
virtual int_type overflow (int_type c)
 Check overflow.
 

Static Public Member Functions

static const JNullStreamBuffergetInstance ()
 Get reference to unique instance of this class object.
 

Detailed Description

Null stream buffer.

Definition at line 21 of file JNullStreamBuffer.hh.

Member Typedef Documentation

◆ traits

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

Definition at line 27 of file JNullStreamBuffer.hh.

◆ int_type

Definition at line 28 of file JNullStreamBuffer.hh.

◆ streamsize

Definition at line 29 of file JNullStreamBuffer.hh.

Constructor & Destructor Documentation

◆ JNullStreamBuffer()

JLANG::JNullStreamBuffer::JNullStreamBuffer ( )
inline

Default constructor.

Definition at line 35 of file JNullStreamBuffer.hh.

36 {}

Member Function Documentation

◆ getInstance()

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 }
JNullStreamBuffer()
Default constructor.
static JNullStream null
Null I/O stream.

◆ underflow()

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 }

◆ overflow()

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: