2005-11-02 10:42:16 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2005-11-02 10:42:16 +03:00
|
|
|
|
|
|
|
#ifndef __txCore_h__
|
|
|
|
#define __txCore_h__
|
|
|
|
|
|
|
|
#include "nscore.h"
|
|
|
|
#include "nsDebug.h"
|
2014-02-27 01:36:35 +04:00
|
|
|
#include "nsISupportsImpl.h"
|
2005-11-02 10:42:16 +03:00
|
|
|
|
|
|
|
class nsAString;
|
|
|
|
|
|
|
|
class txObject
|
|
|
|
{
|
|
|
|
public:
|
2007-09-01 21:47:39 +04:00
|
|
|
txObject()
|
|
|
|
{
|
|
|
|
MOZ_COUNT_CTOR(txObject);
|
|
|
|
}
|
|
|
|
|
2005-11-02 10:42:16 +03:00
|
|
|
/**
|
|
|
|
* Deletes this txObject
|
2005-11-02 10:42:17 +03:00
|
|
|
*/
|
2005-11-02 10:42:16 +03:00
|
|
|
virtual ~txObject()
|
|
|
|
{
|
2007-09-01 21:47:39 +04:00
|
|
|
MOZ_COUNT_DTOR(txObject);
|
2007-04-23 18:21:53 +04:00
|
|
|
}
|
2005-11-02 10:42:16 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Utility class for doubles
|
|
|
|
*/
|
|
|
|
class txDouble
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* Converts the value of the given double to a string, and appends
|
|
|
|
* the result to the destination string.
|
|
|
|
*/
|
|
|
|
static void toString(double aValue, nsAString& aDest);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Converts the given String to a double, if the string value does not
|
2005-11-02 10:42:17 +03:00
|
|
|
* represent a double, NaN will be returned.
|
2005-11-02 10:42:16 +03:00
|
|
|
*/
|
|
|
|
static double toDouble(const nsAString& aStr);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|