Line data Source code
1 : #ifndef INCLUDED_COM_SUN_STAR_LOGGING_LOGRECORD_HPP
2 : #define INCLUDED_COM_SUN_STAR_LOGGING_LOGRECORD_HPP
3 :
4 : #include "sal/config.h"
5 :
6 : #include "com/sun/star/logging/LogRecord.hdl"
7 :
8 : #include "com/sun/star/util/DateTime.hpp"
9 : #include "com/sun/star/uno/Type.hxx"
10 : #include "cppu/unotype.hxx"
11 : #include "rtl/ustring.hxx"
12 : #include "sal/types.h"
13 : #include "typelib/typeclass.h"
14 : #include "typelib/typedescription.h"
15 :
16 : namespace com { namespace sun { namespace star { namespace logging {
17 :
18 : inline LogRecord::LogRecord() SAL_THROW(())
19 : : LoggerName()
20 : , SourceClassName()
21 : , SourceMethodName()
22 : , Message()
23 : , LogTime()
24 : , SequenceNumber(0)
25 : , ThreadID()
26 : , Level(0)
27 : {
28 : }
29 :
30 0 : inline LogRecord::LogRecord(const ::rtl::OUString& LoggerName_, const ::rtl::OUString& SourceClassName_, const ::rtl::OUString& SourceMethodName_, const ::rtl::OUString& Message_, const css::util::DateTime& LogTime_, const ::sal_Int64& SequenceNumber_, const ::rtl::OUString& ThreadID_, const ::sal_Int32& Level_) SAL_THROW(())
31 : : LoggerName(LoggerName_)
32 : , SourceClassName(SourceClassName_)
33 : , SourceMethodName(SourceMethodName_)
34 : , Message(Message_)
35 : , LogTime(LogTime_)
36 : , SequenceNumber(SequenceNumber_)
37 : , ThreadID(ThreadID_)
38 0 : , Level(Level_)
39 : {
40 0 : }
41 :
42 : } } } }
43 :
44 : namespace com { namespace sun { namespace star { namespace logging {
45 :
46 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::logging::LogRecord const *) {
47 : //TODO: On certain platforms with weak memory models, the following code can result in some threads observing that the_type points to garbage
48 : static ::typelib_TypeDescriptionReference * the_type = 0;
49 : if (the_type == 0) {
50 : ::typelib_static_type_init(&the_type, typelib_TypeClass_STRUCT, "com.sun.star.logging.LogRecord");
51 : }
52 : return *reinterpret_cast< ::com::sun::star::uno::Type * >(&the_type);
53 : }
54 :
55 : } } } }
56 :
57 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER css::logging::LogRecord const *) SAL_THROW(()) {
58 : return ::cppu::UnoType< css::logging::LogRecord >::get();
59 : }
60 :
61 : #endif // INCLUDED_COM_SUN_STAR_LOGGING_LOGRECORD_HPP
|