File: ACE_Obstack_T.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 (161 lines) | stat: -rw-r--r-- 5,742 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
.TH ACE_Obstack_T 3 "1 Dec 2001" "ACE" \" -*- nroff -*-
.ad l
.nh
.SH NAME
ACE_Obstack_T \- 
.SH SYNOPSIS
.br
.PP
\fC#include <Obstack_T.h>\fR
.PP
.SS Public Methods

.in +1c
.ti -1c
.RI "\fBACE_Obstack_T\fR (size_t size = (4096 * sizeof (CHAR)) - sizeof (\fBACE_Obchunk\fR), \fBACE_Allocator\fR *allocator_strategy = 0)"
.br
.ti -1c
.RI "\fB~ACE_Obstack_T\fR (void)"
.br
.ti -1c
.RI "int \fBrequest\fR (size_t len)"
.br
.RI "\fIRequest Obstack to prepare a block at least \fIlen\fR long for building a new string. Return -1 if fail, 0 if success.\fR"
.ti -1c
.RI "CHAR* \fBgrow\fR (CHAR c)"
.br
.RI "\fIInserting a new CHAR \fIc\fR into the current building block without freezing (null terminating) the block. This function will create new chunk by checking the boundary of current Obchunk. Return the location \fIc\fR gets inserted to, or 0 if error.\fR"
.ti -1c
.RI "void \fBgrow_fast\fR (CHAR c)"
.br
.RI "\fIInserting a new CHAR \fIc\fR into the current building block without freezing (null terminating) the block and without checking for out-of-bound error.\fR"
.ti -1c
.RI "CHAR* \fBfreeze\fR (void)"
.br
.RI "\fIFreeze the current building block by null terminating it. Return the starting address of the current building block, 0 if error occurs.\fR"
.ti -1c
.RI "CHAR* \fBcopy\fR (const CHAR *data, size_t len)"
.br
.RI "\fICopy the data into the current Obchunk and freeze the current block. Return the starting address of the current building block, 0 if error occurs. \fIlen\fR specify the string length, not the actually data size.\fR"
.ti -1c
.RI "size_t \fBlength\fR (void) const"
.br
.RI "\fIReturn the maximum \fIlength\fR or \fIsize\fR of a string that can be put into this Obstack. \fIsize\fR = \fIlength\fR * sizeof (CHAR).\fR"
.ti -1c
.RI "size_t \fBsize\fR (void) const"
.br
.ti -1c
.RI "void \fBrelease\fR (void)"
.br
.RI "\fI"Release" the entire stack of Obchunks, putting it back on the free list.\fR"
.ti -1c
.RI "void \fBdump\fR (void) const"
.br
.RI "\fIDump the state of an object.\fR"
.in -1c
.SS Public Attributes

.in +1c
.ti -1c
.RI "\fBACE_ALLOC_HOOK_DECLARE\fR"
.br
.RI "\fIDeclare the dynamic allocation hooks.\fR"
.in -1c
.SS Protected Methods

.in +1c
.ti -1c
.RI "class \fBACE_Obchunk\fR* \fBnew_chunk\fR (void)"
.br
.in -1c
.SS Protected Attributes

.in +1c
.ti -1c
.RI "\fBACE_Allocator\fR* \fBallocator_strategy_\fR"
.br
.RI "\fIPointer to the allocator used by this Obstack.\fR"
.ti -1c
.RI "size_t \fBsize_\fR"
.br
.RI "\fICurrent size of the Obstack;.\fR"
.ti -1c
.RI "class \fBACE_Obchunk\fR* \fBhead_\fR"
.br
.RI "\fIHead of the Obchunk chain.\fR"
.ti -1c
.RI "class \fBACE_Obchunk\fR* \fBcurr_\fR"
.br
.RI "\fIPointer to the current Obchunk.\fR"
.in -1c
.SH CONSTRUCTOR & DESTRUCTOR DOCUMENTATION
.PP 
.SS template<classCHAR> ACE_Obstack_T<CHAR>::ACE_Obstack_T<CHAR> (size_t size = (4096 * sizeof (CHAR)) - sizeof (\fBACE_Obchunk\fR), \fBACE_Allocator\fR * allocator_strategy = 0)
.PP
.SS template<classCHAR> ACE_Obstack_T<CHAR>::~ACE_Obstack_T<CHAR> (void)
.PP
.SH MEMBER FUNCTION DOCUMENTATION
.PP 
.SS template<classCHAR> CHAR * ACE_Obstack_T<CHAR>::copy (const CHAR * data, size_t len)
.PP
Copy the data into the current Obchunk and freeze the current block. Return the starting address of the current building block, 0 if error occurs. \fIlen\fR specify the string length, not the actually data size.
.PP
.SS template<classCHAR> void ACE_Obstack_T<CHAR>::dump (void) const
.PP
Dump the state of an object.
.PP
.SS template<classCHAR> CHAR * ACE_Obstack_T<CHAR>::freeze (void)
.PP
Freeze the current building block by null terminating it. Return the starting address of the current building block, 0 if error occurs.
.PP
.SS template<classCHAR> CHAR * ACE_Obstack_T<CHAR>::grow (CHAR c)
.PP
Inserting a new CHAR \fIc\fR into the current building block without freezing (null terminating) the block. This function will create new chunk by checking the boundary of current Obchunk. Return the location \fIc\fR gets inserted to, or 0 if error.
.PP
.SS template<classCHAR> void ACE_Obstack_T<CHAR>::grow_fast (CHAR c)
.PP
Inserting a new CHAR \fIc\fR into the current building block without freezing (null terminating) the block and without checking for out-of-bound error.
.PP
.SS template<classCHAR> size_t ACE_Obstack_T<CHAR>::length (void) const
.PP
Return the maximum \fIlength\fR or \fIsize\fR of a string that can be put into this Obstack. \fIsize\fR = \fIlength\fR * sizeof (CHAR).
.PP
.SS template<classCHAR> class \fBACE_Obchunk\fR* ACE_Obstack_T<CHAR>::new_chunk (void)\fC [protected]\fR
.PP
.SS template<classCHAR> void ACE_Obstack_T<CHAR>::release (void)
.PP
"Release" the entire stack of Obchunks, putting it back on the free list.
.PP
.SS template<classCHAR> int ACE_Obstack_T<CHAR>::request (size_t len)
.PP
Request Obstack to prepare a block at least \fIlen\fR long for building a new string. Return -1 if fail, 0 if success.
.PP
.SS template<classCHAR> size_t ACE_Obstack_T<CHAR>::size (void) const
.PP
.SH MEMBER DATA DOCUMENTATION
.PP 
.SS template<classCHAR> ACE_Obstack_T<CHAR>::ACE_ALLOC_HOOK_DECLARE
.PP
Declare the dynamic allocation hooks.
.PP
.SS template<classCHAR> \fBACE_Allocator\fR * ACE_Obstack_T<CHAR>::allocator_strategy_\fC [protected]\fR
.PP
Pointer to the allocator used by this Obstack.
.PP
.SS template<classCHAR> class \fBACE_Obchunk\fR * ACE_Obstack_T<CHAR>::curr_\fC [protected]\fR
.PP
Pointer to the current Obchunk.
.PP
.SS template<classCHAR> class \fBACE_Obchunk\fR * ACE_Obstack_T<CHAR>::head_\fC [protected]\fR
.PP
Head of the Obchunk chain.
.PP
.SS template<classCHAR> size_t ACE_Obstack_T<CHAR>::size_\fC [protected]\fR
.PP
Current size of the Obstack;.
.PP


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