File indexing completed on 2025-07-13 04:09:53
0001 /*************************************************************************** 0002 enodefactory.h 0003 ---------- 0004 begin : Feb 12 2004 0005 copyright : (C) 2004 The University of Toronto 0006 email : netterfield@astro.utoronto.ca 0007 ***************************************************************************/ 0008 0009 /*************************************************************************** 0010 * * 0011 * This program is free software; you can redistribute it and/or modify * 0012 * it under the terms of the GNU General Public License as published by * 0013 * the Free Software Foundation; either version 2 of the License, or * 0014 * (at your option) any later version. * 0015 * * 0016 ***************************************************************************/ 0017 0018 #ifndef ENODEFACTORY_H 0019 #define ENODEFACTORY_H 0020 0021 #define CreateNodeBinary(x) void *New##x(void *left, void *right); 0022 0023 #ifdef __cplusplus 0024 namespace Kst { 0025 class ObjectStore; 0026 } 0027 0028 //extern "C" { 0029 #endif 0030 0031 CreateNodeBinary(Addition) 0032 CreateNodeBinary(Subtraction) 0033 CreateNodeBinary(Multiplication) 0034 CreateNodeBinary(Division) 0035 CreateNodeBinary(Modulo) 0036 CreateNodeBinary(Power) 0037 CreateNodeBinary(BitwiseAnd) 0038 CreateNodeBinary(BitwiseOr) 0039 CreateNodeBinary(LogicalAnd) 0040 CreateNodeBinary(LogicalOr) 0041 CreateNodeBinary(LessThan) 0042 CreateNodeBinary(LessThanEqual) 0043 CreateNodeBinary(GreaterThan) 0044 CreateNodeBinary(GreaterThanEqual) 0045 CreateNodeBinary(EqualTo) 0046 CreateNodeBinary(NotEqualTo) 0047 0048 void *NewData(Kst::ObjectStore *store, char *name); 0049 void *NewIdentifier(char *name); 0050 void *NewFunction(char *name, void *args); 0051 void *NewArgumentList(); 0052 void *NewNumber(double n); 0053 void *NewNot(void *n); 0054 void *NewNegation(void *n); 0055 void AppendArgument(void *list, void *arg); 0056 0057 void DeleteNode(void *n); /* WARNING: this does evil things. will cause a 0058 crash if we ever do MI in the tree */ 0059 void ParenthesizeNode(void *n); 0060 0061 #ifdef __cplusplus 0062 //} 0063 #endif 0064 0065 #undef CreateNode 0066 0067 #endif 0068 0069 /* vim: ts=2 sw=2 et 0070 */