nsInt64.h revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
0N/A/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2362N/A/* ***** BEGIN LICENSE BLOCK ***** 0N/A * Version: MPL 1.1/GPL 2.0/LGPL 2.1 0N/A * The contents of this file are subject to the Mozilla Public License Version 0N/A * 1.1 (the "License"); you may not use this file except in compliance with 0N/A * the License. You may obtain a copy of the License at 0N/A * Software distributed under the License is distributed on an "AS IS" basis, 0N/A * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 0N/A * for the specific language governing rights and limitations under the 0N/A * The Original Code is mozilla.org code. 0N/A * The Initial Developer of the Original Code is 0N/A * Netscape Communications Corporation. 2362N/A * Portions created by the Initial Developer are Copyright (C) 1998 2362N/A * the Initial Developer. All Rights Reserved. 0N/A * Alternatively, the contents of this file may be used under the terms of 0N/A * either of the GNU General Public License Version 2 or later (the "GPL"), 0N/A * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 0N/A * in which case the provisions of the GPL or the LGPL are applicable instead 0N/A * of those above. If you wish to allow use of your version of this file only 0N/A * under the terms of either the GPL or the LGPL, and not to allow others to 0N/A * use your version of this file under the terms of the MPL, indicate your 0N/A * decision by deleting the provisions above and replace them with the notice 0N/A * and other provisions required by the GPL or the LGPL. If you do not delete 0N/A * the provisions above, a recipient may use your version of this file under 0N/A * the terms of any one of the MPL, the GPL or the LGPL. 0N/A * ***** END LICENSE BLOCK ***** */ 0N/A * This class encapsulates full 64-bit integer functionality and 0N/A * provides simple arithmetic and conversion operations. 0N/A// If you ever decide that you need to add a non-inline method to this 0N/A// class, be sure to change the class declaration to "class NS_BASE 0N/A * Construct a new 64-bit integer. 0N/A * Construct a new 64-bit integer from a 32-bit signed integer * Construct a new 64-bit integer from a 32-bit unsigned integer * Construct a new 64-bit integer from a floating point value. * Construct a new 64-bit integer from a native 64-bit integer * Construct a new 64-bit integer from another 64-bit integer // ~nsTInt64(void) -- XXX destructor unnecessary * Assign a 64-bit integer to another 64-bit integer * Convert a 64-bit integer to a signed 32-bit value * Convert a 64-bit integer to an unsigned 32-bit value * Convert a 64-bit integer to a floating point value * Convert a 64-bit integer to a native 64-bit integer. * Perform unary negation on a 64-bit integer. * Increment a 64-bit integer by a 64-bit integer amount. * Decrement a 64-bit integer by a 64-bit integer amount. * Multiply a 64-bit integer by a 64-bit integer amount. * Divide a 64-bit integer by a 64-bit integer amount. * Compute the modulus of a 64-bit integer to a 64-bit value. * Shift a 64-bit integer left. * Shift a 64-bit signed integer right. * Add two 64-bit integers. * Subtract one 64-bit integer from another. * Multiply two 64-bit integers * Divide one 64-bit integer by another * Compute the modulus of two 64-bit integers * Shift left a 64-bit integer * Shift right a signed 64-bit integer * Determine if two 64-bit integers are equal * Determine if two 64-bit integers are not equal * Perform a bitwise AND of two 64-bit integers * Perform a bitwise OR of two 64-bit integers * Perform a bitwise XOR of two 64-bit integers * Compute the bitwise NOT of a 64-bit integer * Compute the bitwise AND with another 64-bit integer * Compute the bitwise OR with another 64-bit integer * Compute the bitwise XOR with another 64-bit integer * Determine if one 64-bit integer is strictly greater than another, using signed values * Determine if one 64-bit integer is greater than or equal to another, using signed values * Determine if one 64-bit integer is strictly less than another, using signed values * Determine if one 64-bit integers is less than or equal to another, using signed values