Revision: 4447
          http://pd-gem.svn.sourceforge.net/pd-gem/?rev=4447&view=rev
Author:   zmoelnig
Date:     2011-08-11 08:30:27 +0000 (Thu, 11 Aug 2011)

Log Message:
-----------
made gem::RTE::Symbol work (at least on linux)

Modified Paths:
--------------
    trunk/Gem/src/RTE/Symbol.cpp
    trunk/Gem/src/RTE/Symbol.h

Modified: trunk/Gem/src/RTE/Symbol.cpp
===================================================================
--- trunk/Gem/src/RTE/Symbol.cpp        2011-08-11 08:30:01 UTC (rev 4446)
+++ trunk/Gem/src/RTE/Symbol.cpp        2011-08-11 08:30:27 UTC (rev 4447)
@@ -52,7 +52,13 @@
 {
   m_pimpl->sym=name;
 }
+gem::RTE::Symbol :: Symbol(const unsigned int argc, const t_atom*argv) 
+  : m_pimpl(new PIMPL)
+{
+  setSymbol(argc, argv);
+}
 
+
 gem::RTE::Symbol :: ~Symbol(void)
 {
   m_pimpl->sym=NULL;
@@ -69,5 +75,20 @@
   m_pimpl->sym=name;
 }
 gem::RTE::Symbol&gem::RTE::Symbol::setSymbol(const unsigned int argc, const 
t_atom*argv) {
+  if(argc)
+    m_pimpl->sym=atom_getsymbol((t_atom*)argv);
+  else
+    m_pimpl->sym=0;
+    
   //  m_pimpl->sym=gensym(name.c_str());
 }
+
+t_symbol*gem::RTE::Symbol::getRTESymbol(void) const {
+  return (t_symbol*)(m_pimpl->sym);
+}
+std::string gem::RTE::Symbol::getString(void) const {
+  if(m_pimpl->sym)
+    return std::string(m_pimpl->sym->s_name);
+  return std::string();
+      
+}

Modified: trunk/Gem/src/RTE/Symbol.h
===================================================================
--- trunk/Gem/src/RTE/Symbol.h  2011-08-11 08:30:01 UTC (rev 4446)
+++ trunk/Gem/src/RTE/Symbol.h  2011-08-11 08:30:27 UTC (rev 4447)
@@ -30,6 +30,7 @@
       Symbol(const gem::RTE::Symbol&a);
       Symbol(const std::string&name);
       Symbol(const struct _symbol*name);
+      Symbol(const unsigned int, const struct _atom*);
       
       virtual ~Symbol(void);
 
@@ -37,10 +38,17 @@
       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
+
+      virtual std::string getString(void) const;
+      virtual struct _symbol*getRTESymbol(void) const;
+
+      virtual operator std::string(void) {
+       return getString();
+      }
+
+      virtual operator struct _symbol*(void) {
+       return getRTESymbol();
+      }
     };
   };
 };


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

Reply via email to