1 | /*
|
---|
2 | Copyright (C) 2005-2006 Feeling Software Inc.
|
---|
3 | MIT License: http://www.opensource.org/licenses/mit-license.php
|
---|
4 | */
|
---|
5 |
|
---|
6 | /**
|
---|
7 | @file FMInteger.h
|
---|
8 | The file containing functions and constants for integer values.
|
---|
9 | */
|
---|
10 |
|
---|
11 | /** A dynamically-sized array of 32-bit signed integer values. */
|
---|
12 | typedef vector<int32> Int32List;
|
---|
13 | /** A dynamically-sized array of 32-bit unsigned integer values. */
|
---|
14 | typedef vector<uint32> UInt32List;
|
---|
15 | /** A dynamically-sized array of 16-bit unsigned integer values. */
|
---|
16 | typedef vector<uint16> UInt16List;
|
---|
17 | /** A dynamically-sized array of 8-bit unsigned integer values. */
|
---|
18 | typedef vector<uint8> UInt8List;
|
---|
19 | /** A dynamically-sized array of 8-bit signed integer values. */
|
---|
20 | typedef vector<int8> Int8List;
|
---|
21 | /** A dynamically-sized array of boolean values. */
|
---|
22 | typedef vector<bool> BooleanList;
|
---|
23 |
|
---|
24 | /** Returns whether two signed or unsigned integers are equivalent.
|
---|
25 | For integers, this function simply wraps around the operator==.
|
---|
26 | @param i1 A first integer.
|
---|
27 | @param i2 A second integer.
|
---|
28 | @return Whether the two integers are equivalent. */
|
---|
29 | inline bool IsEquivalent(int8 i1, int8 i2) { return i1 == i2; }
|
---|
30 | inline bool IsEquivalent(uint8 i1, uint8 i2) { return i1 == i2; } /**< See above. */
|
---|
31 | inline bool IsEquivalent(int16 i1, int16 i2) { return i1 == i2; } /**< See above. */
|
---|
32 | inline bool IsEquivalent(uint16 i1, uint16 i2) { return i1 == i2; } /**< See above. */
|
---|
33 | inline bool IsEquivalent(int32 i1, int32 i2) { return i1 == i2; } /**< See above. */
|
---|
34 | inline bool IsEquivalent(uint32 i1, uint32 i2) { return i1 == i2; } /**< See above. */
|
---|
35 | inline bool IsEquivalent(int64 i1, int64 i2) { return i1 == i2; } /**< See above. */
|
---|
36 | inline bool IsEquivalent(uint64 i1, uint64 i2) { return i1 == i2; } /**< See above. */
|
---|
37 |
|
---|