[PD-cvs] externals/grill/flext/source flbase.cpp,1.19,1.20 flbase.h,1.26,1.27 flbuf.cpp,1.18,1.19 fllib.cpp,1.28,1.29

Thomas Grill xovo at users.sourceforge.net
Fri Dec 31 05:58:31 CET 2004


Update of /cvsroot/pure-data/externals/grill/flext/source
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5608/source

Modified Files:
	flbase.cpp flbase.h flbuf.cpp fllib.cpp 
Log Message:
fix for showing attributes on select (and recreate the object on edit)
reconsidered flext::buffer:Update
build system for flext-based externals
added object construction and destruction flags


Index: flbase.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flbase.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** flbase.cpp	13 Nov 2004 03:30:49 -0000	1.19
--- flbase.cpp	31 Dec 2004 04:58:29 -0000	1.20
***************
*** 45,48 ****
--- 45,51 ----
  bool flext_obj::process_attributes = false;
  
+ bool flext_obj::initing = false;
+ bool flext_obj::exiting = false;
+ 
  void flext_obj::ProcessAttributes(bool attr) { process_attributes = attr; }
  
***************
*** 52,59 ****
  /////////////////////////////////////////////////////////
  flext_obj :: FLEXT_CLASSDEF(flext_obj)()
!            : x_obj(m_holder)
!            , procattr(m_holdattr)
!            , init_ok(true)
!            , m_name(m_holdname)
  {
  #if FLEXT_SYS == FLEXT_SYS_PD
--- 55,62 ----
  /////////////////////////////////////////////////////////
  flext_obj :: FLEXT_CLASSDEF(flext_obj)()
!     : x_obj(m_holder)
!     , procattr(m_holdattr)
!     , init_ok(true)
!     , m_name(m_holdname)
  {
  #if FLEXT_SYS == FLEXT_SYS_PD

Index: flbase.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flbase.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** flbase.h	21 Jun 2004 13:58:19 -0000	1.26
--- flbase.h	31 Dec 2004 04:58:29 -0000	1.27
***************
*** 220,223 ****
--- 220,226 ----
          bool				init_ok;
  
+         // flags for init and exit procedure;
+         static bool initing,exiting;
+ 
  	public:
  
***************
*** 243,246 ****
--- 246,257 ----
  		bool InitOk() const { return init_ok; }
  
+         /*! Return true if in object initialization phase
+             true when in constructor or Init, false when in Finalize
+         */
+         static bool Initing() { return initing; }
+ 
+         //! Return true if in object destruction phase (Exit or destructor)
+         static bool Exiting() { return exiting; }
+ 
  		// Definitions for library objects
  		static void lib_init(const char *name,void setupfun(),bool attr);

Index: flbuf.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flbuf.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** flbuf.cpp	21 Jun 2004 13:58:19 -0000	1.18
--- flbuf.cpp	31 Dec 2004 04:58:29 -0000	1.19
***************
*** 82,86 ****
          {
              if (*GetString(sym)) FLEXT_LOG1("buffer: no such array '%s'",GetString(sym));
!             sym = NULL;
              if(valid) ret = -1;
          }
--- 82,86 ----
          {
              if (*GetString(sym)) FLEXT_LOG1("buffer: no such array '%s'",GetString(sym));
! //            sym = NULL;
              if(valid) ret = -1;
          }
***************
*** 148,156 ****
  bool flext::buffer::Update()
  {
!     if(!Ok()) return false;
  
      bool ok = false;
  
  #if FLEXT_SYS == FLEXT_SYS_PD
      int frames1;
      t_sample *data1;
--- 148,158 ----
  bool flext::buffer::Update()
  {
! //    if(!Ok()) return false;
  
      bool ok = false;
  
  #if FLEXT_SYS == FLEXT_SYS_PD
+     if(!sym || !arr) return data == NULL;
+ 
      int frames1;
      t_sample *data1;
***************
*** 167,170 ****
--- 169,174 ----
      }
  #elif FLEXT_SYS == FLEXT_SYS_MAX
+     if(!sym) return data == NULL;
+ 
      if(sym->s_thing) {
          const _buffer *p = (const _buffer *)sym->s_thing;

Index: fllib.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/fllib.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** fllib.cpp	16 Dec 2004 05:01:07 -0000	1.28
--- fllib.cpp	31 Dec 2004 04:58:29 -0000	1.29
***************
*** 414,417 ****
--- 414,418 ----
  			    flext_obj::m_holdname = s;
  			    flext_obj::m_holdattr = lo->attr;
+                 flext_obj::initing = true;
  
  			    // get actual flext object (newfun calls "new flext_obj()")
***************
*** 447,450 ****
--- 448,453 ----
  				    ok = obj->data->Init();
  
+                     flext_obj::initing = false;
+ 
  				    // call another virtual init function 
  				    if(ok) ok = obj->data->Finalize();
***************
*** 468,471 ****
--- 471,476 ----
              }
  
+             flext_obj::initing = false;
+ 
              if(!ok) { 
  				// there was some init error, free object
***************
*** 501,504 ****
--- 506,511 ----
  	if(lcl) {
          try {
+             flext_obj::exiting = true;
+ 
  		    // call virtual exit function
  		    hdr->data->Exit();
***************
*** 516,520 ****
      		error("%s - Unknown exception while destroying object",GetString(name));
          }
! 	}
  #ifdef FLEXT_DEBUG
  	else 
--- 523,529 ----
      		error("%s - Unknown exception while destroying object",GetString(name));
          }
! 
!         flext_obj::exiting = false;
!     }
  #ifdef FLEXT_DEBUG
  	else 





More information about the Pd-cvs mailing list