Ice 3.7 C++11 API Reference
Logger.h
Go to the documentation of this file.
1 //
2 // Copyright (c) ZeroC, Inc. All rights reserved.
3 //
4 //
5 // Ice version 3.7.10
6 //
7 // <auto-generated>
8 //
9 // Generated from file `Logger.ice'
10 //
11 // Warning: do not edit this file.
12 //
13 // </auto-generated>
14 //
15 
16 #ifndef __Ice_Logger_h__
17 #define __Ice_Logger_h__
18 
20 #include <Ice/ProxyF.h>
21 #include <Ice/ObjectF.h>
22 #include <Ice/ValueF.h>
23 #include <Ice/Exception.h>
24 #include <Ice/LocalObject.h>
25 #include <Ice/StreamHelpers.h>
26 #include <Ice/Comparable.h>
27 #include <IceUtil/ScopedArray.h>
28 #include <Ice/Optional.h>
29 #include <IceUtil/UndefSysMacros.h>
30 
31 #ifndef ICE_IGNORE_VERSION
32 # if ICE_INT_VERSION / 100 != 307
33 # error Ice version mismatch!
34 # endif
35 # if ICE_INT_VERSION % 100 >= 50
36 # error Beta header file detected
37 # endif
38 # if ICE_INT_VERSION % 100 < 10
39 # error Ice patch level mismatch!
40 # endif
41 #endif
42 
43 #ifndef ICE_API
44 # if defined(ICE_STATIC_LIBS)
45 # define ICE_API
46 # elif defined(ICE_API_EXPORTS)
47 # define ICE_API ICE_DECLSPEC_EXPORT
48 # else
49 # define ICE_API ICE_DECLSPEC_IMPORT
50 # endif
51 #endif
52 
53 #ifdef ICE_CPP11_MAPPING // C++11 mapping
54 
55 namespace Ice
56 {
57 
58 class Logger;
59 
60 }
61 
62 namespace Ice
63 {
64 
70 class ICE_CLASS(ICE_API) Logger
71 {
72 public:
73 
75 
81  virtual void print(const ::std::string& message) = 0;
82 
88  virtual void trace(const ::std::string& category, const ::std::string& message) = 0;
89 
95  virtual void warning(const ::std::string& message) = 0;
96 
102  virtual void error(const ::std::string& message) = 0;
103 
108  virtual ::std::string getPrefix() = 0;
109 
115  virtual ::std::shared_ptr<::Ice::Logger> cloneWithPrefix(const ::std::string& prefix) = 0;
116 };
117 
118 }
119 
121 namespace Ice
122 {
123 
124 }
126 
128 namespace Ice
129 {
130 
131 using LoggerPtr = ::std::shared_ptr<Logger>;
132 
133 }
135 
136 #else // C++98 mapping
137 
138 namespace Ice
139 {
140 
141 class Logger;
143 ICE_API LocalObject* upCast(Logger*);
145 typedef ::IceInternal::Handle< Logger> LoggerPtr;
146 
147 }
148 
149 namespace Ice
150 {
151 
157 class ICE_API Logger : public virtual LocalObject
158 {
159 public:
160 
161  typedef LoggerPtr PointerType;
162 
163  virtual ~Logger();
164 
165 #ifdef ICE_CPP11_COMPILER
166  Logger() = default;
167  Logger(const Logger&) = default;
168  Logger& operator=(const Logger&) = default;
169 #endif
170 
176  virtual void print(const ::std::string& message) = 0;
177 
183  virtual void trace(const ::std::string& category, const ::std::string& message) = 0;
184 
190  virtual void warning(const ::std::string& message) = 0;
191 
197  virtual void error(const ::std::string& message) = 0;
198 
203  virtual ::std::string getPrefix() = 0;
204 
210  virtual LoggerPtr cloneWithPrefix(const ::std::string& prefix) = 0;
211 };
212 
214 inline bool operator==(const Logger& lhs, const Logger& rhs)
215 {
216  return static_cast<const LocalObject&>(lhs) == static_cast<const LocalObject&>(rhs);
217 }
218 
219 inline bool operator<(const Logger& lhs, const Logger& rhs)
220 {
221  return static_cast<const LocalObject&>(lhs) < static_cast<const LocalObject&>(rhs);
222 }
224 
225 }
226 
228 namespace Ice
229 {
230 
231 }
233 
234 #endif
235 
237 #endif
Optional.h
StreamHelpers.h
Ice::operator==
bool operator==(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:184
Ice::Logger::warning
virtual void warning(const ::std::string &message)=0
Log a warning message.
Ice::upCast
IceUtil::Shared * upCast(::Ice::LocalObject *)
ICE_API
#define ICE_API
Definition: Config.h:197
ICE_MEMBER
#define ICE_MEMBER(API)
Definition: Config.h:177
LocalObject.h
PushDisableWarnings.h
Ice::Logger::error
virtual void error(const ::std::string &message)=0
Log an error message.
Ice::Logger
The Ice message logger.
Definition: Logger.h:71
ProxyF.h
Ice::operator<
bool operator<(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition: Comparable.h:136
UndefSysMacros.h
ObjectF.h
Ice::Logger::cloneWithPrefix
virtual ::std::shared_ptr<::Ice::Logger > cloneWithPrefix(const ::std::string &prefix)=0
Returns a clone of the logger with a new prefix.
Ice
Definition: BuiltinSequences.h:56
Ice::Logger::trace
virtual void trace(const ::std::string &category, const ::std::string &message)=0
Log a trace message.
Comparable.h
Ice::Logger::getPrefix
virtual ::std::string getPrefix()=0
Returns this logger's prefix.
ScopedArray.h
Ice::Logger::~Logger
virtual ~Logger()
Exception.h
ValueF.h
Ice::Logger::print
virtual void print(const ::std::string &message)=0
Print a message.
PopDisableWarnings.h