Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
fallingdutch is currently offline  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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [XML] Assertion when GetAttrCount()
Next Topic: How to cast String to int64?
Goto Forum:
  


Current Time: Sun Jun 09 11:14:19 CEST 2024

Total time taken to generate the page: 0.01211 seconds