/home/doxygen/libascend/compiler/case.h

Go to the documentation of this file.
00001 /*
00002  *  Case Processing functions
00003  *  Version: $Revision: 1.6 $
00004  *  Version control file: $RCSfile: case.h,v $
00005  *  Date last modified: $Date: 1997/07/18 12:28:12 $
00006  *  Last modified by: $Author: mthomas $
00007  *
00008  *  This file is part of the Ascend Language Interpreter.
00009  *
00010  *  Copyright (C) 1997 Carnegie Mellon University
00011  *
00012  *  The Ascend Language Interpreter is free software; you can redistribute
00013  *  it and/or modify it under the terms of the GNU General Public License as
00014  *  published by the Free Software Foundation; either version 2 of the
00015  *  License, or (at your option) any later version.
00016  *
00017  *  The Ascend Language Interpreter is distributed in hope that it will be
00018  *  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020  *  General Public License for more details.
00021  *
00022  *  You should have received a copy of the GNU General Public License along
00023  *  with the program; if not, write to the Free Software Foundation, Inc., 675
00024  *  Mass Ave, Cambridge, MA 02139 USA.  Check the file named COPYING.
00025  */
00026 
00038 #ifndef ASC_CASE_H
00039 #define ASC_CASE_H
00040 
00046 struct Case {
00047     struct Set *ValueList;  
00049     struct gl_list_t *ref;  
00051     unsigned active;        
00052 };
00053 
00054 extern struct Case *CreateCase(struct Set *v1, struct gl_list_t *refinst);
00062 #ifdef NDEBUG
00063 #define GetCaseValues(c) ((c)->ValueList)
00064 #else
00065 #define GetCaseValues(c) GetCaseValuesF(c)
00066 #endif
00067 
00068 extern struct Set *GetCaseValuesF(struct Case *cs);
00075 #ifdef NDEBUG
00076 #define GetCaseReferences(c) ((c)->ref)
00077 #else
00078 #define GetCaseReferences(c) GetCaseReferencesF(c)
00079 #endif
00080 
00081 extern struct gl_list_t *GetCaseReferencesF(struct Case *cs);
00088 #ifdef NDEBUG
00089 #define GetCaseStatus(c) ((c)->active)
00090 #else
00091 #define GetCaseStatus(c) GetCaseStatusF(c)
00092 #endif
00093 
00094 extern int GetCaseStatusF(struct Case *cs);
00101 extern struct Case *SetCaseValues(struct Case *cs, struct Set *set);
00109 extern struct Case *SetCaseReferences(struct Case *cs, struct gl_list_t *refinst);
00117 extern struct Case *SetCaseStatus(struct Case *cs, int status);
00125 extern unsigned long NumberCaseRefs(struct Case *cs);
00133 extern struct Instance *CaseRef(struct Case *cs, unsigned long casenum);
00141 extern void DestroyCase(struct Case *cs);
00148 extern struct Case *CopyCase(struct Case *cs);
00155 /* @} */
00156 
00157 #endif  /* ASC_CASE_H */
00158 

Generated on Thu Jul 17 04:00:09 2008 for libascend by  doxygen 1.5.1