SCDoc: Use proper static string constants instead of comparing string literals.
[supercollider.git] / include / server / SC_GraphDef.h
blob9c703d0e4395947481ea98ec2c7b0ca7992629fa
1 /*
2 SuperCollider real time audio synthesis system
3 Copyright (c) 2002 James McCartney. All rights reserved.
4 http://www.audiosynth.com
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 #ifndef _SC_GraphDef_
23 #define _SC_GraphDef_
25 #include "SC_SynthDef.h"
26 #include "HashTable.h"
28 struct ParamSpec
30 int32 mName[kSCNameLen];
31 int32 mIndex;
32 int32 mHash;
35 typedef HashTable<ParamSpec, Malloc> ParamSpecTable;
37 struct GraphDef
39 NodeDef mNodeDef;
41 uint32 mNumControls;
42 uint32 mNumAudioControls;
44 uint32 mNumWires;
45 uint32 mNumConstants;
46 uint32 mNumUnitSpecs;
47 uint32 mNumWireBufs;
48 uint32 mNumCalcUnits;
50 float32 *mInitialControlValues;
51 float32 *mConstants;
53 struct UnitSpec *mUnitSpecs;
55 size_t mWiresAllocSize, mUnitsAllocSize, mCalcUnitsAllocSize;
56 size_t mControlAllocSize, mMapControlsAllocSize, mMapControlRatesAllocSize;
58 uint32 mNumParamSpecs;
59 ParamSpec *mParamSpecs;
60 ParamSpecTable *mParamSpecTable;
62 int mRefCount;
63 struct GraphDef* mNext;
65 struct GraphDef *mOriginal;
67 uint32 mNumVariants;
68 struct GraphDef* mVariants;
70 typedef struct GraphDef GraphDef;
72 GraphDef* GraphDef_Recv(World *inWorld, char *buffer, GraphDef *inList);
73 GraphDef* GraphDef_Load(struct World *inWorld, const char *filename, GraphDef* inList);
74 GraphDef* GraphDef_LoadDir(struct World *inWorld, char *dirname, GraphDef* inList);
75 GraphDef* GraphDef_LoadGlob(World *inWorld, const char *pattern, GraphDef *inList);
76 void GraphDef_Remove(World *inWorld, int32 *inName);
77 void GraphDef_DeleteMsg(struct World *inWorld, GraphDef *inDef);
78 void GraphDef_Dump(GraphDef *inGraphDef);
79 int32 GetHash(ParamSpec* inParamSpec);
80 int32* GetKey(ParamSpec* inParamSpec);
82 #endif