version 1.22, 2002/08/27 17:42:27
|
version 1.23, 2002/08/29 00:27:52
|
|
|
// Fill in a caller-provided int with the integer conversion of the value. | // Fill in a caller-provided int with the integer conversion of the value. |
void Optarg::Value (int &i) const throw (IncompatibleTypesException) | void Optarg::Value (int &i) const throw (IncompatibleTypesException) |
{ | { |
_CString cs(_value); |
CString cs = _value.getCString(); |
const char* s = cs; | const char* s = cs; |
Boolean valid = true; | Boolean valid = true; |
Uint32 j; | Uint32 j; |
|
|
// Fill in a caller-provided unsigned int | // Fill in a caller-provided unsigned int |
void Optarg::Value (unsigned int &i) const throw (IncompatibleTypesException) | void Optarg::Value (unsigned int &i) const throw (IncompatibleTypesException) |
{ | { |
_CString cs(_value); |
CString cs = _value.getCString(); |
const char* s = cs; | const char* s = cs; |
Boolean valid = true; | Boolean valid = true; |
Uint32 j; | Uint32 j; |
|
|
} | } |
} | } |
| |
// Fill in a call-provided unsigned int |
// Fill in a caller-provided long |
void | void |
Optarg::Value(long &l) const { | Optarg::Value(long &l) const { |
_CString cs(_value); |
l = (long)atoi(_value.getCString()); |
l = (long)atoi(cs); |
|
} | } |
| |
// Fill in a caller-provided long |
// Fill in a caller-provided unsigned long |
void | void |
Optarg::Value(unsigned long &l) const { | Optarg::Value(unsigned long &l) const { |
_CString cs(_value); |
l = (unsigned long)atoi(_value.getCString()); |
l = (unsigned long)atoi(cs); |
|
} | } |
| |
// Ditto unsigned long |
// Fill in a caller-provided double |
void | void |
Optarg::Value(double &d) const { | Optarg::Value(double &d) const { |
_CString cs(_value); |
d = (double)atof(_value.getCString()); |
d = (double)atof(cs); |
|
} | } |
| |
//-------------------------------------------------------------------- | //-------------------------------------------------------------------- |