DCL 3.7.4
Loading...
Searching...
No Matches
OutputStream.cpp
Go to the documentation of this file.
1#if 0
2#include <string.h>
3#include <stdio.h>
4#include <errno.h>
5#endif
6
7#include <dcl/Object.h>
8
9#if __DCL_HAVE_ALLOC_DEBUG
10#undef __DCL_ALLOC_LEVEL
11#define __DCL_ALLOC_LEVEL __DCL_ALLOC_INTERNAL
12#endif
13
14#include <dcl/Numeric.h>
15#include <dcl/OutputStream.h>
16
17__DCL_BEGIN_NAMESPACE
18
19#if __DCL_HAVE_THIS_FILE__
20#undef __THIS_FILE__
21static const char_t __THIS_FILE__[] = __T("dcl/OutputStream.cpp");
22#endif
23
25
26void OutputStream::close()
28{
29}
30
31void OutputStream::flush()
33{
34}
35
36int OutputStream::vprintf(const char* _format, va_list _arglist)
38{
39 __DCL_ASSERT_PARAM(_format != NULL);
40
41 ByteBuffer* buf = ByteBuffer::create(256);
42 int n = ByteBuffer::vformat(buf, _format, _arglist);
43 write(buf->data(), n);
44 buf->release();
45 return n;
46}
47
48int OutputStream::printf(const char* _format, ...)
50{
51 va_list arglist;
52 va_start(arglist, _format);
53 int r = vprintf(_format, arglist);
54 va_end(arglist);
55 return r;
56}
57
60{
61 out.write("\n", 1);
62 out.flush();
63 return out;
64}
65
66const struct __endl endl;
67
68__DCL_END_NAMESPACE
#define __THIS_FILE__
Definition _trace.h:14
#define NULL
Definition Config.h:312
#define DCLCAPI
Definition Config.h:95
wchar_t char_t
Definition Config.h:247
#define __DCL_THROWS1(e)
Definition Config.h:152
IOException *size_t r
Definition MediaInfo.cpp:82
#define __DCL_ASSERT_PARAM(expr)
Definition Object.h:409
#define IMPLEMENT_CLASSINFO(class_name, base_class_name)
Definition Object.h:245
#define __T(str)
Definition Object.h:60
DCLCAPI OutputStream & operator<<(OutputStream &out, const __endl &) __DCL_THROWS1(IOException *)
DCLCVAR const struct __endl endl