dom/xslt/base/txCore.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/xslt/base/txCore.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,51 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef __txCore_h__
    1.10 +#define __txCore_h__
    1.11 +
    1.12 +#include "nscore.h"
    1.13 +#include "nsDebug.h"
    1.14 +#include "nsISupportsImpl.h"
    1.15 +
    1.16 +class nsAString;
    1.17 +
    1.18 +class txObject
    1.19 +{
    1.20 +public:
    1.21 +    txObject()
    1.22 +    {
    1.23 +        MOZ_COUNT_CTOR(txObject);
    1.24 +    }
    1.25 +
    1.26 +    /**
    1.27 +     * Deletes this txObject
    1.28 +     */
    1.29 +    virtual ~txObject()
    1.30 +    {
    1.31 +        MOZ_COUNT_DTOR(txObject);
    1.32 +    }
    1.33 +};
    1.34 +
    1.35 +/**
    1.36 + * Utility class for doubles
    1.37 + */
    1.38 +class txDouble
    1.39 +{
    1.40 +public:
    1.41 +    /**
    1.42 +     * Converts the value of the given double to a string, and appends
    1.43 +     * the result to the destination string.
    1.44 +     */
    1.45 +    static void toString(double aValue, nsAString& aDest);
    1.46 +
    1.47 +    /**
    1.48 +     * Converts the given String to a double, if the string value does not
    1.49 +     * represent a double, NaN will be returned.
    1.50 +     */
    1.51 +    static double toDouble(const nsAString& aStr);
    1.52 +};
    1.53 +
    1.54 +#endif

mercurial