/[ascend]/trunk/base/generic/compiler/qlfdid.h
ViewVC logotype

Diff of /trunk/base/generic/compiler/qlfdid.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 707 by johnpye, Fri Apr 21 07:22:20 2006 UTC revision 708 by johnpye, Tue Jun 27 07:34:31 2006 UTC
# Line 1  Line 1 
1  /*  /*  ASCEND modelling environment
2   *  Qlfdid.h      Copyright (C) 1997, 2006 Carnegie Mellon University
  *  by Kirk Abbott and Ben Allan  
  *  Created: 1/94  
  *  Version: $Revision: 1.9 $  
  *  Version control file: $RCSfile: Qlfdid.h,v $  
  *  Date last modified: $Date: 2003/08/23 18:43:07 $  
  *  Last modified by: $Author: ballan $  
  *  
  *  This file is part of the ASCEND Tcl/Tk interface  
  *  
  *  Copyright 1997, Carnegie Mellon University  
  *  
  *  The ASCEND Tcl/Tk interface is free software; you can redistribute  
  *  it and/or modify it under the terms of the GNU General Public License as  
  *  published by the Free Software Foundation; either version 2 of the  
  *  License, or (at your option) any later version.  
  *  
  *  The ASCEND Tcl/Tk interface is distributed in hope that it will be  
  *  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of  
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  
  *  General Public License for more details.  
  *  
  *  You should have received a copy of the GNU General Public License  
  *  along with the program; if not, write to the Free Software Foundation,  
  *  Inc., 675 Mass Ave, Cambridge, MA 02139 USA.  Check the file named  
  *  COPYING.  COPYING is found in ../compiler.  
  */  
