Various C++ Examples (including IPC)  Version: 1.0.0
dmsg Class Reference

Demonstration of streambuf inheritance. More...

Inheritance diagram for dmsg:
Inheritance graph
Collaboration diagram for dmsg:
Collaboration graph

Public Attributes

int i
 
int * p
 

Protected Member Functions

virtual int_type overflow (int_type c)
 

Detailed Description

Demonstration of streambuf inheritance.

Definition at line 17 of file streambuf.cc.

Member Function Documentation

virtual int_type dmsg::overflow ( int_type  c)
inlineprotectedvirtual
Parameters
ccharacter from input (<<)
Function override that evaluates each character the stream operator (<<) recieves. This is a necessary function to print to the output

uses C function putchar() for output

Definition at line 32 of file streambuf.cc.

33  {
34  if(c != EOF)
35  {
37  if(putchar(c) == EOF)
38  return EOF;
39 
40  std::cout << "|";
41  }
42  return c;
43  }

Member Data Documentation

int dmsg::i

Definition at line 20 of file streambuf.cc.

Referenced by main().

int* dmsg::p

Definition at line 21 of file streambuf.cc.

Referenced by main().


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