File: ACE_IOStream.3

package info (click to toggle)
ace 5.2.1-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 26,856 kB
  • ctags: 18,677
  • sloc: cpp: 171,831; makefile: 48,840; sh: 10,192; perl: 8,582; exp: 787; yacc: 387; lex: 140; csh: 20
file content (143 lines) | stat: -rw-r--r-- 6,326 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
.TH ACE_IOStream 3 "1 Dec 2001" "ACE" \" -*- nroff -*-
.ad l
.nh
.SH NAME
ACE_IOStream \- A template adapter for creating an \fBiostream\fR-like object using an \fBACE\fR IPC Stream for the actual I/O. Iostreams use an underlying \fBstreambuf\fR object for the IO interface. The \fBiostream\fR class and derivatives provide you with a host of convenient operators that access the \fBstreambuf\fR. 
.SH SYNOPSIS
.br
.PP
\fC#include <IOStream_T.h>\fR
.PP
Inherits \fBiostream\fR, and \fBSTREAM\fR.
.PP
.SS Public Methods

.in +1c
.ti -1c
.RI "\fBACE_IOStream\fR (\fBSTREAM\fR &stream, u_int streambuf_size = ACE_STREAMBUF_SIZE)"
.br
.ti -1c
.RI "\fBACE_IOStream\fR (u_int streambuf_size = ACE_STREAMBUF_SIZE)"
.br
.ti -1c
.RI "virtual \fB~ACE_IOStream\fR (void)"
.br
.RI "\fIWe have to get rid of the <streambuf_> ourselves since we gave it to the <\fBiostream\fR> base class;.\fR"
.ti -1c
.RI "virtual int \fBclose\fR (void)"
.br
.RI "\fIThe only ambituity in the multiple inheritance is the <close> function.\fR"
.ti -1c
.RI "int \fBeof\fR (void) const"
.br
.ti -1c
.RI "\fBGETPUT_FUNC_SET\fR (ACE_IOStream<\fBSTREAM\fR>) virtual int ipfx0 (void)"
.br
.ti -1c
.RI "virtual int \fBipfx1\fR (void)"
.br
.ti -1c
.RI "virtual int \fBipfx\fR (int need = 0)"
.br
.ti -1c
.RI "virtual void \fBisfx\fR (void)"
.br
.ti -1c
.RI "virtual int \fBopfx\fR (void)"
.br
.ti -1c
.RI "virtual void \fBosfx\fR (void)"
.br
.ti -1c
.RI "ACE_IOStream<\fBSTREAM\fR>& \fBoperator>>\fR (\fBACE_Time_Value\fR *&tv)"
.br
.RI "\fIAllow the programmer to provide a timeout for read operations. Give it a pointer to NULL to block forever.\fR"
.in -1c
.SS Protected Attributes

.in +1c
.ti -1c
.RI "\fBACE_Streambuf_T\fR<\fBSTREAM\fR>* \fBstreambuf_\fR"
.br
.RI "\fIThis is where all of the action takes place. The streambuf_ is the interface to the underlying \fBSTREAM\fR.\fR"
.in -1c
.SS Private Methods

.in +1c
.ti -1c
.RI "\fBssize_t\fR \fBsend\fR (...)"
.br
.ti -1c
.RI "\fBssize_t\fR \fBrecv\fR (...)"
.br
.ti -1c
.RI "\fBssize_t\fR \fBsend_n\fR (...)"
.br
.ti -1c
.RI "\fBssize_t\fR \fBrecv_n\fR (...)"
.br
.in -1c
.SH DETAILED DESCRIPTION
.PP 

.SS template<class STREAM>  template class ACE_IOStream
A template adapter for creating an \fBiostream\fR-like object using an \fBACE\fR IPC Stream for the actual I/O. Iostreams use an underlying \fBstreambuf\fR object for the IO interface. The \fBiostream\fR class and derivatives provide you with a host of convenient operators that access the \fBstreambuf\fR.
.PP
.PP
 We inherit all characteristics of \fBiostream\fR and your <\fBSTREAM\fR> class. When you create a new class from this template, you can use it anywhere you would have used your original <\fBSTREAM\fR> class. To create an \fBiostream\fR for your favorite \fBACE\fR IPC class (e.g., ), feed that class to this template's <\fBSTREAM\fR> parameter, e.g., typedef \fBACE_Svc_Handler\fR Service_Handler; Because the operators in the \fBiostream\fR class are not virtual, you cannot easily provide overloads in your custom ACE_IOStream classes. To make these things work correctly, you need to overload ALL operators of the ACE_IOStream you create. I've attempted to do that here to make things easier for you but there are no guarantees. In the iostream.cpp file is an example of why it is necessary to overload all of the get/put operators when you want to customize only one or two. 