3    
4  /** @file      This program is free software; you can redistribute it and/or modify
5   *  Interface Qualified Id Routines.      it under the terms of the GNU General Public License as published by
6   */      the Free Software Foundation; either version 2, or (at your option)
7        any later version.
8    
9        This program is distributed in the hope that it will be useful,
10        but WITHOUT ANY WARRANTY; without even the implied warranty of
11        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12        GNU General Public License for more details.
13    
14        You should have received a copy of the GNU General Public License
15        along with this program; if not, write to the Free Software
16        Foundation, Inc., 59 Temple Place - Suite 330,
17        Boston, MA 02111-1307, USA.
18    *//** @file
19        Interface Qualified Id Routines.
20    *//*
21        by Kirk Abbott and Ben Allan
22        Created: 1/94
23        Last in CVS: $Revision: 1.9 $ $Date: 2003/08/23 18:43:07 $ $Author: ballan $
24    */
25    
26  #ifndef ASC_QLFDID_H  #ifndef ASC_QLFDID_H
27  #define ASC_QLFDID_H  #define ASC_QLFDID_H
# Line 57  ASC_DLLSPEC(struct Instance *) g_relativ Line 49  ASC_DLLSPEC(struct Instance *) g_relativ
49    
50  ASC_DLLSPEC(char *) Asc_MakeInitString(int len);  ASC_DLLSPEC(char *) Asc_MakeInitString(int len);
51  /**<  /**<
  *  <!--  Asc_MakeInitString(int len);                                 -->  
52   *  Will make a string of the specified length of a predefine default   *  Will make a string of the specified length of a predefine default
53   *  length if garbage is given. Will initialize the string to the mt string.   *  length if garbage is given. Will initialize the string to the mt string.
54   *  Will return a pointer to the string;   *  Will return a pointer to the string;
# Line 65  ASC_DLLSPEC(char *) Asc_MakeInitString(i Line 56  ASC_DLLSPEC(char *) Asc_MakeInitString(i
56    
57  ASC_DLLSPEC(void ) Asc_ReInitString(char *str);  ASC_DLLSPEC(void ) Asc_ReInitString(char *str);
58  /**<  /**<
  *  <!--  Asc_ReInitString;                                            -->  
  *  <!--  char *str;                                                   -->  
59   *  We will reinitialize a string of non-zero length to the mt string.   *  We will reinitialize a string of non-zero length to the mt string.
60   *  If an ivalid string will leave it untouched.   *  If an ivalid string will leave it untouched.
61   */   */
# Line 74  ASC_DLLSPEC(void ) Asc_ReInitString(char Line 63  ASC_DLLSPEC(void ) Asc_ReInitString(char
63  extern struct SearchEntry *Asc_SearchEntryCreate(char *name,  extern struct SearchEntry *Asc_SearchEntryCreate(char *name,
64                                                   struct Instance *i);                                                   struct Instance *i);
65  /**<  /**<
  *  <!--  Asc_SearchEntryCreate(name,i);                               -->  
  *  <!--  char *name;                                                  -->  
  *  <!--  struct Instance *i;                                          -->  
66   *  Accepts a string and a pointer to an Instance and will create a   *  Accepts a string and a pointer to an Instance and will create a
67   *  and return a SearchEntry. Will save a copy of the string. Will always   *  and return a SearchEntry. Will save a copy of the string. Will always
68   *  try to make space for the string.   *  try to make space for the string.
# Line 84  extern struct SearchEntry *Asc_SearchEnt Line 70  extern struct SearchEntry *Asc_SearchEnt
70    
71  ASC_DLLSPEC(struct Instance *) Asc_SearchEntryInstance(struct SearchEntry *se);  ASC_DLLSPEC(struct Instance *) Asc_SearchEntryInstance(struct SearchEntry *se);
72  /**<  /**<
  *  <!--  Asc_SearchEntryInstance(se);                                 -->  
  *  <!--  struct SearchEntry *se;                                      -->  
73   *  Returns a the instance pointer from a search entry;   *  Returns a the instance pointer from a search entry;
74   */   */
75    
76  ASC_DLLSPEC(char *) Asc_SearchEntryName(struct SearchEntry *se);  ASC_DLLSPEC(char *) Asc_SearchEntryName(struct SearchEntry *se);
77  /**<  /**<
  *  <!--  Asc_SearchEntryName(se)                                      -->  
  *  <!--  struct SearchEntry *se;                                      -->  
78   *  Returns the name of a search entry;   *  Returns the name of a search entry;
79   */   */
80    
81  extern void Asc_SearchEntryDestroy(struct SearchEntry *se);  extern void Asc_SearchEntryDestroy(struct SearchEntry *se);
82  /**<  /**<
  *  <!--  Asc_SearchEntryDestroy(se);                                  -->  
  *  <!--  struct SearchEntry *se;                                      -->  
83   *  Will delete the memory associated with its string, set its pointers   *  Will delete the memory associated with its string, set its pointers
84   *  to NULL, and free the memory associated with a SearchEntry.   *  to NULL, and free the memory associated with a SearchEntry.
85   */   */
86    
87  ASC_DLLSPEC(void ) Asc_SearchListDestroy(struct gl_list_t *search_list);  ASC_DLLSPEC(void ) Asc_SearchListDestroy(struct gl_list_t *search_list);
88  /**<  /**<
  *  <!--  Asc_SearchListDestroy(search_list);                          -->  
  *  <!--  struct gl_list_t *search_list;                               -->  
89   *  Frees up the memory that was allocated for the search_list which is   *  Frees up the memory that was allocated for the search_list which is
90   *  a list of SearchEntry(s).   *  a list of SearchEntry(s).
91   */   */
92    
93  ASC_DLLSPEC(struct gl_list_t *) Asc_BrowQlfdidSearch(char *str, char *temp);  ASC_DLLSPEC(struct gl_list_t *) Asc_BrowQlfdidSearch(char *str, char *temp);
94  /**<  /**<
  *  <!--  Asc_BrowQlfdidSearch(str,temp)                               -->  
  *  <!--  char *str, char *temp;                                       -->  
95   *  Will accept two strings, both of which will be destroyed by the   *  Will accept two strings, both of which will be destroyed by the
96   *  operation. Searches for an instance of the qualified name. Will   *  operation. Searches for an instance of the qualified name. Will
97   *  return of a list (of SearchEntries), with each list element being   *  return of a list (of SearchEntries), with each list element being
# Line 127  ASC_DLLSPEC(struct gl_list_t *) Asc_Brow Line 103  ASC_DLLSPEC(struct gl_list_t *) Asc_Brow
103    
104  ASC_DLLSPEC(int ) Asc_QlfdidSearch2(char *str);  ASC_DLLSPEC(int ) Asc_QlfdidSearch2(char *str);
105  /**<  /**<
  *  <!--  Asc_QlfdidSearch2(str);                                      -->  
  *  <!--  char *str;                                                   -->  
106   *  This function is perhaps the entry point suited for most users.   *  This function is perhaps the entry point suited for most users.
107   *  It uses the function Asc_BrowQlfdidSearch(), and will leave the g_search_inst   *  It uses the function Asc_BrowQlfdidSearch(), and will leave the g_search_inst
108   *  looking at the found instance, or NULL. It attempts to avoid the   *  looking at the found instance, or NULL. It attempts to avoid the
# Line 142  ASC_DLLSPEC(int ) Asc_QlfdidSearch2(char Line 116  ASC_DLLSPEC(int ) Asc_QlfdidSearch2(char
116    
117  ASC_DLLSPEC(int ) Asc_QlfdidSearch3(CONST char *str, int relative);  ASC_DLLSPEC(int ) Asc_QlfdidSearch3(CONST char *str, int relative);
118  /**<  /**<
  *  <!--  Asc_QlfdidSearch3(str,relative);                             -->  
  *  <!--  const char *str;                                             -->  
  *  <!--  int relative;                                                -->  
119   *  This function is still yet another entry point to the search routines.   *  This function is still yet another entry point to the search routines.
120   *  It uses the function BrowQlfdidSearch3, and will leave the g_search_inst   *  It uses the function BrowQlfdidSearch3, and will leave the g_search_inst
121   *  looking at the found instance, or NULL. It attempts to avoid the   *  looking at the found instance, or NULL. It attempts to avoid the
122   *  overhead of creating search entries, for cases where the user only   *  overhead of creating search entries, for cases where the user only
123   *  wants to find the instance associated with the given qualfied id.   *  wants to find the instance associated with the given qualfied id.
124   *  Returns 0 if found, 1 otherwise. This is perhaps the fastest   *  Returns 0 if found, 1 otherwise. This is perhaps the fastest
125   *  version of the search codes.<br><br>   *  version of the search codes.
126  / *   *
127   *  If relative = 1 will start search at g_relative_inst whose value   *  If relative = 1 will start search at g_relative_inst whose value
128   *  should be set by a call to qlfdid (tcl) or Asc_BrowQlfdidSearchCmd (c).   *  should be set by a call to qlfdid (tcl) or Asc_BrowQlfdidSearchCmd (c).
129   *  Note that if the relative option is used str should be relative to   *  Note that if the relative option is used str should be relative to

Legend:
Removed from v.707  
changed lines
  Added in v.708

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22