From d62e56f4df9594f72ce501f5e19c974fd18e7295 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Tue, 22 Oct 2002 23:07:10 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r186, which included commits to RCS files with non-trunk default branches. svn path=/trunk/; revision=187 --- externals/grill/flext/tutorial/simple3/main.cpp | 90 +++++++++++++++++++ externals/grill/flext/tutorial/simple3/simple3.cw | Bin 0 -> 102333 bytes externals/grill/flext/tutorial/simple3/simple3.dsp | 95 +++++++++++++++++++++ 3 files changed, 185 insertions(+) create mode 100644 externals/grill/flext/tutorial/simple3/main.cpp create mode 100644 externals/grill/flext/tutorial/simple3/simple3.cw create mode 100644 externals/grill/flext/tutorial/simple3/simple3.dsp (limited to 'externals/grill/flext/tutorial/simple3') diff --git a/externals/grill/flext/tutorial/simple3/main.cpp b/externals/grill/flext/tutorial/simple3/main.cpp new file mode 100644 index 00000000..5d290f67 --- /dev/null +++ b/externals/grill/flext/tutorial/simple3/main.cpp @@ -0,0 +1,90 @@ +/* +flext tutorial - simple 3 + +Copyright (c) 2002 Thomas Grill (xovo@gmx.net) +For information on usage and redistribution, and for a DISCLAIMER OF ALL +WARRANTIES, see the file, "license.txt," in this distribution. + +------------------------------------------------------------------------- + +This is an example of an object digesting several "tagged" messages + +*/ + +// include flext header +#include + +// check for appropriate flext version +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 300) +#error You need at least flext version 0.3.0 +#endif + +class simple3: + public flext_base +{ + FLEXT_HEADER(simple3,flext_base) + +public: + // constructor with variable argument list + simple3(); + +protected: + void m_tag(); + void m_tag_and_int(int i); + void m_sym(t_symbol *s); + + // override default flext help function + virtual void m_help(); + +private: + + FLEXT_CALLBACK(m_tag); // callback for method "m_tag" (no arguments) + FLEXT_CALLBACK_I(m_tag_and_int); // callback for method "m_tag" (int arguments) + FLEXT_CALLBACK_S(m_sym); // callback for method "m_sym" (with one symbol argument) +}; + +// instantiate the class (constructor has a variable argument list) +FLEXT_NEW("simple3",simple3) + + +simple3::simple3() +{ + // define inlets + AddInAnything(); // add inlet of type anything (index 0) + + // set up inlets and outlets + SetupInOut(); + + // register methods + FLEXT_ADDMETHOD_(0,"born",m_tag); // register method for tag "born" + FLEXT_ADDMETHOD_(0,"to",m_tag); // register method for tag "to" + FLEXT_ADDMETHOD_(0,"hula",m_tag); // register method for tag "hula" + FLEXT_ADDMETHOD_I(0,"hula",m_tag_and_int); // register method for tag "hula" and int argument + + FLEXT_ADDMETHOD(0,m_sym); // register method for all other symbols +} + +void simple3::m_tag() +{ + post("tag recognized"); +} + +void simple3::m_tag_and_int(int i) +{ + post("tag recognized (has int arg: %i)",i); +} + +void simple3::m_sym(t_symbol *s) +{ + post("symbol: %s",GetString(s)); +} + + +void simple3::m_help() +{ + // post a help message + // thisName() returns a char * for the object name + post("%s - example for tagged messages",thisName()); +} + + diff --git a/externals/grill/flext/tutorial/simple3/simple3.cw b/externals/grill/flext/tutorial/simple3/simple3.cw new file mode 100644 index 00000000..b29678f7 Binary files /dev/null and b/externals/grill/flext/tutorial/simple3/simple3.cw differ diff --git a/externals/grill/flext/tutorial/simple3/simple3.dsp b/externals/grill/flext/tutorial/simple3/simple3.dsp new file mode 100644 index 00000000..8390b044 --- /dev/null +++ b/externals/grill/flext/tutorial/simple3/simple3.dsp @@ -0,0 +1,95 @@ +# Microsoft Developer Studio Project File - Name="simple3" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** NICHT BEARBEITEN ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=simple3 - Win32 Debug +!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE +!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl +!MESSAGE +!MESSAGE NMAKE /f "simple3.mak". +!MESSAGE +!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben +!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: +!MESSAGE +!MESSAGE NMAKE /f "simple3.mak" CFG="simple3 - Win32 Debug" +!MESSAGE +!MESSAGE Für die Konfiguration stehen zur Auswahl: +!MESSAGE +!MESSAGE "simple3 - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE "simple3 - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "simple3" +# PROP Scc_LocalPath "." +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "simple3 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "msvc" +# PROP Intermediate_Dir "msvc" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c +# ADD CPP /nologo /W3 /GR- /GX- /O2 /I "..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc07 /d "NDEBUG" +# ADD RSC /l 0xc07 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /out:"../msvc/simple3.dll" /libpath:"..\..\pd-msvc" + +!ELSEIF "$(CFG)" == "simple3 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "msvc-debug" +# PROP Intermediate_Dir "msvc-debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GR- /GX- /ZI /Od /I "..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /FR /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0xc07 /d "_DEBUG" +# ADD RSC /l 0xc07 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib pd.lib flext_d-pdwin.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\..\pd-msvc" + +!ENDIF + +# Begin Target + +# Name "simple3 - Win32 Release" +# Name "simple3 - Win32 Debug" +# Begin Source File + +SOURCE=.\main.cpp +# End Source File +# End Target +# End Project -- cgit v1.2.1