.PP
.SH CONSTRUCTOR & DESTRUCTOR DOCUMENTATION
.PP 
.SS template<classSTREAM> ACE_IOStream<\fBSTREAM\fR>::ACE_IOStream<\fBSTREAM\fR> (\fBSTREAM\fR & stream, u_int streambuf_size = ACE_STREAMBUF_SIZE)
.PP
.SS template<classSTREAM> ACE_IOStream<\fBSTREAM\fR>::ACE_IOStream<\fBSTREAM\fR> (u_int streambuf_size = ACE_STREAMBUF_SIZE)
.PP
The default constructor. This will initiailze your \fBSTREAM\fR and then setup the \fBiostream\fR baseclass to use a custom \fBstreambuf\fR based on \fBSTREAM\fR. 
.SS template<classSTREAM> ACE_IOStream<\fBSTREAM\fR>::~ACE_IOStream<\fBSTREAM\fR> (void)\fC [virtual]\fR
.PP
We have to get rid of the <streambuf_> ourselves since we gave it to the <\fBiostream\fR> base class;.
.PP
.SH MEMBER FUNCTION DOCUMENTATION
.PP 
.SS template<classSTREAM> ACE_IOStream<\fBSTREAM\fR>::GETPUT_FUNC_SET (ACE_IOStream< \fBSTREAM\fR >)\fC [inline]\fR
.PP
.SS template<classSTREAM> int ACE_IOStream<\fBSTREAM\fR>::close (void)\fC [virtual]\fR
.PP
The only ambituity in the multiple inheritance is the <close> function.
.PP
.SS template<classSTREAM> int ACE_IOStream<\fBSTREAM\fR>::eof (void) const
.PP
Returns 1 if we're at the end of the <\fBSTREAM\fR>, i.e., if the connection has closed down or an error has occurred, else 0. Under the covers, <eof> calls the \fBstreambuf\fR's <timeout> function which will reset the timeout flag. As as result, you should save the return of <eof> and check it instead of calling <eof> successively. 
.SS template<classSTREAM> int ACE_IOStream<\fBSTREAM\fR>::ipfx (int need = 0)\fC [inline, virtual]\fR
.PP
.SS template<classSTREAM> int ACE_IOStream<\fBSTREAM\fR>::ipfx1 (void)\fC [inline, virtual]\fR
.PP
.SS template<classSTREAM> void ACE_IOStream<\fBSTREAM\fR>::isfx (void)\fC [inline, virtual]\fR
.PP
.SS template<classSTREAM> ACE_IOStream< \fBSTREAM\fR >& ACE_IOStream<\fBSTREAM\fR>::operator>> (\fBACE_Time_Value\fR *& tv)
.PP
Allow the programmer to provide a timeout for read operations. Give it a pointer to NULL to block forever.
.PP
.SS template<classSTREAM> int ACE_IOStream<\fBSTREAM\fR>::opfx (void)\fC [inline, virtual]\fR
.PP
.SS template<classSTREAM> void ACE_IOStream<\fBSTREAM\fR>::osfx (void)\fC [inline, virtual]\fR
.PP
.SS template<classSTREAM> \fBssize_t\fR ACE_IOStream<\fBSTREAM\fR>::recv (...)\fC [private]\fR
.PP
.SS template<classSTREAM> \fBssize_t\fR ACE_IOStream<\fBSTREAM\fR>::recv_n (...)\fC [private]\fR
.PP
.SS template<classSTREAM> \fBssize_t\fR ACE_IOStream<\fBSTREAM\fR>::send (...)\fC [private]\fR
.PP
.SS template<classSTREAM> \fBssize_t\fR ACE_IOStream<\fBSTREAM\fR>::send_n (...)\fC [private]\fR
.PP
.SH MEMBER DATA DOCUMENTATION
.PP 
.SS template<classSTREAM> \fBACE_Streambuf_T\fR< \fBSTREAM\fR >* ACE_IOStream<\fBSTREAM\fR>::streambuf_\fC [protected]\fR
.PP
This is where all of the action takes place. The streambuf_ is the interface to the underlying \fBSTREAM\fR.
.PP


.SH AUTHOR
.PP 
Generated automatically by Doxygen for ACE from the source code.