Skip to content

Commit 480b217

Browse files
committed
Documentation updates
1 parent 6b150df commit 480b217

12 files changed

Lines changed: 391 additions & 9 deletions

File tree

Doxyfile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,14 @@ WARN_LOGFILE =
460460
# directories like "/usr/src/myproject". Separate the files or directories
461461
# with spaces.
462462

463-
INPUT = cppcms doc booster/booster booster/booster/aio booster/booster/locale booster/booster/nowide noicu/cppcms
463+
INPUT = cppcms \
464+
doc \
465+
booster/booster \
466+
booster/booster/aio \
467+
booster/booster/locale \
468+
booster/booster/nowide \
469+
noicu/cppcms \
470+
examples
464471

465472
# If the value of the INPUT tag contains directories, you can use the
466473
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
@@ -469,13 +476,14 @@ INPUT = cppcms doc booster/booster booster/booster/aio booster/
469476
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
470477
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
471478

472-
FILE_PATTERNS =
479+
FILE_PATTERNS = *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx \
480+
*.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.doxy
473481

474482
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
475483
# should be searched for input files as well. Possible values are YES and NO.
476484
# If left blank NO is used.
477485

478-
RECURSIVE = NO
486+
RECURSIVE = YES
479487

480488
# The EXCLUDE tag can be used to specify files and/or directories that should
481489
# excluded from the INPUT source files. This way you can easily exclude a
@@ -501,7 +509,7 @@ EXCLUDE_PATTERNS =
501509
# directories that contain example code fragments that are included (see
502510
# the \include command).
503511

504-
EXAMPLE_PATH =
512+
EXAMPLE_PATH = examples
505513

506514
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
507515
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp

cppcms/steal_buf.h

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,27 +120,52 @@ namespace util {
120120
char on_stack_[OnStackSize + 1];
121121
};
122122

123-
123+
124+
///
125+
/// \brief This is a special buffer that allows to "steal" some chunk
126+
/// of text from the output stream.
127+
///
128+
/// It does this by replacing stream's streambuf object with temporary
129+
/// stream buffer that records all data written to the stream and then
130+
/// returns the original buffer upon call to release() member function
131+
/// it steal_buffer destruction.
132+
///
133+
/// The \a Size parameter defines the default chunk of memory allocated
134+
/// on the stack before heap is used.
135+
///
124136
template<size_t Size = 128>
125137
class steal_buffer : public stackbuf<Size> {
126138
public:
139+
///
140+
/// Create the buffer and "Steal" the buffer from \a out
141+
///
127142
steal_buffer(std::ostream &out)
128143
{
129144
stolen_ = 0;
130145
stream_ = 0;
131146
steal(out);
132147
}
148+
///
149+
/// Create an empty buffer
150+
///
133151
steal_buffer()
134152
{
135153
stolen_ = 0;
136154
stream_ = 0;
137155
}
156+
///
157+
/// Steal the buffer from \a out
158+
///
138159
void steal(std::ostream &out)
139160
{
140161
release();
141162
stolen_ = out.rdbuf(this);
142163
stream_ = &out;
143164
}
165+
///
166+
/// Release the "stolen" buffer back, now the buffer contains all
167+
/// the data that was recorded.
168+
///
144169
void release()
145170
{
146171
if(stream_ && stolen_) {
@@ -158,25 +183,45 @@ namespace util {
158183
std::ostream *stream_;
159184
};
160185

186+
///
187+
/// This is a special ostream that uses stack in order
188+
/// to receive the data and faster then std::stringstream for
189+
/// small chunks.
190+
///
161191
template<size_t Size = 128>
162192
class stackstream : public std::ostream {
163193
public:
194+
///
195+
/// Create a new stackstream
196+
///
164197
stackstream() : std::ostream(0)
165198
{
166199
rbbuf(&buf_);
167200
}
201+
///
202+
/// Get the pointer to the first character in the range
203+
///
168204
char *begin()
169205
{
170206
return buf_->begin();
171207
}
208+
///
209+
/// Get the pointer to the one past last character in the range
210+
///
172211
char *end()
173212
{
174213
return buf_->end();
175214
}
215+
///
216+
/// Get a NUL terminated recorded string
217+
///
176218
char *c_str()
177219
{
178220
return buf_.c_str();
179221
}
222+
///
223+
/// Get a recorded string
224+
///
180225
std::string str()
181226
{
182227
return buf_.str();

0 commit comments

Comments
 (0)