View Source

[modwtcl]
apreq.h
dist/
libapreq1/
mod_wtcl.c
mod_wtcl.h
setupExclude.txt
util/
win.def
win.mak
wt1.1/
WtAppTable.c
WtAppTable.h
WtBasicCmds.c
WtBasicCmds.h
WtClientRequest.c
WtClientRequest.h
WtCollection.c
WtCollection.h
WtCollectionCmds.c
WtCollectionCmds.h
WtContext.c
WtContext.h
WtContextEvents.c
WtContextEvents.h
WtCookie.c
WtCookie.h
WtDbSession.c
WtDbSession.h
WtExecute.c
WtExecute.h
WtHtmlEntities.c
WtHtmlEntities.h
WtInitCmds.c
WtInitCmds.h
WtMtTable.c
WtMtTable.h
WtMultiTable.c
WtMultiTable.h
WtOS.h
WtProcSession.c
WtProcSession.h
WtResponse.c
WtResponse.h
WtServerCmds.c
WtServerCmds.h
WtSession.c
WtSession.h
WtSettings.c
WtSettings.h
WtTable.c
WtTable.h
WtTableCmds.c
WtTableCmds.h
WtTableUtil.c
WtTableUtil.h
WtUpload.c
WtUpload.h
WtUtil.c
WtUtil.h
WtWebErrors.c
WtWebErrors.h
WtWindows.h
File: / archive / modwtcl / WtCollection.h

Lines Size Modified Created Owner MIME Types
101 3,752 2010/05/08 18:46:41 2011/06/13 15:35:15 BUILTIN\Administrators text/x-chdr

0001
/*
0002
 * Copyright 2001 Alexander Boverman and the original authors.
0003
 * 
0004
 * Licensed under the Apache License, Version 2.0 (the "License");
0005
 * you may not use this file except in compliance with the License.
0006
 * You may obtain a copy of the License at
0007
 * 
0008
 *      http://www.apache.org/licenses/LICENSE-2.0
0009
 * 
0010
 * Unless required by applicable law or agreed to in writing, software
0011
 * distributed under the License is distributed on an "AS IS" BASIS,
0012
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013
 * See the License for the specific language governing permissions and
0014
 * limitations under the License.
0015
 */
0016
0017
#ifndef _WT_COLLECTION_H
0018
#define _WT_COLLECTION_H
0019
0020
#include <tcl.h>
0021
0022
/* Collection item type */
0023
0024
typedef int (WtClnCompareProc) (Tcl_Obj *, Tcl_Obj *,
0025
  int *, Tcl_Interp *);
0026
typedef int (WtClnGetKeyProc) (Tcl_Obj *, Tcl_Obj **,
0027
  Tcl_Interp *);
0028
typedef int (WtClnGetValueProc) (Tcl_Obj *, Tcl_Obj **,
0029
  Tcl_Interp *);
0030
0031
typedef struct WtClnItemTypeT {
0032
  WtClnCompareProc *compare;
0033
  WtClnGetKeyProc *getKey;
0034
  WtClnGetValueProc *getValue;
0035
} WtClnItemType;
0036
0037
/* WtCollection object. Internal only.
0038
   Do not expose to scripts. */
0039
0040
typedef struct WtCollectionT {
0041
  WtClnItemType *itemType;
0042
  Tcl_Obj *list;
0043
} WtCollection;
0044
0045
WtCollection *WtToCln(Tcl_Obj *obj);
0046
Tcl_Obj *WtNewClnObj(Tcl_ObjType *type, WtClnItemType *itemType);
0047
int WtClnSize(Tcl_Obj *cln, int *size, Tcl_Interp *interp);
0048
Tcl_Obj *WtGetClnItems(Tcl_Obj *cln);
0049
int WtGetClnKeys(Tcl_Obj *cln, Tcl_Obj **keys, Tcl_Interp *interp);
0050
int WtGetClnValues(Tcl_Obj *cln, Tcl_Obj **values, 
0051
  Tcl_Interp *interp);
