- Inherits from:
- Object
- Conforms to:
- DComparable, DDatable, DParsable, DTextable
- Declared in:
- DBool.h
Object
|
+---DBool
Class Description
The Bool class implements a number of methods for storing and manipulating booleans.
- Last modified:
- 31-Oct-2007 (DBool.h)
Instance Variables
- private BOOL _bool
- the boolean state
- Constructors
- - (DBool *) init
- Initialise to false
- Returns:
- the object
- - (DBool *) init :(BOOL) state
- Initialise to a state
- Parameters:
- state - the state (YES,NO)
- Returns:
- the object
- Member methods
- - (BOOL) get
- Get the boolean state
- Returns:
- the state
- - (DBool *) set :(BOOL) state
- Set the boolean state
- Parameters:
- state - the state
- Returns:
- the object
- Comparable protocol
- - (int) compare :(DBool *) other
- Compare two bool 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 a boolean state (the string should contain: true/false,
yes/no, y/n, 1/0, t/f (case insensitive))
- Parameters:
- cstr - the string to be parsed (moved to the first no-parsable char)
- Returns:
- the result (0, ENODATA)
- Textable protocol
- - (DText *) toText
- Return a text string
- Returns:
- a (new) text string with the boolean state (YES/NO)
- Datable protocol
- - (DData *) toData
- Return a data string
- Returns:
- a (new) data string
generated 05-Nov-2007 by ObjcDoc 3.0.0