Revision: 4446 http://pd-gem.svn.sourceforge.net/pd-gem/?rev=4446&view=rev Author: zmoelnig Date: 2011-08-11 08:30:01 +0000 (Thu, 11 Aug 2011)
Log Message: ----------- added Symbol wrapper Modified Paths: -------------- trunk/Gem/src/RTE/Makefile.am Added Paths: ----------- trunk/Gem/src/RTE/Symbol.cpp trunk/Gem/src/RTE/Symbol.h Modified: trunk/Gem/src/RTE/Makefile.am =================================================================== --- trunk/Gem/src/RTE/Makefile.am 2011-08-11 08:29:32 UTC (rev 4445) +++ trunk/Gem/src/RTE/Makefile.am 2011-08-11 08:30:01 UTC (rev 4446) @@ -31,4 +31,6 @@ Array.h \ MessageCallbacks.h \ Outlet.cpp \ - Outlet.h + Outlet.h \ + Symbol.cpp \ + Symbol.h Added: trunk/Gem/src/RTE/Symbol.cpp =================================================================== --- trunk/Gem/src/RTE/Symbol.cpp (rev 0) +++ trunk/Gem/src/RTE/Symbol.cpp 2011-08-11 08:30:01 UTC (rev 4446) @@ -0,0 +1,73 @@ +//////////////////////////////////////////////////////// +// +// GEM - Graphics Environment for Multimedia +// +// zmoel...@iem.at +// +// Implementation file +// +// Copyright (c) 1997-2000 Mark Danks. +// Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM +// Copyright (c) 2002 James Tittle & Chris Clepper +// For information on usage and redistribution, and for a DISCLAIMER OF ALL +// WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. +// +// a wrapper for accessing the RTE's arrays +// currently only numeric arrays +// +///////////////////////////////////////////////////////// + +#include "RTE/Symbol.h" +#include "Gem/RTE.h" + + +class gem::RTE::Symbol::PIMPL { +public: + const t_symbol*sym; + + PIMPL(void) : sym(NULL) + { + } + ~PIMPL(void) { + } +}; + +gem::RTE::Symbol :: Symbol(void) + : m_pimpl(new PIMPL) +{ +} + +gem::RTE::Symbol :: Symbol(const gem::RTE::Symbol&Sym) + : m_pimpl(new PIMPL) +{ + m_pimpl->sym=Sym.m_pimpl->sym; +} +gem::RTE::Symbol :: Symbol(const std::string&name) + : m_pimpl(new PIMPL) +{ + m_pimpl->sym=gensym(name.c_str()); +} +gem::RTE::Symbol :: Symbol(const t_symbol*name) + : m_pimpl(new PIMPL) +{ + m_pimpl->sym=name; +} + +gem::RTE::Symbol :: ~Symbol(void) +{ + m_pimpl->sym=NULL; + delete m_pimpl; +} + +gem::RTE::Symbol&gem::RTE::Symbol::operator=(const std::string&name) { + m_pimpl->sym=gensym(name.c_str()); +} +gem::RTE::Symbol&gem::RTE::Symbol::operator=(const gem::RTE::Symbol&Sym) { + m_pimpl->sym=Sym.m_pimpl->sym; +} +gem::RTE::Symbol&gem::RTE::Symbol::operator=(const t_symbol*name) { + m_pimpl->sym=name; +} +gem::RTE::Symbol&gem::RTE::Symbol::setSymbol(const unsigned int argc, const t_atom*argv) { + // m_pimpl->sym=gensym(name.c_str()); +} Added: trunk/Gem/src/RTE/Symbol.h =================================================================== --- trunk/Gem/src/RTE/Symbol.h (rev 0) +++ trunk/Gem/src/RTE/Symbol.h 2011-08-11 08:30:01 UTC (rev 4446) @@ -0,0 +1,47 @@ +/*----------------------------------------------------------------- + LOG + GEM - Graphics Environment for Multimedia + + access symbols of the RTE + + Copyright (c) 2010 IOhannes m zmoelnig. forum::f\xFCr::uml\xE4ute. IEM. zmoel...@iem.kug.ac.at + For information on usage and redistribution, and for a DISCLAIMER OF ALL + WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution. + + -----------------------------------------------------------------*/ +#ifndef INCLUDE_GEM_RTE_SYMBOL_H_ +#define INCLUDE_GEM_RTE_SYMBOL_H_ + + +#include "Gem/ExportDef.h" +#include <string> + +struct _symbol; +struct _atom; +namespace gem { + namespace RTE { + GEM_EXTERN class Symbol { + private: + class PIMPL; + PIMPL*m_pimpl; + + public: + Symbol(void); + Symbol(const gem::RTE::Symbol&a); + Symbol(const std::string&name); + Symbol(const struct _symbol*name); + + virtual ~Symbol(void); + + virtual Symbol&operator=(const Symbol&); + virtual Symbol&operator=(const std::string&); + virtual Symbol&operator=(const struct _symbol*); + virtual Symbol&setSymbol(const unsigned int, const struct _atom*); +#if 0 + virtual std::string getString(void); + virtual struct _symbol*getRTESymbol(void); +#endif + }; + }; +}; +#endif /* INCLUDE_GEM_RTE_SYMBOL_H_ */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ pd-gem-CVS mailing list pd-gem-CVS@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pd-gem-cvs