- Inherits from:
- Object
- Conforms to:
- DComparable, DDatable, DParsable, DTextable
- Declared in:
- DLong.h
Object
|
+---DLong
Class Description
The long class implements a number of methods for storing and manipulating long numbers.
- Last modified:
- 31-Oct-2007 (DLong.h)
Instance Variables
- private long _nr
- Constructors
- - (DLong *) init
- Initialises to zero number
- Returns:
- the object
- - (DLong *) init :(long) number
- Initialise to a number
- Parameters:
- number - the number
- Returns:
- the object
- Member methods
- - (long) get
- Get the long number
- Returns:
- the number
- - (DLong *) set :(long) number
- Set the long number
- Parameters:
- number - the long
- Returns:
- the object
- Comparable protocol
- - (long) compare :(DLong *) other
- Compare two long objects
- Parameters:
- other - the object to compare with
- Returns:
- the result of the comparison (-1,0,1)
- Parsable protocol
- - (int) fromString :(char **) cstr
- Parse a string for setting the object
- Parameters:
- cstr - the string to be parsed (moved to first non-parsable char)
- Returns:
- the result (0, ERANGE, ENODATA)
- Textable protocol
- - (DText *) toText
- Return a text string
- Returns:
- a (new) text string with the number
- Datable protocol
- - (DData *) toData
- Return a data string
- Returns:
- a (new) data string
- Endian methods
- - (long) toBigEndian
- Return the BigEndian (network order) order for the object
- Returns:
- the big endian converted long
- - (long) toLittleEndian
- Return the LittleEndian order for the object
- Returns:
- the little endian converted long
generated 05-Nov-2007 by ObjcDoc 3.0.0