xpcom/base/nsISizeOf.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xpcom/base/nsISizeOf.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,35 @@
     1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* vim: set ts=8 sts=2 et sw=2 tw=80: */
     1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef nsISizeOf_h___
    1.11 +#define nsISizeOf_h___
    1.12 +
    1.13 +#include "mozilla/MemoryReporting.h"
    1.14 +#include "nsISupports.h"
    1.15 +
    1.16 +#define NS_ISIZEOF_IID \
    1.17 +  {0x61d05579, 0xd7ec, 0x485c, \
    1.18 +    { 0xa4, 0x0c, 0x31, 0xc7, 0x9a, 0x5c, 0xf9, 0xf3 }}
    1.19 +
    1.20 +class nsISizeOf : public nsISupports
    1.21 +{
    1.22 +public:
    1.23 +  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISIZEOF_IID)
    1.24 +
    1.25 +  /**
    1.26 +   * Measures the size of the things pointed to by the object.
    1.27 +   */
    1.28 +  virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const = 0;
    1.29 +
    1.30 +  /**
    1.31 +   * Like SizeOfExcludingThis, but also includes the size of the object itself.
    1.32 +   */
    1.33 +  virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const = 0;
    1.34 +};
    1.35 +
    1.36 +NS_DEFINE_STATIC_IID_ACCESSOR(nsISizeOf, NS_ISIZEOF_IID)
    1.37 +
    1.38 +#endif /* nsISizeOf_h___ */

mercurial