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 » PROPOSAL: small / usefull Stream iface extension
Re: PROPOSAL: small / usefull Stream iface extension [message #28009 is a reply to message #28006] Fri, 13 August 2010 10:30 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14265
Registered: November 2005
Ultimate Member
kohait00 wrote on Fri, 13 August 2010 04:23

another proposal, maybe this one's better...

	const byte * Peek(int size = 1)  { if(size <= 0) return NULL; if(ptr + size <= rdlim) return ptr; return NULL; }
	byte *    Head(int size = 1)     { if(size <= 0) return NULL; if(ptr + size <= wrlim) return ptr; return NULL; }



For some reasons, write variant sounds somewhat dangerous to me...

Have to think about this one...

Well, in any case, it should advance the ptr...

[Updated on: Fri, 13 August 2010 10:31]

Report message to a moderator

 
Read Message icon3.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: NEW: Tree<T> container
Next Topic: better Stream manual....more info needed
Goto Forum:
  


Current Time: Wed Jul 16 13:34:11 CEST 2025

Total time taken to generate the page: 0.03489 seconds