home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 January
/
Chip_1997-01_cd.bin
/
ms95
/
disk22
/
dir04
/
f012260.re_
/
f012260.re
Wrap
Text File
|
1996-04-02
|
9KB
|
253 lines
/*----------------------------------------------------------------------+
| |
| Copyright (c) 1985-93; Bentley Systems, Inc., All rights reserved. |
| |
| "MicroStation", "MDL", and "MicroCSL" are trademarks of Bentley |
| Systems, Inc. |
| |
| Limited permission is hereby granted to reproduce and modify this |
| copyrighted material provided that the resulting code is used only |
| in conjunction with Bentley Systems products under the terms of the |
| license agreement provided therein, and that this notice is retained |
| in its entirety in any such reproduction or modification. |
| |
+----------------------------------------------------------------------*/
/*----------------------------------------------------------------------+
| |
| $Workfile: msstrngl.fdf $
| $Revision: 6.1 $
| $Date: 12 Sep 1995 13:00:14 $
| |
+----------------------------------------------------------------------*/
#if !defined (__msstrnglFDF__)
#define __msstrnglFDF__
/*----------------------------------------------------------------------+
| |
| Header File Dependencies |
| |
+----------------------------------------------------------------------*/
#if !defined (__dloadlibH__)
#include "dloadlib.h"
#endif
#if !defined (__mdlH__)
#include "mdl.h"
#endif
#if !defined (__dlogitemH__)
#include "dlogitem.h"
#endif
#ifndef __rscdefsH__
#include "rscdefs.h"
#endif
#if defined (__BSI__) && !defined (__mdlmkn__)
#include <mistrngl.fdf>
#endif
/*======================================================================+
| |
| Function Definitions |
| |
+======================================================================*/
int mdlStringList_addResource
( /* <= SUCCESS or Error Code */
RscFileHandle rfHandle, /* => resource file handle */
ULong resourceID, /* => id to save as */
StringList *stringListP /* => list to be saved */
);
int mdlStringList_binarySearch
( /* <= SUCCESS or error code */
int *indexP, /* <= return loc of elm or where to add it */
StringList *stringListP, /* => list to search */
char *stringP, /* => string to search for or NULL */
long *infoFieldsP, /* => info fields to use in search or NULL */
MdlFunctionP bSearchFunc /* => NULL means use strcmp on member strings */
);
int mdlStringList_binarySearchByColumn
( /* <= SUCCESS or error code */
int *indexP, /* <= return loc of elm or where to add it */
StringList *stringListP, /* => list to search */
char *stringP, /* => string to search for or NULL */
long *infoFieldsP, /* => info fields to use in search or NULL */
MdlFunctionP bSearchFunc, /* => NULL means use strcmp on member strings */
int numColumns, /* => number of columns in list */
int columnIndex /* => column to sort on */
);
int mdlStringList_copy
( /* <= SUCCESS or error code */
StringList *toStringListP, /* => new copied list */
StringList *fromStringListP /* => list to copy */
);
StringList *mdlStringList_create
( /* <= string list ptr or NULL if error */
int initialSize, /* => requested number of strs */
int nInfoFields /* => number of longs attached to string */
);
int mdlStringList_deleteMember
( /* <= SUCCESS or error code */
StringList *stringListP, /* => list to work on */
int memberIndex, /* => index number of member to remove */
int numToDelete /* => # of members to delete,invalid->to end*/
);
int mdlStringList_destroy
( /* <= SUCCESS or error code */
StringList *stringListP /* => list to delete */
);
int mdlStringList_getInfoField
( /* <= SUCCESS or error code */
long *infoField, /* <= info field data */
StringList *stringListP, /* => list to work on */
int memberIndex, /* => index number of member requested */
int infoFieldIndex /* => info field to get */
);
int mdlStringList_getMember
( /* <= SUCCESS or error code */
char **stringP, /* <= string of member, NULL if none */
long **infoFieldsP, /* <= info fields data, NULL if none */
StringList *stringListP, /* => list to work on */
int memberIndex /* => index number of member requested */
);
int mdlStringList_insertMember
( /* <= SUCCESS or error code */
int *indexP, /* <= member added here, or -1 */
StringList *stringListP, /* => list to work on */
int memberIndex, /* => add member at index, -1-end of list */
int numToInsert /* => number of members to insert */
);
StringList *mdlStringList_loadResource
( /* <= string list ptr of NULL */
RscFileHandle rfHandle, /* => resource file handle */
ULong resourceID /* => id to save as */
);
int mdlStringList_moveMembers
( /* <= SUCCESS or error code */
StringList *stringListP, /* => list to work on */
int toIndex, /* => move to here */
int fromIndex, /* => from here */
int numToMove /* => number of elements to move */
);
int mdlStringList_search
( /* <= SUCCESS or error code */
int *indexP, /* <= return loc of elm or where to add it */
StringList *stringListP, /* => list to search */
char *stringP, /* => string to search for or NULL */
long *infoFieldsP, /* => info fields to use in search or NULL */
int startIndex, /* => where to start search */
MdlFunctionP searchFunc /* => NULL means use strcmp on member strings */
);
int mdlStringList_searchByColumn
( /* <= SUCCESS or error code */
int *indexP, /* <= return loc of elm or where to add it */
StringList *stringListP, /* => list to search */
char *stringP, /* => string to search for or NULL */
long *infoFieldsP, /* => info fields to use in search or NULL */
int startIndex, /* => where to start search */
MdlFunctionP searchFunc, /* => NULL means use strcmp on member strings */
int numColumns, /* => number of columns in list */
int columnIndex /* => column to sort on */
);
int mdlStringList_setInfoField
( /* <= SUCCESS or error code */
StringList *stringListP, /* => list to work on */
int memberIndex, /* => index number of member requested */
int infoFieldIndex, /* => info field to set */
long infoField /* => info field data */
);
int mdlStringList_setMember
( /* <= SUCCESS or error code */
StringList *stringListP, /* => list to work on */
int memberIndex, /* => add member at index */
char *stringP, /* => name of member to add, NULL if none */
long *infoFieldsP /* => auxilliary data, NULL if none */
);
int mdlStringList_size
( /* <= num string in list, -1 if error */
StringList *stringListP /* => list to work on */
);
int mdlStringList_sort
( /* <= SUCCESS or error code */
StringList *stringListP, /* => list to sort */
int numToSort, /* => number of members to sort, invalid->ALL */
boolean ascending, /* => FALSE means descending */
MdlFunctionP sortFunc /* => NULL means use strcmp on member strings */
);
int mdlStringList_sortByColumn
( /* <= SUCCESS or error code */
StringList *stringListP, /* => list to sort */
int numToSort, /* => number of members to sort, invalid->ALL */
boolean ascending, /* => FALSE means descending */
MdlFunctionP sortFunc, /* => NULL means use strcmp on member strings */
int numColumns, /* => number of columns in list */
int columnIndex /* => column to sort on */
);
int mdlStringList_sortByIndex
( /* <= SUCCESS or error code */
StringList *stringListP, /* => list to sort */
int numToSort, /* => number of rows to sort, invalid->ALL */
boolean ascending, /* => FALSE means descending */
MdlFunctionP sortFunc, /* => NULL means use strcmp on member strings */
int numColumns, /* => number of columns in list */
int startIndex /* => 0-based row number */
);
int mdlStringList_writeResource
( /* <= SUCCESS or error code */
StringList *stringListP, /* => list to be saved */
RscFileHandle rfHandle, /* => resource file handle */
ULong resourceID /* => id to save as */
);
int mdlStringList_addResourceWithType
( /* <= SUCCESS or Error Code */
RscFileHandle rfHandle, /* => resource file handle */
ULong typeId, /* => typeId of stringlist */
ULong resourceID, /* => id to save as */
StringList *stringListP /* => list to be saved */
);
int mdlStringList_writeResourceWithType
( /* <= SUCCESS or error code */
StringList *stringListP, /* => list to be saved */
RscFileHandle rfHandle, /* => resource file handle */
ULong typeId, /* => typeId of stringlist */
ULong resourceID /* => id to save as */
);
StringList *mdlStringList_loadResourceWithType
( /* <= string list ptr of NULL */
RscFileHandle rfHandle, /* => resource file handle */
ULong typeId, /* => typeId of stringlist */
ULong resourceID /* => id to save as */
);
#endif