1 /************************************************************************
2 ************************************************************************
4 Copyright (C) 2003-2004 GRAME, Centre National de Creation Musicale
5 ---------------------------------------------------------------------
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 ************************************************************************
20 ************************************************************************/
37 #include "description.hh"
39 ////////////////////////////////////////////////////////////////////////
41 * compileSignals : listOfSignal -> klass
43 * Compile a list of FAUST signals into a C++ class
45 ///////////////////////////////////////////////////////////////////////
47 #define kMaxHeight 1024
54 bool fNeedToDeleteClass;
56 Description* fDescription;
59 Compiler (const string& name, const string& super, int numInputs, int numOutputs, bool vec);
64 virtual void compileMultiSignal (Tree lsig) = 0;
65 virtual void compileSingleSignal (Tree lsig) = 0;
67 Klass* getClass() { return (Klass*)fClass; }
69 void setDescription(Description* descr) { fDescription= descr; }
70 Description* getDescription() { return fDescription; }
73 virtual Tree prepare (Tree L0) = 0;
74 virtual Tree prepare2 (Tree L0) = 0;
76 // gestion des includes et librairies
77 void addIncludeFile (const string& str) { fClass->addIncludeFile(str); }
78 void addLibrary (const string& str) { fClass->addLibrary(str); }
80 // gestion de la description arborescente de l'IU
81 void addUIWidget(Tree path, Tree widget);
82 void generateWidgetCode(Tree fulllabel, Tree varname, Tree sig);
83 void generateUserInterfaceTree(Tree t);
84 void generateUserInterfaceElements(Tree elements);
85 Tree prepareUserInterfaceTree(Tree t);
87 void generateMacroInterfaceTree(const string& pathname, Tree t);
88 void generateMacroInterfaceElements(const string& pathname, Tree elements);
89 void generateWidgetMacro(const string& pathname, Tree fulllabel, Tree varname, Tree sig);
93 #define generateEquivRecGroup generateRecGroup
96 void compileSignals (const string& name, const string& super, int numInputs, int numOutputs, Tree lsig);