#include <ncbimisc.hpp>
Inheritance diagram for AutoArray< X, Del >:


"AutoPtr" like class for using with arrays
vector<> template comes with a performance penalty, since it always initializes its content. This template is not a vector replacement, it's a version of AutoPtr<> tuned for array pointers. For convenience it defines array style access operator [] and size based contructor.
Definition at line 558 of file ncbimisc.hpp.
Public Types | |
| typedef X | element_type |
| Define element type. | |
| typedef Del | deleter_type |
| Alias for template argument. | |
Public Member Functions | |
| AutoArray (size_t size) | |
| Construct the array using C++ new[] operator. | |
| AutoArray (element_type *p=0) | |
| AutoArray (element_type *p, const deleter_type &deleter) | |
| AutoArray (const AutoArray< X, Del > &p) | |
| ~AutoArray (void) | |
| AutoArray< X, Del > & | operator= (const AutoArray< X, Del > &p) |
| Assignment operator. | |
| AutoArray< X, Del > & | operator= (element_type *p) |
| Assignment operator. | |
| operator bool (void) const | |
| element_type * | get (void) const |
| Get pointer. | |
| element_type * | release (void) |
| Release will release ownership of pointer to caller. | |
| const element_type & | operator[] (size_t pos) const |
| array style dereference (returns value) | |
| element_type & | operator[] (size_t pos) |
| array style dereference (returns reference) | |
| void | reset (element_type *p=0) |
| Reset will delete old pointer, set content to new value, and accept ownership upon the new pointer. | |
| void | Swap (AutoPtr< X, Del > &a) |
Private Member Functions | |
| void | operator< (bool) const |
| Bool operator for use in if() clause. | |
| void | operator> (bool) const |
| void | operator<= (bool) const |
| void | operator>= (bool) const |
| void | operator== (bool) const |
| void | operator!= (bool) const |
| void | operator+ (bool) const |
| void | operator- (bool) const |
| element_type * | x_Release (void) const |
| Release for const object. | |
Private Attributes | |
| element_type * | m_Ptr |
| pair_base_member< deleter_type, bool > | m_Data |
| State info. | |
|
|||||
|
Alias for template argument.
Definition at line 562 of file ncbimisc.hpp. |
|
|||||
|
Define element type.
Definition at line 561 of file ncbimisc.hpp. |
|
||||||||||
|
Construct the array using C++ new[] operator.
Definition at line 568 of file ncbimisc.hpp. |
|
||||||||||
|
Definition at line 572 of file ncbimisc.hpp. |
|
||||||||||||||||
|
Definition at line 576 of file ncbimisc.hpp. |
|
||||||||||
|
Definition at line 581 of file ncbimisc.hpp. |
|
||||||||||
|
Definition at line 587 of file ncbimisc.hpp. |
|
||||||||||
|
Get pointer.
Definition at line 613 of file ncbimisc.hpp. Referenced by CBufferedLineReader::GetPosition(), CWigBufferedLineReader::GetPosition(), CBufferedLineReader::x_ReadBuffer(), and CWigBufferedLineReader::x_ReadBuffer(). |
|
||||||||||
|
Definition at line 610 of file ncbimisc.hpp. |
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
Bool operator for use in if() clause.
|
|
||||||||||
|
|
|
||||||||||
|
Assignment operator.
Definition at line 604 of file ncbimisc.hpp. |
|
||||||||||
|
Assignment operator.
Definition at line 593 of file ncbimisc.hpp. |
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
array style dereference (returns reference)
Definition at line 626 of file ncbimisc.hpp. |
|
||||||||||
|
array style dereference (returns value)
Definition at line 623 of file ncbimisc.hpp. |
|
||||||||||
|
Release will release ownership of pointer to caller.
Definition at line 616 of file ncbimisc.hpp. Referenced by AutoArray< CS_INT >::reset(). |
|
||||||||||
|
Reset will delete old pointer, set content to new value, and accept ownership upon the new pointer.
Definition at line 630 of file ncbimisc.hpp. Referenced by AutoArray< CS_INT >::operator=(), and AutoArray< CS_INT >::~AutoArray(). |
|
||||||||||
|
Definition at line 639 of file ncbimisc.hpp. |
|
||||||||||
|
Release for const object.
Definition at line 647 of file ncbimisc.hpp. Referenced by AutoArray< CS_INT >::AutoArray(), and AutoArray< CS_INT >::operator=(). |
|
|||||
|
State info.
Definition at line 654 of file ncbimisc.hpp. Referenced by AutoArray< CS_INT >::operator=(), AutoArray< CS_INT >::release(), and AutoArray< CS_INT >::reset(). |
|
|||||
|
Definition at line 653 of file ncbimisc.hpp. Referenced by AutoArray< CS_INT >::AutoArray(), AutoArray< CS_INT >::get(), AutoArray< CS_INT >::operator[](), AutoArray< CS_INT >::release(), and AutoArray< CS_INT >::reset(). |
1.4.6
Modified on Mon Dec 07 16:22:19 2009 by modify_doxy.py rev. 173732