시퀀스컨테이너-디큐,데크(Deque)
- 프로그래밍/STL
- 2011. 4. 26. 12:39
이 글을 보기 전에 이전의 글을 보시면 좋습니다^^.
[프로그래밍/STL] - 일반화 프로그래밍, STL기초
[프로그래밍/STL] - 컨테이너 (시퀀스,연관,어댑터)
Iterators :
Capacity :
Element access :
Modifiers :
Allocator :
[프로그래밍/STL] - 일반화 프로그래밍, STL기초
[프로그래밍/STL] - 컨테이너 (시퀀스,연관,어댑터)
Deque
0. #inlcude <deque> 추가해야함.
1. std 네임스페이스 안에 있음
2. 동적배열이다(vector와 유사하다)
3. 시퀀스 컨테이너
4. 랜덤 액세스 반복자 제공
5. 양방향 개방형( 앞,끝쪽 삽입*삭제 가능 )( vector와의 차이점 )
6. deque는 내부적으로 분리된 메모리 블록의 집합으로 구현되있다.
7. 반복자는 일반포인터가 아닌 스마트포인터이다.( vector와의 차이점 )
8. deque는 용량에 관함 함수들을 제공하지 않는다.( capacity(), reserve() 제공 안함 )
Member functions
(constructor) | Construct deque container (public member function) |
(destructor) | Deque destructor (public member function) |
operator= | Copy container content (public member function) |
Iterators :
begin | Return iterator to beginning (public member function) |
end | Return iterator to end (public member function) |
rbegin | Return reverse iterator to reverse beginning (public member function) |
rend | Return reverse iterator to reverse end (public member function) |
Capacity :
size | Return size (public member function) |
max_size | Return maximum size (public member function) |
resize | Change size (public member functions) |
empty | Test whether container is empty (public member function) |
Element access :
operator[] | Access element (public member function) |
at | Access element (public member function) |
front | Access first element (public member function) |
back | Access last element (public member function) |
Modifiers :
assign | Assign container content (public member function) |
push_back | Add element at the end (public member function) |
push_front | Insert element at beginning (public member function) |
pop_back | Delete last element (public member function) |
pop_front | Delete first element (public member function) |
insert | Insert elements (public member function) |
erase | Erase elements (public member function) |
swap | Swap content (public member function) |
clear | Clear content (public member function) |
Allocator :
get_allocator | Get allocator (public member function) |
Member types
of template <class T, class Allocator=allocator<T> > class deque;member type | definition |
---|---|
reference | Allocator::reference |
const_reference | Allocator::const_reference |
iterator | Random access iterator |
const_iterator | Constant random access iterator |
size_type | Unsigned integral type (usually same as size_t ) |
difference_type | Signed integral type (usually same as ptrdiff_t ) |
value_type | T |
allocator_type | Allocator |
pointer | Allocator::pointer |
const_pointer | Allocator::const_pointer |
reverse_iterator | reverse_iterator<iterator> |
const_reverse_iterator | reverse_iterator<const_iterator> |
생성자:
template < class T, class Allocator = allocator<T> > class deque;
이 글을 공유하기