0052
int WtGetClnItemAtIndex(Tcl_Obj *cln, int idx, Tcl_Obj **item,
0053
  Tcl_Interp *interp);
0054
int WtSetClnItemAtIndex(Tcl_Obj *cln, int idx, Tcl_Obj *obj,
0055
  Tcl_Interp *interp);
0056
int WtAppendClnItem(Tcl_Obj *cln, Tcl_Obj *obj, Tcl_Interp *interp);
0057
int WtAppendClnItemList(Tcl_Obj *cln, Tcl_Obj *list,
0058
  Tcl_Interp *interp);
0059
int WtFindClnItemIndex(Tcl_Obj *cln, Tcl_Obj *key, int start,
0060
  int *index, Tcl_Obj **item, Tcl_Interp *interp);
0061
int WtFindClnItemIndexReverse(Tcl_Obj *cln, Tcl_Obj *key, int start,
0062
  int *index, Tcl_Obj **item, Tcl_Interp *interp);
0063
int WtFindClnItem(Tcl_Obj *cln, Tcl_Obj *key, Tcl_Obj **item,
0064
  Tcl_Interp *interp);
0065
int WtFindAllClnItems(Tcl_Obj *cln, Tcl_Obj *key,
0066
  Tcl_Obj **items, Tcl_Interp *interp);
0067
int WtFindAllClnKeys(Tcl_Obj *cln, Tcl_Obj *key, Tcl_Obj **keys,
0068
  Tcl_Interp *interp);
0069
int WtFindAllClnValues(Tcl_Obj *cln, Tcl_Obj *key,
0070
  Tcl_Obj **values, Tcl_Interp *interp);
0071
int WtRemoveFromCln(Tcl_Obj *cln, Tcl_Obj *target, int limit,
0072
  Tcl_Interp *interp);
0073
int RemoveFromClnByIndex(Tcl_Obj *cln, int idx, Tcl_Interp *interp);
0074
int WtRemoveFromClnByKey(Tcl_Obj *cln, Tcl_Obj *key, int limit,
0075
  Tcl_Interp *interp);
0076
int WtRemoveFromClnByKeyList(Tcl_Obj *cln, Tcl_Obj *list,
0077
  int limit, Tcl_Interp *interp);
0078
void WtClearCollection(Tcl_Obj *cln);
0079
int WtClnToArray(Tcl_Interp *interp, Tcl_Obj *cln,
0080
  Tcl_Obj *arrName, int multiVals);
0081
int WtConvertToClnObj(Tcl_Obj *obj, Tcl_ObjType *type,
0082
  Tcl_Interp *interp);
0083
void WtClnFree(Tcl_Obj *cln);
0084
void WtClnDup(Tcl_Obj *src, Tcl_Obj *dest);
0085
void WtClnUpdateString(Tcl_Obj *cln);
0086
int WtClnSetFromAny(Tcl_Interp *interp, Tcl_Obj *obj);
0087
void WtClnObjFree(Tcl_Obj *cln);
0088
void WtClnObjDup(Tcl_Obj *src, Tcl_Obj *dest);
0089
void WtClnObjUpdateString(Tcl_Obj *cln);
0090
int WtClnObjSetFromAny(Tcl_Interp *interp, Tcl_Obj *obj,
0091
  Tcl_ObjType *type);
0092
int WtCompareClnItem(Tcl_Obj *cln, Tcl_Obj *item, Tcl_Obj *key,
0093
  int *result, Tcl_Interp *interp);
0094
int WtGetClnItemKey(Tcl_Obj *cln, Tcl_Obj *item,
0095
  Tcl_Obj **key, Tcl_Interp *interp);
0096
int WtGetClnItemValue(Tcl_Obj *cln, Tcl_Obj *item,
0097
  Tcl_Obj **value, Tcl_Interp *interp);
0098
0099
extern struct Tcl_ObjType WtClnType;
0100
0101
#endif /* !_WT_COLLECTION_H */