/MEng/Card1

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

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

Literals:

Card1 kMaxValue(0xFF);

 

Constructors:

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

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

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

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

GetHighNibble() Returns MEng.Card1;
GetLowNibble() Returns MEng.Card1;

Returns the high or low nibble of this object. The high nibble is the most significant nibble and the low nibble is the least significant nibble.

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

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

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

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

Bitwise ORs the two objects and return the result, leaving both objects unchanged. They do the same thing, and are only syntactically different. 

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 8, so that un-required shifting isn't require, because any value greater than 8 is redundant.

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

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

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

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

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

Performs a modulo division and sets this object to the remainder of the operation. These both do the same, they are just syntactically different.

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