1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
23 * Dan Rosen <dr@netscape.com>
25 * Alternatively, the contents of this file may be used under the terms of
26 * either of the GNU General Public License Version 2 or later (the "GPL"),
27 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
39 #ifndef nsSupportsPrimitives_h__
40 #define nsSupportsPrimitives_h__
42 #include "nsISupportsPrimitives.h"
45 #include "nsDependentString.h"
47 class nsSupportsIDImpl
: public nsISupportsID
51 NS_DECL_NSISUPPORTSPRIMITIVE
57 ~nsSupportsIDImpl() { }
62 /***************************************************************************/
64 class nsSupportsCStringImpl
: public nsISupportsCString
68 NS_DECL_NSISUPPORTSPRIMITIVE
69 NS_DECL_NSISUPPORTSCSTRING
71 nsSupportsCStringImpl() {}
74 ~nsSupportsCStringImpl() {}
79 /***************************************************************************/
81 class nsSupportsStringImpl
: public nsISupportsString
85 NS_DECL_NSISUPPORTSPRIMITIVE
86 NS_DECL_NSISUPPORTSSTRING
88 nsSupportsStringImpl() {}
91 ~nsSupportsStringImpl() {}
96 /***************************************************************************/
98 class nsSupportsPRBoolImpl
: public nsISupportsPRBool
102 NS_DECL_NSISUPPORTSPRIMITIVE
103 NS_DECL_NSISUPPORTSPRBOOL
105 nsSupportsPRBoolImpl();
108 ~nsSupportsPRBoolImpl() {}
113 /***************************************************************************/
115 class nsSupportsPRUint8Impl
: public nsISupportsPRUint8
119 NS_DECL_NSISUPPORTSPRIMITIVE
120 NS_DECL_NSISUPPORTSPRUINT8
122 nsSupportsPRUint8Impl();
125 ~nsSupportsPRUint8Impl() {}
130 /***************************************************************************/
132 class nsSupportsPRUint16Impl
: public nsISupportsPRUint16
136 NS_DECL_NSISUPPORTSPRIMITIVE
137 NS_DECL_NSISUPPORTSPRUINT16
139 nsSupportsPRUint16Impl();
142 ~nsSupportsPRUint16Impl() {}
147 /***************************************************************************/
149 class nsSupportsPRUint32Impl
: public nsISupportsPRUint32
153 NS_DECL_NSISUPPORTSPRIMITIVE
154 NS_DECL_NSISUPPORTSPRUINT32
156 nsSupportsPRUint32Impl();
159 ~nsSupportsPRUint32Impl() {}
164 /***************************************************************************/
166 class nsSupportsPRUint64Impl
: public nsISupportsPRUint64
170 NS_DECL_NSISUPPORTSPRIMITIVE
171 NS_DECL_NSISUPPORTSPRUINT64
173 nsSupportsPRUint64Impl();
176 ~nsSupportsPRUint64Impl() {}
181 /***************************************************************************/
183 class nsSupportsPRTimeImpl
: public nsISupportsPRTime
187 NS_DECL_NSISUPPORTSPRIMITIVE
188 NS_DECL_NSISUPPORTSPRTIME
190 nsSupportsPRTimeImpl();
193 ~nsSupportsPRTimeImpl() {}
198 /***************************************************************************/
200 class nsSupportsCharImpl
: public nsISupportsChar
204 NS_DECL_NSISUPPORTSPRIMITIVE
205 NS_DECL_NSISUPPORTSCHAR
207 nsSupportsCharImpl();
210 ~nsSupportsCharImpl() {}
215 /***************************************************************************/
217 class nsSupportsPRInt16Impl
: public nsISupportsPRInt16
221 NS_DECL_NSISUPPORTSPRIMITIVE
222 NS_DECL_NSISUPPORTSPRINT16
224 nsSupportsPRInt16Impl();
227 ~nsSupportsPRInt16Impl() {}
232 /***************************************************************************/
234 class nsSupportsPRInt32Impl
: public nsISupportsPRInt32
238 NS_DECL_NSISUPPORTSPRIMITIVE
239 NS_DECL_NSISUPPORTSPRINT32
241 nsSupportsPRInt32Impl();
244 ~nsSupportsPRInt32Impl() {}
249 /***************************************************************************/
251 class nsSupportsPRInt64Impl
: public nsISupportsPRInt64
255 NS_DECL_NSISUPPORTSPRIMITIVE
256 NS_DECL_NSISUPPORTSPRINT64
258 nsSupportsPRInt64Impl();
261 ~nsSupportsPRInt64Impl() {}
266 /***************************************************************************/
268 class nsSupportsFloatImpl
: public nsISupportsFloat
272 NS_DECL_NSISUPPORTSPRIMITIVE
273 NS_DECL_NSISUPPORTSFLOAT
275 nsSupportsFloatImpl();
278 ~nsSupportsFloatImpl() {}
283 /***************************************************************************/
285 class nsSupportsDoubleImpl
: public nsISupportsDouble
289 NS_DECL_NSISUPPORTSPRIMITIVE
290 NS_DECL_NSISUPPORTSDOUBLE
292 nsSupportsDoubleImpl();
295 ~nsSupportsDoubleImpl() {}
300 /***************************************************************************/
302 class nsSupportsVoidImpl
: public nsISupportsVoid
306 NS_DECL_NSISUPPORTSPRIMITIVE
307 NS_DECL_NSISUPPORTSVOID
309 nsSupportsVoidImpl();
312 ~nsSupportsVoidImpl() {}
317 /***************************************************************************/
319 class nsSupportsInterfacePointerImpl
: public nsISupportsInterfacePointer
323 NS_DECL_NSISUPPORTSPRIMITIVE
324 NS_DECL_NSISUPPORTSINTERFACEPOINTER
326 nsSupportsInterfacePointerImpl();
329 ~nsSupportsInterfacePointerImpl();
331 nsCOMPtr
<nsISupports
> mData
;
335 /***************************************************************************/
338 * Wraps a static const char* buffer for use with nsISupportsCString
340 * Only use this class with static buffers, or arena-allocated buffers of
341 * permanent lifetime!
343 class nsSupportsDependentCString
: public nsISupportsCString
347 NS_DECL_NSISUPPORTSPRIMITIVE
348 NS_DECL_NSISUPPORTSCSTRING
350 nsSupportsDependentCString(const char* aStr
);
353 ~nsSupportsDependentCString() {}
355 nsDependentCString mData
;
358 #endif /* nsSupportsPrimitives_h__ */