C Standard Library Extensions
1.1
Main Page
Modules
Files
File List
cext
cxmultimap.h
1
/* $Id: cxmultimap.h,v 1.6 2011/02/21 14:15:31 rpalsa Exp $
2
*
3
* This file is part of the ESO C Extension Library
4
* Copyright (C) 2001-2011 European Southern Observatory
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
21
/*
22
* $Author: rpalsa $
23
* $Date: 2011/02/21 14:15:31 $
24
* $Revision: 1.6 $
25
* $Name: cpl-6_1_1 $
26
*/
27
28
#ifndef CX_MULTIMAP_H
29
#define CX_MULTIMAP_H
30
31
#include <cxmemory.h>
32
#include <cxtree.h>
33
34
CX_BEGIN_DECLS
35
47
typedef
cx_tree
cx_multimap
;
48
58
typedef
cx_tree_iterator
cx_multimap_iterator
;
59
70
typedef
cx_tree_const_iterator
cx_multimap_const_iterator
;
71
86
typedef
cx_tree_compare_func
cx_multimap_compare_func
;
87
88
/*
89
* Create, copy and destroy operations
90
*/
91
92
93
cx_multimap
*
cx_multimap_new
(
cx_multimap_compare_func
, cx_free_func,
94
cx_free_func);
95
void
cx_multimap_delete
(
cx_multimap
*);
96
97
/*
98
* Nonmodifying operations
99
*/
100
101
cxsize
cx_multimap_size
(
const
cx_multimap
*);
102
cxbool
cx_multimap_empty
(
const
cx_multimap
*);
103
cxsize
cx_multimap_max_size
(
const
cx_multimap
*);
104
cx_multimap_compare_func
cx_multimap_key_comp
(
const
cx_multimap
*);
105
106
/*
107
* Special search operations
108
*/
109
110
cxsize
cx_multimap_count
(
const
cx_multimap
*, cxcptr);
111
cx_multimap_iterator
cx_multimap_find
(
const
cx_multimap
*, cxcptr);
112
cx_multimap_iterator
cx_multimap_lower_bound
(
const
cx_multimap
*, cxcptr);
113
cx_multimap_iterator
cx_multimap_upper_bound
(
const
cx_multimap
*, cxcptr);
114
void
cx_multimap_equal_range
(
const
cx_multimap
*, cxcptr,
115
cx_multimap_iterator
*,
cx_multimap_iterator
*);
116
117
/*
118
* Assignment operations
119
*/
120
121
void
cx_multimap_swap
(
cx_multimap
*,
cx_multimap
*);
122
cxptr
cx_multimap_assign
(
cx_multimap
*,
cx_multimap_iterator
, cxcptr);
123
124
/*
125
* Element access
126
*/
127
128
cxptr
cx_multimap_get_key
(
const
cx_multimap
*,
cx_multimap_const_iterator
);
129
cxptr
cx_multimap_get_value
(
const
cx_multimap
*,
cx_multimap_const_iterator
);
130
131
/*
132
* Iterator functions
133
*/
134
135
cx_multimap_iterator
cx_multimap_begin
(
const
cx_multimap
*);
136
cx_multimap_iterator
cx_multimap_end
(
const
cx_multimap
*);
137
cx_multimap_iterator
cx_multimap_next
(
const
cx_multimap
*,
138
cx_multimap_const_iterator
);
139
cx_multimap_iterator
cx_multimap_previous
(
const
cx_multimap
*,
140
cx_multimap_const_iterator
);
141
142
143
/*
144
* Inserting and removing elements
145
*/
146
147
cx_multimap_iterator
cx_multimap_insert
(
cx_multimap
*, cxcptr, cxcptr);
148
void
cx_multimap_erase_position
(
cx_multimap
*,
cx_multimap_iterator
);
149
void
cx_multimap_erase_range
(
cx_multimap
*,
cx_multimap_iterator
,
150
cx_multimap_iterator
);
151
cxsize
cx_multimap_erase
(
cx_multimap
*, cxcptr);
152
void
cx_multimap_clear
(
cx_multimap
*);
153
154
CX_END_DECLS
155
156
#endif
/* CX_MULTIMAP_H */
Generated on Thu Jun 21 2012 09:30:03 for C Standard Library Extensions by
1.8.1.1