2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 04:12:37 -07: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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef __txCore_h__
|
|
|
|
#define __txCore_h__
|
|
|
|
|
|
|
|
#include "nscore.h"
|
|
|
|
#include "nsDebug.h"
|
2014-02-26 13:36:35 -08:00
|
|
|
#include "nsISupportsImpl.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
class nsAString;
|
|
|
|
|
|
|
|
class txObject
|
|
|
|
{
|
|
|
|
public:
|
2007-09-01 10:47:39 -07:00
|
|
|
txObject()
|
|
|
|
{
|
|
|
|
MOZ_COUNT_CTOR(txObject);
|
|
|
|
}
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
|
|
|
* Deletes this txObject
|
|
|
|
*/
|
|
|
|
virtual ~txObject()
|
|
|
|
{
|
2007-09-01 10:47:39 -07:00
|
|
|
MOZ_COUNT_DTOR(txObject);
|
2007-04-23 07:21:53 -07:00
|
|
|
}
|
2007-03-22 10:30:00 -07: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
|
|
|
|
* represent a double, NaN will be returned.
|
|
|
|
*/
|
|
|
|
static double toDouble(const nsAString& aStr);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|