- Inherits from:
- Object
- Conforms to:
- DComparable, DDatable, DParsable, DTextable
- Declared in:
- DInt.h
Object
|
+---DInt
Class Description
The Int class implements a number of methods for storing and manipulating int numbers.
- Last modified:
- 27-Feb-2005 (DInt.h)
Instance Variables
- private int _int
- Constructors
- - (DInt *) init
- Initialise to number zero
- Returns:
- the object
- - (DInt *) init :(int) number
- Initialise to a number
- Parameters:
- number - the number
- Returns:
- the object
- Member methods
- - (int) get
- Get the integer number
- Returns:
- the number
- - (DInt *) set :(int) number
- Set the integer number
- Parameters:
- number - the integer
- Returns:
- the object
- Comparable protocol
- - (int) compare :(DInt *) other
- Compare two integer 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 an int number
- Parameters:
- cstr - the string to be parsed (moved to the first no-parsable char)
- Returns:
- the result (0, ERANGE, ENODATA)
- Textable protocol
- - (DText *) toText
- Return a text string
- Returns:
- a (new) text string with the integer number
- Datable protocol
- - (DData *) toData
- Return a data string
- Returns:
- a (new) data string
- Endian methods
- - (int) toBigEndian
- Return the BigEndian (network order) order for the object
- Returns:
- the big endian converted int
- - (int) toLittleEndian
- Return the LittleEndian order for the object
- Returns:
- the little endian converted int
generated 08-Jan-2006 by ObjcDoc 3.0.0