Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

ustl::bad_alloc Class Reference

Exception thrown on memory allocation failure by memblock::reserve. More...

#include <ustl.h>

Inheritance diagram for ustl::bad_alloc:

ustl::exception List of all members.

Public Member Functions

 bad_alloc (size_t nBytes=0) throw ()
 Initializes the empty object. nBytes is the size of the attempted allocation.
virtual const char * what (void) const throw ()
 Returns the name of the exception.
virtual void info (string &msgbuf, const char *fmt=NULL) const throw ()
 Returns a descriptive error message. fmt="Failed to allocate d bytes".
virtual void read (istream &is)
 Reads the exception from stream is.
virtual void write (ostream &os) const
 Writes the exception into stream os.
virtual size_t stream_size (void) const
 Returns the size of the written exception.

Protected Attributes

size_t m_nBytesRequested
 Number of bytes requested by the failed allocation.

Detailed Description

Exception thrown on memory allocation failure by memblock::reserve.


The documentation for this class was generated from the following files:
Generated on Mon Jan 17 14:35:02 2005 for uSTL by 1.3.9 Doxygen Hosted on SourceForge.net