ClassPath: MEng.Card4 Parent ClassPath: MEng.Formattable Copyable: Yes Final: Yes MEng.Card4 represents an unsigned (cardinal) value from 0 to 4294967295. This class provides a full set of mathematical and bitwise operations on Card4 values.
Literals:
Card4 kMaxValue(0xFFFFFFFF);
Constructors:
Constructor(); Constructor([In] MEng.Card4 InitVal);There is one default constructor, which will set the initial value to zero, and a constructor that takes an initial value.
Final, Const Methods:
Add([In] MEng.Card4 ToAdd) Returns MEng.Card4; operator+([In] MEng.Card4 Src1, [In] MEng.Card4 Src2) Returns MEng.Card4;Adds the two objects and returns the result, leaving both objects unaffected. They do the same thing, and are only syntactically different. Overflow is ignored.
And([In] MEng.Card4 SrcVal) Returns MEng.Card4; operator&([In] MEng.Card4 Src1, [In] MEng.Card4 Src2) Returns MEng.Card4;Bitwise ANDs the two objects and return the result, leaving both objects unchanged. They do the same thing, and are only syntactically different.
Div([In] MEng.Card4 DivBy) Returns MEng.Card4; operator/([In] MEng.Card4 Src1, [In] MEng.Card4 Src2) Returns MEng.Card4;Divides the left hand object by the right hand object, and returns the result, leaving both objects unaffected. They do the same thing, and are only syntactically different.
Equal([In] MEng.Card4 ToComp) Returns MEng.Boolean; operator=([In] MEng.Card4 Src1, [In] MEng.Card4 Src2) Returns MEng.Boolean;Compares the two objects and returns True if they are equal and False if they are unequal. Neither object is affected. They do the same thing, are only only syntactically different.
GetBit([In] Card4 BitIndex) Returns MEng.Boolean;Returns the state of the bit at the indicated index, 0 to 31 for this Card4 class, where 0 is the low order bit and 31 is the high order. If the bit is on, then True is returned. Else False is returned.
GetByte1() Returns MEng.Card1; GetByte2() Returns MEng.Card1; GetByte3() Returns MEng.Card1; GetByte4() Returns MEng.Card1;Returns one of the bytes of this Card4 value. Byte1 is the least significant byte and Byte4 is the most significant byte.
GetHighWord() Returns MEng.Card2; GetLowWord() Returns MEng.Card2;Returns the high or low word of this object. The high word is the most significant word and the low word is the least significant word.
GtThan([In] MEng.Card4 ToComp) Returns MEng.Boolean; operator>([In] MEng.Card4 Src1, [In] MEng.Card4 Src2) Returns MEng.Boolean; GtThanEq([In] MEng.Card4 ToComp) Returns MEng.Boolean; operator>=([In] MEng.Card4 Src1, [In] MEng.Card4 Src2) Returns MEng.Boolean;Compares the two objects and returns True if the left hand object is greater (or greater than or equal), else it returns False. Neither object is affected. The two sets do the same thing, and are just syntactically different.
LsThan([In] MEng.Card4 ToComp) Returns MEng.Boolean; operator<([In] MEng.Card4 Src1, [In] MEng.Card4 Src2) Returns MEng.Boolean; LsThanEq([In] MEng.Card4 ToComp) Returns MEng.Boolean; operator<=([In] MEng.Card4 Src1, [In] MEng.Card4 Src2) Returns MEng.Boolean;Compares the two objects and returns True if the left hand object is less than (or less than or equal) the right hand object, else it returns False. Neither object is affected. The two sets do the same thing, and are just syntactically different.
MaxVal([In] MEng.Card4 Test) Returns MEng.Card4; MinVal([In] MEng.Card4 Test) Returns MEng.Card4;Returns the larger or smaller of this value and the passed test value. So if this object's value is larger or smaller, it will be returned, else the passed value will be returned.
ModDiv([In] MEng.Card4 DivBy) Returns MEng.Card4; operator%([In] MEng.Card4 Src1, [In] MEng.Card4 Src2) Returns MEng.Card4;Performs a modulo division and returns the remainder of the operation. These both do the same thing, they are just syntactically different.
Mul([In] MEng.Card4 MulBy) Returns MEng.Card4; operator*([In] MEng.Card4 Src1, [In] MEng.Card4 Src2) Returns MEng.Card4;Multiplies the left hand object by the right hand object, and returns the result, leaving both objects unaffected. They do the same thing, and are only syntactically different. Overflow is ignored.
Or([In] MEng.Card4 SrcVal) Returns MEng.Card4; operator|([In] MEng.Card4 Src1, [In] MEng.Card4 Src2) Returns MEng.Card4;Bitwise ORs the two objects and return the result, leaving both objects unchanged. They do the same thing, and are only syntactically different.
PercentOf([In] MEng.Card8 SrcVal) Returns Card4;Calculates the percentage of this value represented by the passed value and returns it as a percentage value (0 to whatever percent it happens to be.) This is just a convenience to avoid the grunt work of doing all the casting to floating point format, dividing, multiplying, and casting back. So if this value is 200 and the passed value is 50, the return will be 25, since the passed value is 25 percent of this value.
ShiftLeft([In] MEng.Card4 ShiftBy); ShiftRight([In] MEng.Card4 ShiftBy);Shifts this object's value left or right by the indicated number of bits. The shift by is really turned into ShiftBy mod 32, so that un-required shifting isn't require, because any value greater than 32 is redundant.
Sub([In] MEng.Card4 MulBy) Returns MEng.Card4; operator-([In] MEng.Card4 Src1, [In] MEng.Card4 Src2) Returns MEng.Card4;Subtracts the right hand object from the left hand object, and returns the result, leaving both objects unaffected. They do the same thing, and are only syntactically different.
Xor([In] MEng.Card4 SrcVal) Returns MEng.Card4; operator^([In] MEng.Card4 Src1, [In] MEng.Card4 Src2) Returns MEng.Card4;Bitwise XORs the two objects and return the result, leaving both objects unchanged. They do the same thing, and are only syntactically different.
Final, Non-Const Methods:
AndEq([In] MEng.Card4 SrcVal); operator&=([In] MEng.Card4 SrcVal);Bitwise ANDs this object with passed object, updating this object with the resulting value. They do the same thing, and are only syntactically different.
Dec() Returns MEng.Card4; operator--() Returns MEng.Card4;If the value of this object is greater than zero, it is decremented by one, else nothing happens. These both do the same thing, and are just syntactically different. This is a postfix decrement, so the value returned is the value before the decrement.
DivEq([In] MEng.Card4 DivBy); operator/=([In] MEng.Card4 DivBy);Divides this object by the passed object, updating this object with the resulting value. They do the same thing, and are only syntactically different.
Inc() Returns MEng.Card4; operator++() Returns MEng.Card4;If the value of this object is less than the maximum Card4 value, it is incremented by one, else nothing happens. These both do the same thing, and are just syntactically different. This is a postfix increment, so the value returned is the value before the increment.
ModDivEq([In] MEng.Card4 DivBy) Returns MEng.Card4; operator%=([In] MEng.Card4 Src1, [In] MEng.Card4 Src2) Returns MEng.Card4;Performs a modulo division and sets this object to the value of the remainder of the operation. These both do the same thing, they are just syntactically different.
MinusEq([In] MEng.Card4 SrcVal); operator-=([In] MEng.Card4 SrcVal);Subtracts the passed object from this object, updating this object with the resulting value. They do the same thing, and are only syntactically different.
MulEq([In] MEng.Card4 SrcVal); operator*=([In] MEng.Card4 SrcVal);Multiplies this object by the passed object, updating this object with the resulting value. They do the same thing, and are only syntactically different.
OrEq([In] MEng.Card4 SrcVal); operator|=([In] MEng.Card4 SrcVal);Bitwise ORs this object with the passed object, updating this object with the resulting value. They do the same thing, and are only syntactically different.
PlusEq([In] MEng.Card4 SrcVal); operator+=([In] MEng.Card4 SrcVal);Adds the passed object to this object, updating this object with the resulting value. They do the same thing, and are only syntactically different.
SwapBytes();Reverses the order of the bytes in this 32 bit value.
XorEq([In] MEng.Card4 SrcVal); operator^=([In] MEng.Card4 SrcVal);Bitwise XORs this object with the passed object, updating this object's value with the result. They do the same thing, and are only syntactically different.