Home » U++ Library support » U++ Core » Value: BOOLEAN_V, USERVALUE_V [REQUEST]
Value: BOOLEAN_V, USERVALUE_V [REQUEST] [message #7114] |
Thu, 14 December 2006 12:00 |
fallingdutch
Messages: 258 Registered: July 2006
|
Experienced Member |
|
|
HI,
i would like two new const int for Values and one new type:
the new const ints are
- USERVALUE_V which should be the first free to use Value-Type ID
- BOOLEAN_V the id of the new Type BOOLEAN
I need Boolean for XML-Rpc:
//Value.h
const int USERVALUE_V = 1024;
const int BOOLEAN_V = [booleanid];
inline dword ValueTypeNo(const bool) {return BOOLEAN_V;}
//Value.cpp
Value::Value(bool b) { ptr = new RichValueRep<bool>(b); }
Value::operator bool() const
{
if(IsNull()) return false;
return (GetType()==BOOLEAN_V)?bool(RichValue<bool>::Extract(*this)): operator int();
}
i guess that should do it.
Bas
|
|
|
Goto Forum:
Current Time: Sun Jun 09 11:14:19 CEST 2024
Total time taken to generate the page: 0.01211 seconds
|