DCL 4.0
Loading...
Searching...
No Matches
Writer.cpp
Go to the documentation of this file.
1#if 0
2#include <errno.h>
3#endif
4#include <dcl/Writer.h>
5
6#if __DCL_HAVE_ALLOC_DEBUG
7#undef __DCL_ALLOC_LEVEL
8#define __DCL_ALLOC_LEVEL __DCL_ALLOC_INTERNAL
9#endif
10
11#if __DCL_DEBUG
12#undef __THIS_FILE__
13static const char_t __THIS_FILE__[] = __T("dcl/Writer.cpp");
14#endif
15
16__DCL_BEGIN_NAMESPACE
17
19
20void Writer::close()
22{
23}
24
25void Writer::flush()
27{
28}
29
30int Writer::vprintf(const wchar_t* _format, va_list _arglist)
32{
33 __DCL_ASSERT_PARAM(_format != NULL);
34
35 CharBuffer* buf = CharBuffer::create(256);
36 int n = CharBuffer::vformat(buf, _format, _arglist);
37 write(buf->data(), n);
38 buf->release();
39 return n;
40}
41
42int Writer::printf(const wchar_t* _format, ...)
44{
45 va_list arglist;
46 va_start(arglist, _format);
47 int n = vprintf(_format, arglist);
48 va_end(arglist);
49 return n;
50}
51
54{
55 _out.write(L"\n", 1);
56 _out.flush();
57 return _out;
58}
59
60__DCL_END_NAMESPACE
61
#define __THIS_FILE__
Definition _trace.h:14
#define NULL
Definition Config.h:340
#define DCLCAPI
Definition Config.h:100
wchar_t char_t
Definition Config.h:275
#define __DCL_THROWS1(e)
Definition Config.h:167
#define __DCL_ASSERT_PARAM(expr)
Definition Object.h:384
#define IMPLEMENT_CLASSINFO(class_name, base_class_name)
Definition Object.h:228
#define __T(str)
Definition Object.h:44
ByteBuffer * buf
void CharsetConvertException *size_t n
Definition SQLField.cpp:253
DCLCAPI Writer & operator<<(Writer &_out, const __endl &) __DCL_THROWS1(IOException *)
Definition Writer.cpp:52