From 1d6d1e8c73193f57a9c98387ea42eb91eb4d21d1 Mon Sep 17 00:00:00 2001 From: Georg Holzmann Date: Fri, 21 Oct 2005 11:56:32 +0000 Subject: only moving to a new directory svn path=/trunk/externals/grh/; revision=3740 --- PDContainer/src/PDContainer.cpp | 78 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100755 PDContainer/src/PDContainer.cpp (limited to 'PDContainer/src/PDContainer.cpp') diff --git a/PDContainer/src/PDContainer.cpp b/PDContainer/src/PDContainer.cpp new file mode 100755 index 0000000..fc27477 --- /dev/null +++ b/PDContainer/src/PDContainer.cpp @@ -0,0 +1,78 @@ +// *********************(c)*2004*********************> +// -holzilib--holzilib--holzilib--holzilib--holzilib-> +// ++++PD-External++by+Georg+Holzmann++grh@gmx.at++++> +// +// PDContainer: +// this is a port of the containers from the C++ STL +// (Standard Template Library) +// for usage see the documentation and PD help files +// for license see readme.txt +// +// PDContainer.cpp + + +#include "include/GlobalStuff.h" + + +typedef struct PDContainer +{ + t_object x_obj; +} t_PDContainer; + +t_class *PDContainer_class; + +static void PDContainer_help(void) +{ + post("\nPD-Container, Version: "PDC_VERSION""); + post("------------------------------------------"); + post("this is an implementation of the container"); + post("objects from the Standard Template"); + post("Library (STL) of C++"); + post("for documentation see the help patches"); + post("(by Georg Holzmann , 2004)"); + post("------------------------------------------\n"); +} + +static void *PDContainer_new(void) +{ + t_PDContainer *x = (t_PDContainer *)pd_new(PDContainer_class); + return (void *)x; +} + +//----------------------------------------------------- +// declaration of the setup functions: +void h_map_setup(); +void h_multimap_setup(); +void h_set_setup(); +void h_multiset_setup(); +void h_vector_setup(); +void h_deque_setup(); +void h_queue_setup(); +void h_priority_queue_setup(); +void h_stack_setup(); +void h_list_setup(); +//-end-of-declaration---------------------------------- + +extern "C" void PDContainer_setup(void) +{ + //--------------------------------------------------- + // call all the setup functions: + h_map_setup(); + h_multimap_setup(); + h_set_setup(); + h_multiset_setup(); + h_vector_setup(); + h_deque_setup(); + h_queue_setup(); + h_priority_queue_setup(); + h_stack_setup(); + h_list_setup(); + //-end----------------------------------------------- + + post("\nPD-Container, Version: "PDC_VERSION", by Georg Holzmann , 2004-2005"); + + // without an argument the following two methods wont work ??? why?? because of c++? + PDContainer_class = class_new(gensym("PDContainer"), (t_newmethod)PDContainer_new, + 0, sizeof(t_PDContainer), CLASS_DEFAULT, A_DEFFLOAT, 0); + class_addmethod(PDContainer_class, (t_method)PDContainer_help, gensym("help"), A_DEFFLOAT, 0); +} -- cgit v1.2.1