Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

dynbuf Class Reference

Inherits databuf.

List of all members.


Detailed Description

A dynamically allocated, reference-counted mutable data buffer.

Constructing a dynbuf object allocates a fixed amount of memory, which is automatically deallocated when the last dynbuf pointing to that memory is deleted.

Note that a dynbuf may be cast to a databuf or a constbuf, but not vice versa. Also, copying a dynbuf to a databuf or constbuf does not create another reference to the underlying data.


Public Methods

 dynbuf ()
 Null constructor.

 dynbuf (unsigned int maxlen)
 Dynamically allocates a data buffer whose current length is 0 bytes but whose maximum length is maxlen bytes.

 dynbuf (const dynbuf &other)
 Copies a dynbuf, making another reference to other's underlying storage.

dynbuf & operator= (const dynbuf &other)
 Copies a dynbuf, making another reference to other's underlying storage.

 ~dynbuf ()
 Deletes the underlying storage of this dynbuf if it is the last existing copy.


Constructor & Destructor Documentation

dynbuf::dynbuf  
 

Null constructor.

dynbuf::dynbuf unsigned int    maxlen
 

Dynamically allocates a data buffer whose current length is 0 bytes but whose maximum length is maxlen bytes.

The underlying storage will be deallocate when the last dynbuf referring to that storage is destructed.

dynbuf::dynbuf const dynbuf &    other
 

Copies a dynbuf, making another reference to other's underlying storage.

dynbuf::~dynbuf  
 

Deletes the underlying storage of this dynbuf if it is the last existing copy.


Member Function Documentation

dynbuf& dynbuf::operator= const dynbuf &    other
 

Copies a dynbuf, making another reference to other's underlying storage.


The documentation for this class was generated from the following file:
Generated on Fri Dec 20 13:35:10 2002 for NMSTL