#include <lkinteger.h>
Inheritance diagram for look::LookInteger::

Public Methods | |
| LookInteger (long theValue=0) | |
| Constructor. | |
| ~LookInteger (void) | |
| Destructor. | |
| LookInteger (const LookInteger &theOther) | |
| Copy constructor. | |
| LookInteger& | operator= (const LookInteger &theOther) |
| Assignment. | |
| LookInteger& | operator= (long theValue) |
| Assignment from long. | |
| LookTypeBase* | GetNewCopy (void) const |
| Get a new copy. More... | |
| long | GetTypeID (void) const |
| Get Type ID. More... | |
| operator long (void) const | |
| Cast to long. | |
| bool | Set (const LookString &theString) |
| Convert from decimal string. More... | |
| LookString | GetString (void) const |
| Conversion to a string. More... | |
| LookString | GetString (int theWidth) const |
| Conversion to a string given a width. More... | |
| LookString | GetOrdinalString (void) const |
| Convert to a ordinal string. More... | |
| LookString | GetSpelledOrdinalString (void) const |
| Convert to a spelled ordinal string. More... | |
| LookInteger& | operator+= (const LookInteger &) |
| Addition. | |
| LookInteger& | operator-= (const LookInteger &) |
| Subtraction. | |
| LookInteger | operator+ (const LookInteger &) const |
| Addition. | |
| LookInteger | operator- (const LookInteger &) const |
| Subtraction. | |
Protected Attributes | |
| long | itsValue |
| Its value. | |
Internally it uses a long.
It can also be used to convert integers to and from strings.
|
|
Get a new copy. Virtual copy constructor, aka clone.
Reimplemented from look::LookTypeBase. |
|
|
Convert to a ordinal string.
|
|
|
Convert to a spelled ordinal string. This can only cope with 0-99 - used for LookDateTimeFormatter (so it can do "First of January"). If it is out of range, "Out of Range" is returned.
|
|
|
Conversion to a string given a width. Converts to a decimal string, fitted to theWidth. If theWidth is insufficient, '*' characters are returned. Leading zeroes are prepended if necessary to ensure the returned string is wide enough.
|
|
|
Conversion to a string. Converts to a decimal string |
|
|
Get Type ID. Pseudo-rtti, or isA.
Reimplemented from look::LookTypeBase. |
|
|
Convert from decimal string. Converts using strtol. Returns false in case of overflow or invalid characters. If invalid characters, itsValue is still set as best it can.
|
1.2.8.1 written by Dimitri van Heesch,
© 1997-2001