Home Libraries Author Links

MultiNrStmMultiMapDoc.h

Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is the SysToMath C Libraries package (LibStmC).
00015  *
00016  * The Initial Developer of the Original Code is
00017  * Tom Michaelis, SysToMath.
00018  * Portions created by the Initial Developer are Copyright (C) 1990-2006
00019  * the Initial Developer. All Rights Reserved.
00020  *
00021  * Contributor(s):
00022  *
00023  * Alternatively, the contents of this file may be used under the terms of
00024  * either the GNU General Public License Version 2 or later (the "GPL"), or
00025  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00026  * in which case the provisions of the GPL or the LGPL are applicable instead
00027  * of those above. If you wish to allow use of your version of this file only
00028  * under the terms of either the GPL or the LGPL, and not to allow others to
00029  * use your version of this file under the terms of the MPL, indicate your
00030  * decision by deleting the provisions above and replace them with the notice
00031  * and other provisions required by the GPL or the LGPL. If you do not delete
00032  * the provisions above, a recipient may use your version of this file under
00033  * the terms of any one of the MPL, the GPL or the LGPL.
00034  *
00035  * ***** END LICENSE BLOCK ***** */
00036 
00037 /******************************************************************************
00038  *                       First Release 1990-11-08
00039  ******************************************************************************/
00040 
00041 
00077 typedef struct MultiNrStmMultiMapImpl_ *MultiNrStmMultiMap;
00078 
00079 
00088 typedef struct MultiNrStmMultiMapIteratorImpl_ *MultiNrStmMultiMapIterator;
00089 
00090 
00091 #define StmMultiMapDoc_
00092 
00093 #if defined StmSetDoc_ || defined StmMultiSetDoc_
00094 
00095 
00096 #elif defined StmMapDoc_ || defined StmMultiMapDoc_
00097 
00101 typedef struct MultiNr MultiNr;
00102 
00103 
00111 struct MultiNr
00112 {
00116     int key;
00117 
00121     int val;
00122 };
00123 
00124 
00128 typedef struct MultiNrStmMultiMapValueType MultiNrStmMultiMapValueType;
00129 
00130 
00139 struct MultiNrStmMultiMapValueType
00140 {
00146     const int key;
00147 
00151     int val;
00152 };
00153 
00154 #endif
00155 
00156 
00175 stm_static_inline MultiNrStmMultiMap MultiNrStmMultiMapCreate (void);
00176 
00177 
00188 stm_static_inline void MultiNrStmMultiMapDestroy (MultiNrStmMultiMap ac);
00189 
00190 
00216 stm_static_inline MultiNrStmMultiMapIterator MultiNrStmMultiMapBegin
00217 (
00218     MultiNrStmMultiMap ac
00219 );
00220 
00221 
00237 stm_static_inline MultiNrStmMultiMapIterator MultiNrStmMultiMapEnd
00238 (
00239     MultiNrStmMultiMap ac
00240 );
00241 
00242 
00261 stm_static_inline MultiNrStmMultiMapIterator MultiNrStmMultiMapRBegin
00262 (
00263     MultiNrStmMultiMap ac
00264 );
00265 
00266 
00282 stm_static_inline MultiNrStmMultiMapIterator MultiNrStmMultiMapREnd
00283 (
00284     MultiNrStmMultiMap ac
00285 );
00286 
00287 
00308 stm_static_inline MultiNrStmMultiMapIterator MultiNrStmMultiMapIteratorNext
00309 (
00310     MultiNrStmMultiMapIterator iter
00311 );
00312 
00313 
00335 stm_static_inline MultiNrStmMultiMapIterator MultiNrStmMultiMapIteratorPrev
00336 (
00337     MultiNrStmMultiMapIterator iter
00338 );
00339 
00340 
00352 stm_static_inline StmBool MultiNrStmMultiMapIteratorDereferenceable
00353 (
00354     MultiNrStmMultiMapIterator iter
00355 );
00356 
00357 
00372 stm_static_inline StmBool MultiNrStmMultiMapIteratorDereferencable
00373 (
00374     MultiNrStmMultiMapIterator iter
00375 );
00376 
00377 
00378 #if defined StmSetDoc_ || defined StmMultiSetDoc_
00379 
00394 stm_static_inline const MultiNr *MultiNrStmMultiMapIteratorElem
00395 (
00396     MultiNrStmMultiMapIterator iter
00397 );
00398 
00399 
00416 stm_static_inline MultiNr MultiNrStmMultiMapIteratorKey
00417 (
00418     MultiNrStmMultiMapIterator iter
00419 );
00420 
00421 #elif defined StmMapDoc_ || defined StmMultiMapDoc_
00422 
00438 stm_static_inline MultiNrStmMultiMapValueType *MultiNrStmMultiMapIteratorElem
00439 (
00440     MultiNrStmMultiMapIterator iter
00441 );
00442 
00443 
00460 stm_static_inline int MultiNrStmMultiMapIteratorKey
00461 (
00462     MultiNrStmMultiMapIterator iter
00463 );
00464 
00465 
00481 stm_static_inline int *MultiNrStmMultiMapIteratorVal
00482 (
00483     MultiNrStmMultiMapIterator iter
00484 );
00485 
00486 #endif
00487 
00488 
00509 stm_static_inline int MultiNrStmMultiMapSize
00510 (
00511     MultiNrStmMultiMap ac
00512 );
00513 
00514 
00529 stm_static_inline int MultiNrStmMultiMapMaxSize
00530 (
00531     MultiNrStmMultiMap ac
00532 );
00533 
00534 
00550 stm_static_inline StmBool MultiNrStmMultiMapEmpty
00551 (
00552     MultiNrStmMultiMap ac
00553 );
00554 
00555 
00563 #if defined StmSetDoc_ || defined StmMapDoc_
00564 
00592 stm_static_inline MultiNrStmMultiMapIterator MultiNrStmMultiMapInsert
00593 (
00594     MultiNrStmMultiMap ac,
00595     const MultiNr *elem,
00596     StmBool *inserted
00597 );
00598 
00599 #elif defined StmMultiSetDoc_ || defined StmMultiMapDoc_
00600 
00622 stm_static_inline MultiNrStmMultiMapIterator MultiNrStmMultiMapInsert
00623 (
00624     MultiNrStmMultiMap ac,
00625     const MultiNr *elem
00626 );
00627 
00628 #endif
00629 
00653 stm_static_inline int MultiNrStmMultiMapErase
00654 (
00655     MultiNrStmMultiMap ac,
00656     MultiNrStmMultiMapIterator iter
00657 );
00658 
00659 
00684 stm_static_inline int MultiNrStmMultiMapEraseRange
00685 (
00686     MultiNrStmMultiMap ac,
00687     MultiNrStmMultiMapIterator first,
00688     MultiNrStmMultiMapIterator last
00689 );
00690 
00691 
00713 stm_static_inline int MultiNrStmMultiMapEraseElem
00714 (
00715     MultiNrStmMultiMap ac,
00716     const MultiNr *elem
00717 );
00718 
00719 #if defined StmSetDoc_ || defined StmMultiSetDoc_
00720 
00739 stm_static_inline int MultiNrStmMultiMapEraseKey
00740 (
00741     MultiNrStmMultiMap ac,
00742     MultiNr key
00743 );
00744 
00745 #elif defined StmMapDoc_ || defined StmMultiMapDoc_
00746 
00765 stm_static_inline int MultiNrStmMultiMapEraseKey
00766 (
00767     MultiNrStmMultiMap ac,
00768     int key
00769 );
00770 
00771 #endif
00772 
00787 stm_static_inline int MultiNrStmMultiMapClear (MultiNrStmMultiMap ac);
00788 
00789 
00828 stm_static_inline MultiNrStmMultiMapIterator MultiNrStmMultiMapFind
00829 (
00830     MultiNrStmMultiMap ac,
00831     const MultiNr *elem
00832 );
00833 
00834 
00835 #if defined StmSetDoc_ || defined StmMultiSetDoc_
00836 
00864 stm_static_inline MultiNrStmMultiMapIterator MultiNrStmMultiMapFindKey
00865 (
00866     MultiNrStmMultiMap ac,
00867     MultiNr key
00868 );
00869 
00870 #elif defined StmMapDoc_ || defined StmMultiMapDoc_
00871 
00900 stm_static_inline MultiNrStmMultiMapIterator MultiNrStmMultiMapFindKey
00901 (
00902     MultiNrStmMultiMap ac,
00903     int key
00904 );
00905 
00906 #endif
00907 
00908 
00940 stm_static_inline int MultiNrStmMultiMapCount
00941 (
00942     MultiNrStmMultiMap ac,
00943     const MultiNr *elem,
00944     MultiNrStmMultiMapIterator *first,
00945     MultiNrStmMultiMapIterator *last
00946 );
00947 
00948 
00949 #if defined StmSetDoc_ || defined StmMultiSetDoc_
00950 
00977 stm_static_inline int MultiNrStmMultiMapCountKey
00978 (
00979     MultiNrStmMultiMap ac,
00980     MultiNr key,
00981     MultiNrStmMultiMapIterator *first,
00982     MultiNrStmMultiMapIterator *last
00983 );
00984 
00985 #elif defined StmMapDoc_ || defined StmMultiMapDoc_
00986 
01014 stm_static_inline int MultiNrStmMultiMapCountKey
01015 (
01016     MultiNrStmMultiMap ac,
01017     int key,
01018     MultiNrStmMultiMapIterator *first,
01019     MultiNrStmMultiMapIterator *last
01020 );
01021 
01022 #endif
01023 
01024 
01041 #if defined StmSetDoc_ || defined StmMultiSetDoc_
01042 
01050 stm_static_inline MultiNr MultiNrStmMultiMapKeyAccess_
01051 (
01052     const MultiNr *ref
01053 );
01054 
01055 
01063 stm_static_inline const MultiNr *MultiNrStmMultiMapValAccess_
01064 (
01065     const MultiNr *ref
01066 );
01067 
01068 
01069 #elif defined StmMapDoc_ || defined StmMultiMapDoc_
01070 
01071 
01085 stm_static_inline int MultiNrStmMultiMapElemCmp_
01086 (
01087     const MultiNr *p1,
01088     const MultiNr *p2
01089 );
01090 
01091 
01099 stm_static_inline int MultiNrStmMultiMapKeyAccess_
01100 (
01101     MultiNrStmMultiMapValueType *ref
01102 );
01103 
01104 
01112 stm_static_inline int *MultiNrStmMultiMapValAccess_
01113 (
01114     MultiNrStmMultiMapValueType *ref
01115 );
01116 
01117 
01118 #endif
01119 
01120 
01123 struct MultiNrStmMultiMapImpl_
01124 {
01125     StmDset_ dset;  
01126 };
01127 
01128 
01137 stm_static_inline StmDset_ *MultiNrStmMultiMapStmDset_ (MultiNrStmMultiMap ac);
01138 
01139 
01149 stm_static_inline MultiNrStmMultiMap MultiNrStmMultiMapMake_ (StmDset_ *dset);
01150 
01151 
01154 struct MultiNrStmMultiMapIteratorImpl_
01155 {
01156     StmDsetNode_ node;   
01157 };
01158 
01159 
01168 stm_static_inline StmDsetNode_ *MultiNrStmMultiMapStmDsetNode_
01169 (
01170     MultiNrStmMultiMapIterator iter
01171 );
01172 
01173 
01182 stm_static_inline StmDsetNode_ **MultiNrStmMultiMapAddrStmDsetNode_
01183 (
01184     MultiNrStmMultiMapIterator *iteraddr
01185 );
01186 
01187 
01197 stm_static_inline MultiNrStmMultiMapIterator MultiNrStmMultiMapIteratorMake_
01198 (
01199     StmDsetNode_ *node
01200 );
01201 
01202 
01219 stm_static_inline int MultiNrStmMultiMapCmp_
01220 (
01221     const void *p1,
01222     const void *p2
01223 );
01224 
01225 
01232 #undef StmMultiMapDoc_
01233 
01234 

© Copyright Tom Michaelis 2002-2007

Distributed under the SysToMath Software License (See the accompanying file license.txt or a copy at www.SysToMath.com).