diff options
Diffstat (limited to 'externals/grill')
-rw-r--r-- | externals/grill/flext/changes.txt | 1 | ||||
-rw-r--r-- | externals/grill/flext/flext.vcproj | 640 | ||||
-rw-r--r-- | externals/grill/flext/source/flbind.cpp | 37 | ||||
-rw-r--r-- | externals/grill/flext/source/flclass.h | 9 |
4 files changed, 679 insertions, 8 deletions
diff --git a/externals/grill/flext/changes.txt b/externals/grill/flext/changes.txt index f24da9fb..b1999338 100644 --- a/externals/grill/flext/changes.txt +++ b/externals/grill/flext/changes.txt @@ -35,6 +35,7 @@ Version history: - added support for patcher arguments for attributes (use # instead of $ to save them with a patch) - moved memory functions and console output from flext to super-base-class flext_root and derived all helper classes from that - changed FLEXT_THREAD_X: wrappers doesn't delete the passed data pointer anymore -> the called method is responsible for that (and it knows the type....) +- enabled binding of more than one function to a symbol and added flext_base::GetBoundMethod 0.4.4: - fixed deadly bug for Max/MSP method-to-symbol-binding proxies diff --git a/externals/grill/flext/flext.vcproj b/externals/grill/flext/flext.vcproj index 9b67b2dd..659a37ec 100644 --- a/externals/grill/flext/flext.vcproj +++ b/externals/grill/flext/flext.vcproj @@ -124,7 +124,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="c:\programme\audio\pd-0.37\src,f:\prog\audio\sndobj\include,f:\prog\audio\stk\include" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,f:\prog\audio\sndobj\include,f:\prog\audio\stk\include" PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS_PD;FLEXT_THREADS;FLEXT_USE_SIMD" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -673,6 +673,116 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> + <Configuration + Name="Max Threaded Debug|Win32" + OutputDirectory="max-msvc/td" + IntermediateDirectory="max-msvc/td" + ConfigurationType="4" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + GlobalOptimizations="FALSE" + InlineFunctionExpansion="0" + FavorSizeOrSpeed="0" + EnableFiberSafeOptimizations="FALSE" + AdditionalIncludeDirectories="F:\prog\audio\MaxWinSDK\c74support\max-includes,F:\prog\audio\MaxWinSDK\c74support\msp-includes,f:\prog\packs\pthreads,f:\prog\audio\sndobj\include,f:\prog\audio\stk\include" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS_MAX;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_EXPORTS" + StringPooling="TRUE" + RuntimeLibrary="1" + StructMemberAlignment="2" + EnableEnhancedInstructionSet="1" + RuntimeTypeInfo="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="flext.h" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="3" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="max-msvc/flext_td.lib"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Max Threaded Release|Win32" + OutputDirectory="max-msvc/tr" + IntermediateDirectory="max-msvc/tr" + ConfigurationType="4" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + GlobalOptimizations="FALSE" + InlineFunctionExpansion="2" + FavorSizeOrSpeed="0" + EnableFiberSafeOptimizations="FALSE" + AdditionalIncludeDirectories="F:\prog\audio\MaxWinSDK\c74support\max-includes,F:\prog\audio\MaxWinSDK\c74support\msp-includes,f:\prog\packs\pthreads,f:\prog\audio\sndobj\include,f:\prog\audio\stk\include" + PreprocessorDefinitions="WIN32;_LIB;FLEXT_SYS_MAX;FLEXT_USE_SIMD;FLEXT_EXPORTS;FLEXT_THREADS" + StringPooling="TRUE" + RuntimeLibrary="0" + EnableEnhancedInstructionSet="1" + RuntimeTypeInfo="TRUE" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="flext.h" + BrowseInformation="1" + WarningLevel="3" + SuppressStartupBanner="TRUE" + DebugInformationFormat="0" + CompileAs="0"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="max-msvc/flext_t.lib"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool" + Description="copy flext to maestra"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="3079"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> </Configurations> <References> </References> @@ -812,6 +922,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flatom_app.cpp"> @@ -929,6 +1059,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flatom_part.cpp"> @@ -1046,6 +1196,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flatom_pr.cpp"> @@ -1163,6 +1333,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> </Filter> <Filter @@ -1284,6 +1474,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flbase.h"> @@ -1407,6 +1617,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flext.h"> @@ -1530,6 +1760,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flprefix.h"> @@ -1653,6 +1903,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> </Filter> <Filter @@ -1774,6 +2044,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath=".\source\flattr_ed.cpp"> @@ -1894,6 +2184,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flitem.cpp"> @@ -2011,6 +2321,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flmeth.cpp"> @@ -2128,6 +2458,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flmsg.cpp"> @@ -2245,6 +2595,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flout.cpp"> @@ -2362,6 +2732,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flproxy.cpp"> @@ -2479,6 +2869,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flqueue.cpp"> @@ -2596,6 +3006,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flxlet.cpp"> @@ -2713,6 +3143,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> </Filter> <Filter @@ -2834,6 +3284,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flmspbuffer.h"> @@ -2954,6 +3424,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flsupport.cpp"> @@ -3071,6 +3561,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flsupport.h"> @@ -3191,6 +3701,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flutil.cpp"> @@ -3308,6 +3838,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> </Filter> <Filter @@ -3429,6 +3979,26 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\fldsp.h"> @@ -3559,6 +4129,28 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flsndobj.h"> @@ -3598,6 +4190,18 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll <Tool Name="VCCustomBuildTool"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> </File> </Filter> <Filter @@ -3725,6 +4329,28 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll BasicRuntimeChecks="3" BrowseInformation="1"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> </File> <File RelativePath="source\flstk.h"> @@ -3764,6 +4390,18 @@ copy F:\prog\max\flext\max-msvc\flext.max.dll f:\prog\dll <Tool Name="VCCustomBuildTool"/> </FileConfiguration> + <FileConfiguration + Name="Max Threaded Debug|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> + <FileConfiguration + Name="Max Threaded Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCustomBuildTool"/> + </FileConfiguration> </File> </Filter> <Filter diff --git a/externals/grill/flext/source/flbind.cpp b/externals/grill/flext/source/flbind.cpp index a74ed33b..815ffa45 100644 --- a/externals/grill/flext/source/flbind.cpp +++ b/externals/grill/flext/source/flbind.cpp @@ -95,10 +95,15 @@ bool flext_base::BindMethod(const t_symbol *sym,bool (*fun)(flext_base *,t_symbo bindhead = new ItemCont; else { // Search for symbol - if(bindhead->Find(sym,0)) { - post("%s - Symbol already bound",thisName()); - return false; - } + flext_base::BindItem *item = (flext_base::BindItem *)bindhead->Find(sym,0); + + // go through all items with matching tag + for(; item && item->tag == sym; item = (flext_base::BindItem *)item->nxt) + if(item->fun == fun) { + // function already registered -> bail out! + post("%s - Symbol already bound with this method",thisName()); + return false; + } if(bindhead->Count() > 20) { // Hash it! @@ -153,12 +158,14 @@ bool flext_base::UnbindMethod(const t_symbol *sym,bool (*fun)(flext_base *,t_sym } } else { - int sz = bindhead->Size(); + // any tag + + int sz = bindhead->Count(); if(!sz) sz = 1; for(int i = 0; i < sz; ++i) { for(it = (BindItem *)bindhead->GetItem(i); it; it = (BindItem *)it->nxt) { - if(it->tag == sym && (!fun || it->fun == fun)) break; + if(!fun || it->fun == fun) break; } if(it) break; } @@ -172,11 +179,27 @@ bool flext_base::UnbindMethod(const t_symbol *sym,bool (*fun)(flext_base *,t_sym return ok; } +bool flext_base::GetBoundMethod(const t_symbol *sym,bool (*fun)(flext_base *,t_symbol *s,int argc,t_atom *argv,void *data),void *&data) +{ + if(bindhead) { + // Search for symbol + flext_base::BindItem *item = (flext_base::BindItem *)bindhead->Find(sym,0); + + // go through all items with matching tag + for(; item && item->tag == sym; item = (flext_base::BindItem *)item->nxt) + if(item->fun == fun) { + data = item->px->data; + return true; + } + } + return false; +} + bool flext_base::UnbindAll() { // bool memleak = false; - int sz = bindhead->Size(); + int sz = bindhead->Count(); if(!sz) sz = 1; for(int i = 0; i < sz; ++i) { diff --git a/externals/grill/flext/source/flclass.h b/externals/grill/flext/source/flclass.h index fa5337b7..17842bd2 100644 --- a/externals/grill/flext/source/flclass.h +++ b/externals/grill/flext/source/flclass.h @@ -437,11 +437,20 @@ public: \return true on success */ bool UnbindMethod(const t_symbol *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data) = NULL,void **data = NULL); + /*! \brief Get data of bound method of a symbol + \param sym Symbol to bind to + \param meth Function to bind + \param data Reference to returned user data + \return true on success (symbol/method combination was found) + */ + bool GetBoundMethod(const t_symbol *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data),void *&data); //! \brief Bind a method to a symbol (as string) bool BindMethod(const char *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data),void *data = NULL) { return BindMethod(MakeSymbol(sym),meth,data); } //! \brief Unbind a method from a symbol (as string) bool UnbindMethod(const char *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data) = NULL,void **data = NULL) { return UnbindMethod(MakeSymbol(sym),meth,data); } + //! \brief Get data of bound method of a symbol (as string) + bool GetBoundMethod(const char *sym,bool (*meth)(flext_base *obj,t_symbol *sym,int argc,t_atom *argv,void *data),void *&data) { return GetBoundMethod(MakeSymbol(sym),meth,data); } /*! Unbind all symbol bindings \note Memory associated to data pointers passed by BindMethod will not be freed! |