1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsSupportsPrimitives_h__
7 #define nsSupportsPrimitives_h__
9 #include "mozilla/Attributes.h"
11 #include "nsISupportsPrimitives.h"
15 class nsSupportsIDImpl MOZ_FINAL
: public nsISupportsID
19 NS_DECL_NSISUPPORTSPRIMITIVE
25 ~nsSupportsIDImpl() {}
30 /***************************************************************************/
32 class nsSupportsCStringImpl MOZ_FINAL
: public nsISupportsCString
36 NS_DECL_NSISUPPORTSPRIMITIVE
37 NS_DECL_NSISUPPORTSCSTRING
39 nsSupportsCStringImpl() {}
42 ~nsSupportsCStringImpl() {}
47 /***************************************************************************/
49 class nsSupportsStringImpl MOZ_FINAL
: public nsISupportsString
53 NS_DECL_NSISUPPORTSPRIMITIVE
54 NS_DECL_NSISUPPORTSSTRING
56 nsSupportsStringImpl() {}
59 ~nsSupportsStringImpl() {}
64 /***************************************************************************/
66 class nsSupportsPRBoolImpl MOZ_FINAL
: public nsISupportsPRBool
69 NS_DECL_THREADSAFE_ISUPPORTS
70 NS_DECL_NSISUPPORTSPRIMITIVE
71 NS_DECL_NSISUPPORTSPRBOOL
73 nsSupportsPRBoolImpl();
76 ~nsSupportsPRBoolImpl() {}
81 /***************************************************************************/
83 class nsSupportsPRUint8Impl MOZ_FINAL
: public nsISupportsPRUint8
87 NS_DECL_NSISUPPORTSPRIMITIVE
88 NS_DECL_NSISUPPORTSPRUINT8
90 nsSupportsPRUint8Impl();
93 ~nsSupportsPRUint8Impl() {}
98 /***************************************************************************/
100 class nsSupportsPRUint16Impl MOZ_FINAL
: public nsISupportsPRUint16
104 NS_DECL_NSISUPPORTSPRIMITIVE
105 NS_DECL_NSISUPPORTSPRUINT16
107 nsSupportsPRUint16Impl();
110 ~nsSupportsPRUint16Impl() {}
115 /***************************************************************************/
117 class nsSupportsPRUint32Impl MOZ_FINAL
: public nsISupportsPRUint32
121 NS_DECL_NSISUPPORTSPRIMITIVE
122 NS_DECL_NSISUPPORTSPRUINT32
124 nsSupportsPRUint32Impl();
127 ~nsSupportsPRUint32Impl() {}
132 /***************************************************************************/
134 class nsSupportsPRUint64Impl MOZ_FINAL
: public nsISupportsPRUint64
138 NS_DECL_NSISUPPORTSPRIMITIVE
139 NS_DECL_NSISUPPORTSPRUINT64
141 nsSupportsPRUint64Impl();
144 ~nsSupportsPRUint64Impl() {}
149 /***************************************************************************/
151 class nsSupportsPRTimeImpl MOZ_FINAL
: public nsISupportsPRTime
155 NS_DECL_NSISUPPORTSPRIMITIVE
156 NS_DECL_NSISUPPORTSPRTIME
158 nsSupportsPRTimeImpl();
161 ~nsSupportsPRTimeImpl() {}
166 /***************************************************************************/
168 class nsSupportsCharImpl MOZ_FINAL
: public nsISupportsChar
172 NS_DECL_NSISUPPORTSPRIMITIVE
173 NS_DECL_NSISUPPORTSCHAR
175 nsSupportsCharImpl();
178 ~nsSupportsCharImpl() {}
183 /***************************************************************************/
185 class nsSupportsPRInt16Impl MOZ_FINAL
: public nsISupportsPRInt16
189 NS_DECL_NSISUPPORTSPRIMITIVE
190 NS_DECL_NSISUPPORTSPRINT16
192 nsSupportsPRInt16Impl();
195 ~nsSupportsPRInt16Impl() {}
200 /***************************************************************************/
202 class nsSupportsPRInt32Impl MOZ_FINAL
: public nsISupportsPRInt32
206 NS_DECL_NSISUPPORTSPRIMITIVE
207 NS_DECL_NSISUPPORTSPRINT32
209 nsSupportsPRInt32Impl();
212 ~nsSupportsPRInt32Impl() {}
217 /***************************************************************************/
219 class nsSupportsPRInt64Impl MOZ_FINAL
: public nsISupportsPRInt64
223 NS_DECL_NSISUPPORTSPRIMITIVE
224 NS_DECL_NSISUPPORTSPRINT64
226 nsSupportsPRInt64Impl();
229 ~nsSupportsPRInt64Impl() {}
234 /***************************************************************************/
236 class nsSupportsFloatImpl MOZ_FINAL
: public nsISupportsFloat
240 NS_DECL_NSISUPPORTSPRIMITIVE
241 NS_DECL_NSISUPPORTSFLOAT
243 nsSupportsFloatImpl();
246 ~nsSupportsFloatImpl() {}
251 /***************************************************************************/
253 class nsSupportsDoubleImpl MOZ_FINAL
: public nsISupportsDouble
257 NS_DECL_NSISUPPORTSPRIMITIVE
258 NS_DECL_NSISUPPORTSDOUBLE
260 nsSupportsDoubleImpl();
263 ~nsSupportsDoubleImpl() {}
268 /***************************************************************************/
270 class nsSupportsVoidImpl MOZ_FINAL
: public nsISupportsVoid
273 NS_DECL_THREADSAFE_ISUPPORTS
274 NS_DECL_NSISUPPORTSPRIMITIVE
275 NS_DECL_NSISUPPORTSVOID
277 nsSupportsVoidImpl();
280 ~nsSupportsVoidImpl() {}
285 /***************************************************************************/
287 class nsSupportsInterfacePointerImpl MOZ_FINAL
: public nsISupportsInterfacePointer
290 NS_DECL_THREADSAFE_ISUPPORTS
291 NS_DECL_NSISUPPORTSPRIMITIVE
292 NS_DECL_NSISUPPORTSINTERFACEPOINTER
294 nsSupportsInterfacePointerImpl();
297 ~nsSupportsInterfacePointerImpl();
299 nsCOMPtr
<nsISupports
> mData
;
303 /***************************************************************************/
306 * Wraps a static const char* buffer for use with nsISupportsCString
308 * Only use this class with static buffers, or arena-allocated buffers of
309 * permanent lifetime!
311 class nsSupportsDependentCString MOZ_FINAL
: public nsISupportsCString
315 NS_DECL_NSISUPPORTSPRIMITIVE
316 NS_DECL_NSISUPPORTSCSTRING
318 explicit nsSupportsDependentCString(const char* aStr
);
321 ~nsSupportsDependentCString() {}
323 nsDependentCString mData
;
326 #endif /* nsSupportsPrimitives_h__ */