/MEng/Card8

ClassPath:MEng.Card8
Parent ClassPath:MEng.Formattable
Copyable:Yes
Final:Yes

MEng.Card8 represents an unsigned (cardinal) value from 0 to 0xFFFFFFFFFFFFFFFF. This class provides a full set of mathematical and bitwise operations on Card8 values.

 

Literals:

Card8 kMaxValue(0xFFFFFFFFFFFFFFFF);

 

Constructors:

Constructor();
Constructor([In] MEng.Card8 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.Card8 ToAdd) Returns MEng.Card8;
operator+([In] MEng.Card8 Src1, [In] MEng.Card8 Src2) Returns MEng.Card8;

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.Card8 SrcVal) Returns MEng.Card8;
operator&([In] MEng.Card8 Src1, [In] MEng.Card8 Src2) Returns MEng.Card8;

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.Card8 DivBy) Returns MEng.Card8;
operator/([In] MEng.Card8 Src1, [In] MEng.Card8 Src2) Returns MEng.Card8;

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.Card8 ToComp) Returns MEng.Boolean;
operator=([In] MEng.Card8 Src1, [In] MEng.Card8 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 63 for this Card8 class, where 0 is the low order bit and 63 is the high order. If the bit is on, then True is returned. Else False is returned.

GetByte([In] Card4 Index) Returns MEng.Card1;

Returns one of the bytes of this Card8 value, by index. Byte 0 is the least significant byte and Byte 7 is the most significant byte.

GetHighDWord() Returns MEng.Card4;
GetLowDWord() Returns MEng.Card4;

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.Card8 ToComp) Returns MEng.Boolean;
operator>([In] MEng.Card8 Src1, [In] MEng.Card8 Src2) Returns MEng.Boolean;
GtThanEq([In] MEng.Card8 ToComp) Returns MEng.Boolean;
operator>=([In] MEng.Card8 Src1, [In] MEng.Card8 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.Card8 ToComp) Returns MEng.Boolean;
operator<([In] MEng.Card8 Src1, [In] MEng.Card8 Src2) Returns MEng.Boolean;
LsThanEq([In] MEng.Card8 ToComp) Returns MEng.Boolean;
operator<=([In] MEng.Card8 Src1, [In] MEng.Card8 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.Card8 Test) Returns MEng.Card8;
MinVal([In] MEng.Card8 Test) Returns MEng.Card8;

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.

operator%([In] MEng.Card8 Src1, [In] MEng.Card8 Src2) Returns MEng.Card8;
ModDivEq([In] MEng.Card8 DivBy) Returns MEng.Card8;

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.Card8 MulBy) Returns MEng.Card8;
operator*([In] MEng.Card8 Src1, [In] MEng.Card8 Src2) Returns MEng.Card8;

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.Card8 SrcVal) Returns MEng.Card8;
operator|([In] MEng.Card8 Src1, [In] MEng.Card8 Src2) Returns MEng.Card8;

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.Card8 ShiftBy);
ShiftRight([In] MEng.Card8 ShiftBy);

Shifts this object's value left or right by the indicated number of bits. The shift by is really turned into ShiftBy mod 64, so that un-required shifting isn't require, because any value greater than 64 is redundant.

Sub([In] MEng.Card8 MulBy) Returns MEng.Card8;
operator-([In] MEng.Card8 Src1, [In] MEng.Card8 Src2) Returns MEng.Card8;

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.Card8 SrcVal) Returns MEng.Card8;
operator^([In] MEng.Card8 Src1, [In] MEng.Card8 Src2) Returns MEng.Card8;

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.Card8 SrcVal);
operator&=([In] MEng.Card8 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.Card8;
operator--() Returns MEng.Card8;

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.Card8 DivBy);
operator/=([In] MEng.Card8 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.Card8;
operator++() Returns MEng.Card8;

If the value of this object is less than the maximum Card8 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.Card8 DivBy) Returns MEng.Card8;
operator%=([In] MEng.Card8 Src1, [In] MEng.Card8 Src2) Returns MEng.Card8;

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.Card8 SrcVal);
operator-=([In] MEng.Card8 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.Card8 SrcVal);
operator*=([In] MEng.Card8 SrcVal);

Multiplies this object by the passed object, updating this object with the resulting value. These both do the same thing, and are only syntactically different.

OrEq([In] MEng.Card8 SrcVal);
operator|=([In] MEng.Card8 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.Card8 SrcVal);
operator+=([In] MEng.Card8 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.

XorEq([In] MEng.Card8 SrcVal);
operator^=([In] MEng.Card8 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.