aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/vasp/source
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2002-12-05 05:36:32 +0000
committerThomas Grill <xovo@users.sourceforge.net>2002-12-05 05:36:32 +0000
commit60ee6bb60b11bbfbccf56f335c9c6213e6daa79d (patch)
tree99b0c72c60aeba5d1a0489aae9edd16f371d965c /externals/grill/vasp/source
parentbbd9d289d152f6ef085dec680f0b1611c29f0e32 (diff)
""
svn path=/trunk/; revision=278
Diffstat (limited to 'externals/grill/vasp/source')
-rw-r--r--externals/grill/vasp/source/arg.cpp69
-rw-r--r--externals/grill/vasp/source/arg.h8
-rw-r--r--externals/grill/vasp/source/buflib.cpp1
-rw-r--r--externals/grill/vasp/source/classes.cpp67
-rw-r--r--externals/grill/vasp/source/classes.h80
-rw-r--r--externals/grill/vasp/source/env.cpp15
-rw-r--r--externals/grill/vasp/source/env.h2
-rw-r--r--externals/grill/vasp/source/main.cpp5
-rw-r--r--externals/grill/vasp/source/main.h8
-rwxr-xr-xexternals/grill/vasp/source/obj_chns.cpp5
-rw-r--r--externals/grill/vasp/source/obj_frames.cpp12
-rw-r--r--externals/grill/vasp/source/obj_imm.cpp7
-rw-r--r--externals/grill/vasp/source/obj_offs.cpp6
-rw-r--r--externals/grill/vasp/source/obj_part.cpp14
-rw-r--r--externals/grill/vasp/source/obj_peaks.cpp5
-rw-r--r--externals/grill/vasp/source/obj_q.cpp3
-rw-r--r--externals/grill/vasp/source/obj_radio.cpp3
-rw-r--r--externals/grill/vasp/source/obj_size.cpp13
-rw-r--r--externals/grill/vasp/source/obj_split.cpp5
-rw-r--r--externals/grill/vasp/source/obj_sync.cpp2
-rw-r--r--externals/grill/vasp/source/obj_vasp.cpp4
-rw-r--r--externals/grill/vasp/source/obj_vecs.cpp6
-rw-r--r--externals/grill/vasp/source/opbase.cpp1
-rw-r--r--externals/grill/vasp/source/opparam.cpp11
-rw-r--r--externals/grill/vasp/source/ops_arith.cpp1
-rw-r--r--externals/grill/vasp/source/ops_assign.cpp7
-rw-r--r--externals/grill/vasp/source/ops_carith.cpp1
-rw-r--r--externals/grill/vasp/source/ops_cmp.cpp1
-rw-r--r--externals/grill/vasp/source/ops_cplx.cpp1
-rw-r--r--externals/grill/vasp/source/ops_dft.cpp1
-rw-r--r--externals/grill/vasp/source/ops_feature.cpp11
-rw-r--r--externals/grill/vasp/source/ops_flt.cpp1
-rw-r--r--externals/grill/vasp/source/ops_gate.cpp1
-rw-r--r--externals/grill/vasp/source/ops_gen.cpp1
-rw-r--r--externals/grill/vasp/source/ops_qminmax.cpp1
-rw-r--r--externals/grill/vasp/source/ops_rearr.cpp11
-rw-r--r--externals/grill/vasp/source/ops_resmp.cpp12
-rw-r--r--externals/grill/vasp/source/ops_search.cpp12
-rw-r--r--externals/grill/vasp/source/ops_trnsc.cpp1
-rw-r--r--externals/grill/vasp/source/ops_wnd.cpp1
-rw-r--r--externals/grill/vasp/source/opvecs.cpp1
-rw-r--r--externals/grill/vasp/source/util.cpp11
-rw-r--r--externals/grill/vasp/source/vasp.cpp24
-rw-r--r--externals/grill/vasp/source/vasp.h4
-rw-r--r--externals/grill/vasp/source/vbuffer.cpp11
-rw-r--r--externals/grill/vasp/source/vecblk.cpp11
46 files changed, 349 insertions, 129 deletions
diff --git a/externals/grill/vasp/source/arg.cpp b/externals/grill/vasp/source/arg.cpp
index 89a6729c..696558cf 100644
--- a/externals/grill/vasp/source/arg.cpp
+++ b/externals/grill/vasp/source/arg.cpp
@@ -1,3 +1,14 @@
+/*
+
+VASP modular - vector assembling signal processor / objects for Max/MSP and PD
+
+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.
+
+*/
+
+#include "main.h"
#include "arg.h"
//#include <math.h>
#include "classes.h"
@@ -5,7 +16,7 @@
Argument::Argument(): tp(tp_none),nxt(NULL) {}
Argument::~Argument() { ClearAll(); }
-Argument &Argument::Parse(I argc,t_atom *argv)
+Argument &Argument::Parse(I argc,const t_atom *argv)
{
if(argc == 0)
Clear();
@@ -47,6 +58,56 @@ Argument &Argument::Parse(I argc,t_atom *argv)
return *this;
}
+V Argument::MakeList(flext::AtomList &ret)
+{
+ switch(tp) {
+ case tp_none:
+ ret();
+ break;
+ case tp_list:
+ ret = *dt.atoms;
+ break;
+ case tp_vasp:
+ dt.v->MakeList(ret);
+ break;
+ case tp_env:
+ dt.env->MakeList(ret);
+ break;
+ case tp_vx: {
+ I d = dt.vx->Dim();
+ ret(d+1);
+ flext::SetSymbol(ret[0],vasp_base::sym_vector);
+ for(I i = 0; i < d; ++i)
+ flext::SetFloat(ret[i+1],(*dt.vx)[i]);
+ break;
+ }
+ case tp_cx:
+ ret(3);
+ flext::SetSymbol(ret[0],vasp_base::sym_complex);
+ flext::SetFloat(ret[1],dt.cx->real);
+ flext::SetFloat(ret[2],dt.cx->imag);
+ break;
+ case tp_int:
+ ret(1);
+ flext::SetInt(ret[0],dt.i);
+ break;
+ case tp_float:
+ ret(1);
+ flext::SetFloat(ret[0],dt.f);
+ break;
+ case tp_double: {
+ F f = (F)dt.d;
+ ret(3);
+ flext::SetSymbol(ret[0],vasp_base::sym_double);
+ flext::SetFloat(ret[1],f);
+ flext::SetFloat(ret[2],dt.d-f);
+ break;
+ }
+ default:
+ ERRINTERNAL();
+ }
+}
+
Argument &Argument::Clear()
{
@@ -73,7 +134,7 @@ Argument &Argument::Clear()
case tp_double:
break;
default:
- error("Argument: Internal error - type unknown!");
+ ERRINTERNAL();
}
tp = tp_none;
return *this;
@@ -100,7 +161,7 @@ Argument &Argument::SetEnv(Env *e)
return *this;
}
-Argument &Argument::SetList(I argc,t_atom *argv)
+Argument &Argument::SetList(I argc,const t_atom *argv)
{
if(tp != tp_none) Clear();
dt.atoms = new flext::AtomList(argc,argv); tp = tp_list;
@@ -202,7 +263,7 @@ Argument &Argument::AddVasp(Vasp *v) { Argument *a = new Argument; a->SetVasp(v)
Argument &Argument::AddEnv(Env *e) { Argument *a = new Argument; a->SetEnv(e); return Add(a); }
-Argument &Argument::AddList(I argc,t_atom *argv) { Argument *a = new Argument; a->SetList(argc,argv); return Add(a); }
+Argument &Argument::AddList(I argc,const t_atom *argv) { Argument *a = new Argument; a->SetList(argc,argv); return Add(a); }
Argument &Argument::AddI(I i) { Argument *a = new Argument; a->SetI(i); return Add(a); }
diff --git a/externals/grill/vasp/source/arg.h b/externals/grill/vasp/source/arg.h
index d6ebc378..bda3ef01 100644
--- a/externals/grill/vasp/source/arg.h
+++ b/externals/grill/vasp/source/arg.h
@@ -25,13 +25,13 @@ public:
Argument();
~Argument();
- Argument &Parse(I argc,t_atom *argv);
+ Argument &Parse(I argc,const t_atom *argv);
Argument &Clear();
Argument &ClearAll();
Argument &SetVasp(Vasp *v);
Argument &SetEnv(Env *e);
- Argument &SetList(I argc,t_atom *argv);
+ Argument &SetList(I argc,const t_atom *argv);
Argument &SetI(I i);
Argument &SetR(F f);
Argument &SetR(D d);
@@ -45,7 +45,7 @@ public:
Argument &AddVasp(Vasp *v);
Argument &AddEnv(Env *e);
- Argument &AddList(I argc,t_atom *argv);
+ Argument &AddList(I argc,const t_atom *argv);
Argument &AddI(I i);
Argument &AddR(F f);
Argument &AddR(D d);
@@ -86,6 +86,8 @@ public:
const VX &GetVector() const { return *dt.vx; }
VX GetAVector() const;
+ V MakeList(flext::AtomList &ret);
+
protected:
enum {
tp_none,tp_vasp,tp_env,tp_list,tp_int,tp_float,tp_double,tp_cx,tp_vx
diff --git a/externals/grill/vasp/source/buflib.cpp b/externals/grill/vasp/source/buflib.cpp
index 36bc90c7..03c2944e 100644
--- a/externals/grill/vasp/source/buflib.cpp
+++ b/externals/grill/vasp/source/buflib.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "buflib.h"
#include <stdio.h>
diff --git a/externals/grill/vasp/source/classes.cpp b/externals/grill/vasp/source/classes.cpp
index 46d07147..582f5959 100644
--- a/externals/grill/vasp/source/classes.cpp
+++ b/externals/grill/vasp/source/classes.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
//#include <stdarg.h>
@@ -38,15 +39,19 @@ vasp_base::vasp_base():
unit(xsu_sample),loglvl(0)
{
FLEXT_ADDMETHOD_(0,"radio",m_radio);
- FLEXT_ADDMETHOD_(0,"argchk",m_argchk);
- FLEXT_ADDMETHOD_(0,"loglvl",m_loglvl);
- FLEXT_ADDMETHOD_E(0,"unit",m_unit);
+
+// LATER!
+/*
+ FLEXT_ADDATTR_VAR1("argchk",argchk);
+ FLEXT_ADDATTR_VAR1("loglvl",loglvl);
+ FLEXT_ADDATTR_VAR1_E("unit",unit);
+*/
}
vasp_base::~vasp_base() {}
-V vasp_base::m_radio(I argc,t_atom *argv)
+V vasp_base::m_radio(I argc,const t_atom *argv)
{
if(argc > 0 && IsSymbol(argv[0])) {
// send command to self!
@@ -59,11 +64,11 @@ V vasp_base::m_radio(I argc,t_atom *argv)
post("%s - radio message invalid",thisName());
}
-
+/*
V vasp_base::m_unit(xs_unit u) { unit = u; }
V vasp_base::m_argchk(BL chk) { argchk = chk; }
V vasp_base::m_loglvl(I lvl) { loglvl = lvl; }
-
+*/
BL vasp_base::ToOutVasp(I oix,Vasp &v)
{
@@ -89,13 +94,19 @@ vasp_op::vasp_op(BL op)
FLEXT_ADDBANG(0,m_dobang);
FLEXT_ADDMETHOD_(0,"vasp",m_vasp);
FLEXT_ADDMETHOD_(0,"set",m_set);
- if(op) FLEXT_ADDMETHOD_(0,"to",m_to);
+// if(op) FLEXT_ADDMETHOD_(0,"to",m_to);
- FLEXT_ADDMETHOD_(0,"update",m_update);
+ FLEXT_ADDATTR_VAR("ref",m_getref,m_setref);
+ if(op) FLEXT_ADDATTR_VAR("to",m_getto,m_setto);
- FLEXT_ADDMETHOD_(0,"detach",m_detach);
FLEXT_ADDMETHOD_(0,"stop",m_stop);
- FLEXT_ADDMETHOD_(0,"prior",m_prior);
+
+ FLEXT_ADDATTR_VAR("update",m_getupd,m_setupd);
+
+#ifdef FLEXT_THREADS
+ FLEXT_ADDATTR_VAR1("detach",detach);
+ FLEXT_ADDATTR_VAR1("prior",prior);
+#endif
}
V vasp_op::m_dobang()
@@ -108,7 +119,7 @@ V vasp_op::m_dobang()
m_bang();
}
-I vasp_op::m_set(I argc,t_atom *argv)
+I vasp_op::m_set(I argc,const t_atom *argv)
{
Vasp arg(argc,argv);
@@ -128,13 +139,14 @@ I vasp_op::m_set(I argc,t_atom *argv)
return 0;
}
-V vasp_op::m_vasp(I argc,t_atom *argv)
+V vasp_op::m_vasp(I argc,const t_atom *argv)
{
m_set(argc,argv);
m_dobang();
}
-V vasp_op::m_to(I argc,t_atom *argv)
+
+V vasp_op::m_to(I argc,const t_atom *argv)
{
Vasp to(argc,argv);
@@ -146,7 +158,7 @@ V vasp_op::m_to(I argc,t_atom *argv)
dst = to;
}
-V vasp_op::m_update(I argc,t_atom *argv)
+V vasp_op::m_update(I argc,const t_atom *argv)
{
if(argc == 0)
ref.Refresh();
@@ -158,6 +170,8 @@ V vasp_op::m_update(I argc,t_atom *argv)
}
}
+
+/*
V vasp_op::m_detach(BL thr)
{
#ifdef FLEXT_THREADS
@@ -171,6 +185,7 @@ V vasp_op::m_prior(I p)
prior = p;
#endif
}
+*/
V vasp_op::m_stop() {}
@@ -204,7 +219,7 @@ V vasp_tx::m_bang()
delete ret;
}
else {
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
post("%s - no valid return",thisName());
#endif
}
@@ -246,7 +261,7 @@ Vasp *vasp_unop::tx_work()
///////////////////////////////////////////////////////////////////////////
-vasp_binop::vasp_binop(I argc,t_atom *argv,const Argument &def,BL op,UL outcode):
+vasp_binop::vasp_binop(I argc,const t_atom *argv,const Argument &def,BL op,UL outcode):
vasp_tx(op)
{
a_list(argc,argv);
@@ -265,9 +280,11 @@ vasp_binop::vasp_binop(I argc,t_atom *argv,const Argument &def,BL op,UL outcode)
FLEXT_ADDMETHOD_(1,"complex",a_complex);
FLEXT_ADDMETHOD_(1,"vector",a_vector);
FLEXT_ADDMETHOD_(1,"radio",a_radio);
+
+ FLEXT_ADDATTR_VAR("arg",m_getarg,m_setarg);
}
-V vasp_binop::a_list(I argc,t_atom *argv)
+V vasp_binop::a_list(I argc,const t_atom *argv)
{
if(argc) {
arg.Parse(argc,argv);
@@ -282,7 +299,7 @@ V vasp_binop::a_list(I argc,t_atom *argv)
}
}
-V vasp_binop::a_vasp(I argc,t_atom *argv)
+V vasp_binop::a_vasp(I argc,const t_atom *argv)
{
Vasp *v = new Vasp(argc,argv);
if(v->Ok()) {
@@ -297,7 +314,7 @@ V vasp_binop::a_vasp(I argc,t_atom *argv)
}
}
-V vasp_binop::a_env(I argc,t_atom *argv)
+V vasp_binop::a_env(I argc,const t_atom *argv)
{
Env *bp = new Env(argc,argv);
if(bp->Ok()) {
@@ -314,7 +331,7 @@ V vasp_binop::a_env(I argc,t_atom *argv)
V vasp_binop::a_float(F v) { arg.SetR(v); }
-V vasp_binop::a_double(I argc,t_atom *argv)
+V vasp_binop::a_double(I argc,const t_atom *argv)
{
if(
(argc == 1 && CanbeFloat(argv[0])) ||
@@ -331,7 +348,7 @@ V vasp_binop::a_double(I argc,t_atom *argv)
V vasp_binop::a_int(I v) { arg.SetI(v); }
-V vasp_binop::a_complex(I argc,t_atom *argv)
+V vasp_binop::a_complex(I argc,const t_atom *argv)
{
if(
(argc == 1 && CanbeFloat(argv[0])) ||
@@ -346,7 +363,7 @@ V vasp_binop::a_complex(I argc,t_atom *argv)
post("%s - invalid complex argument (ignored)",thisName());
}
-V vasp_binop::a_vector(I argc,t_atom *argv)
+V vasp_binop::a_vector(I argc,const t_atom *argv)
{
error("%s - vector type not implemented",thisName());
}
@@ -366,7 +383,7 @@ Vasp *vasp_binop::tx_work(const Argument &arg)
///////////////////////////////////////////////////////////////////////////
-vasp_anyop::vasp_anyop(I argc,t_atom *argv,const Argument &def,BL op,UL outcode):
+vasp_anyop::vasp_anyop(I argc,const t_atom *argv,const Argument &def,BL op,UL outcode):
vasp_tx(op)
{
a_list(argc,argv);
@@ -379,9 +396,11 @@ vasp_anyop::vasp_anyop(I argc,t_atom *argv,const Argument &def,BL op,UL outcode)
FLEXT_ADDMETHOD(1,a_list);
FLEXT_ADDMETHOD_(1,"vasp",a_list);
FLEXT_ADDMETHOD_(1,"radio",a_radio);
+
+ FLEXT_ADDATTR_VAR("arg",m_getarg,m_setarg);
}
-V vasp_anyop::a_list(I argc,t_atom *argv)
+V vasp_anyop::a_list(I argc,const t_atom *argv)
{
if(argc) {
arg.SetList(argc,argv);
diff --git a/externals/grill/vasp/source/classes.h b/externals/grill/vasp/source/classes.h
index 5344f585..d6a31413 100644
--- a/externals/grill/vasp/source/classes.h
+++ b/externals/grill/vasp/source/classes.h
@@ -37,12 +37,13 @@ protected:
vasp_base();
virtual ~vasp_base();
- virtual V m_radio(I argc,t_atom *argv); // commands for all
+ virtual V m_radio(I argc,const t_atom *argv); // commands for all
+/*
V m_argchk(BL chk); // precheck argument on arrival
V m_loglvl(I lvl); // noise level of log messages
V m_unit(xs_unit u); // unit command
-
+*/
BL refresh; // immediate graphics refresh?
BL argchk; // pre-operation argument feasibility check
xs_unit unit; // time units
@@ -57,9 +58,9 @@ private:
FLEXT_CALLBACK_V(m_radio)
- FLEXT_CALLBACK_B(m_argchk)
- FLEXT_CALLBACK_I(m_loglvl)
- FLEXT_CALLBACK_1(m_unit,xs_unit)
+ FLEXT_ATTRVAR_B(argchk)
+ FLEXT_ATTRVAR_I(loglvl)
+ FLEXT_ATTRVAR_E(unit,xs_unit)
};
@@ -73,18 +74,26 @@ protected:
virtual V m_dobang(); // bang method
- virtual V m_vasp(I argc,t_atom *argv); // trigger
- virtual I m_set(I argc,t_atom *argv); // non trigger
- virtual V m_to(I argc,t_atom *argv); // set destination
- V m_detach(BL thr); // detached thread
- virtual V m_prior(I dp); // thread priority +-
+ virtual V m_vasp(I argc,const t_atom *argv); // trigger
+ virtual I m_set(I argc,const t_atom *argv); // non trigger
+ virtual V m_to(I argc,const t_atom *argv); // set destination
+// V m_detach(BL thr); // detached thread
+// virtual V m_prior(I dp); // thread priority +-
virtual V m_stop(); // stop working
- virtual V m_update(I argc = 0,t_atom *argv = NULL); // graphics update
+ virtual V m_update(I argc = 0,const t_atom *argv = NULL); // graphics update
+
+ V m_setupd(const AtomList &l) { m_update(l.Count(),l.Atoms()); }
+ V m_getupd(AtomList &l) { l(1); SetBool(l[0],refresh); }
// destination vasp
Vasp ref,dst;
+ V m_setref(const AtomList &l) { m_set(l.Count(),l.Atoms()); }
+ V m_getref(AtomList &l) { ref.MakeList(l); }
+ V m_setto(const AtomList &l) { m_to(l.Count(),l.Atoms()); }
+ V m_getto(AtomList &l) { dst.MakeList(l); }
+
FLEXT_CALLBACK_V(m_to)
FLEXT_CALLBACK(m_dobang)
@@ -106,11 +115,18 @@ protected:
#endif
FLEXT_CALLBACK_V(m_vasp)
FLEXT_CALLBACK_V(m_set)
- FLEXT_CALLBACK_V(m_update)
- FLEXT_CALLBACK_B(m_detach)
- FLEXT_CALLBACK_I(m_prior)
+
+ FLEXT_CALLVAR_V(m_getref,m_setref)
+ FLEXT_CALLVAR_V(m_getto,m_setto)
+
FLEXT_CALLBACK(m_stop)
+ FLEXT_CALLVAR_V(m_getupd,m_setupd)
+#ifdef FLEXT_THREADS
+ FLEXT_ATTRVAR_B(detach)
+ FLEXT_ATTRVAR_I(prior)
+#endif
+
private:
virtual V m_bang() = 0; // do! and output current Vasp
};
@@ -160,25 +176,28 @@ class vasp_binop:
FLEXT_HEADER(vasp_binop,vasp_tx)
protected:
- vasp_binop(I argc,t_atom *argv,const Argument &def = Argument(),BL withto = false,UL outcode = 0);
+ vasp_binop(I argc,const t_atom *argv,const Argument &def = Argument(),BL withto = false,UL outcode = 0);
// assignment functions
- virtual V a_list(I argc,t_atom *argv);
- /*virtual*/ V a_vasp(I argc,t_atom *argv);
- /*virtual*/ V a_env(I argc,t_atom *argv);
+ virtual V a_list(I argc,const t_atom *argv);
+ /*virtual*/ V a_vasp(I argc,const t_atom *argv);
+ /*virtual*/ V a_env(I argc,const t_atom *argv);
/*virtual*/ V a_float(F f);
/*virtual*/ V a_int(I f);
- /*virtual*/ V a_double(I argc,t_atom *argv);
- /*virtual*/ V a_complex(I argc,t_atom *argv);
- /*virtual*/ V a_vector(I argc,t_atom *argv);
+ /*virtual*/ V a_double(I argc,const t_atom *argv);
+ /*virtual*/ V a_complex(I argc,const t_atom *argv);
+ /*virtual*/ V a_vector(I argc,const t_atom *argv);
- V a_radio(I,t_atom *) {}
+ V a_radio(I,const t_atom *) {}
virtual Vasp *x_work();
virtual Vasp *tx_work(const Argument &arg);
Argument arg;
+ V m_setarg(const AtomList &l) { a_list(l.Count(),l.Atoms()); }
+ V m_getarg(AtomList &l) { arg.MakeList(l); }
+
private:
FLEXT_CALLBACK_V(a_list)
FLEXT_CALLBACK_V(a_vasp)
@@ -189,6 +208,8 @@ private:
FLEXT_CALLBACK_V(a_complex)
FLEXT_CALLBACK_V(a_vector)
FLEXT_CALLBACK_V(a_radio)
+
+ FLEXT_CALLVAR_V(m_getarg,m_setarg)
};
@@ -200,21 +221,26 @@ class vasp_anyop:
FLEXT_HEADER(vasp_anyop,vasp_tx)
protected:
- vasp_anyop(I argc,t_atom *argv,const Argument &def = Argument(),BL withto = false,UL outcode = 0);
+ vasp_anyop(I argc,const t_atom *argv,const Argument &def = Argument(),BL withto = false,UL outcode = 0);
// assignment functions
- virtual V a_list(I argc,t_atom *argv);
+ virtual V a_list(I argc,const t_atom *argv);
- V a_radio(I,t_atom *) {}
+ V a_radio(I,const t_atom *) {}
virtual Vasp *x_work();
virtual Vasp *tx_work(const Argument &arg);
Argument arg;
+ V m_setarg(const AtomList &l) { a_list(l.Count(),l.Atoms()); }
+ V m_getarg(AtomList &l) { arg.MakeList(l); }
+
private:
FLEXT_CALLBACK_V(a_list)
FLEXT_CALLBACK_V(a_radio)
+
+ FLEXT_CALLVAR_V(m_getarg,m_setarg)
};
@@ -243,7 +269,7 @@ class vasp_ ## op: \
{ \
FLEXT_HEADER(vasp_##op,vasp_binop) \
public: \
- vasp_##op(I argc,t_atom *argv): vasp_binop(argc,argv,def,to) {} \
+ vasp_##op(I argc,const t_atom *argv): vasp_binop(argc,argv,def,to) {} \
protected: \
virtual Vasp *tx_work(const Argument &arg) \
{ \
@@ -261,7 +287,7 @@ class vasp_ ## op: \
{ \
FLEXT_HEADER(vasp_##op,vasp_anyop) \
public: \
- vasp_##op(I argc,t_atom *argv): vasp_anyop(argc,argv,def,to) {} \
+ vasp_##op(I argc,const t_atom *argv): vasp_anyop(argc,argv,def,to) {} \
protected: \
virtual Vasp *tx_work(const Argument &arg) \
{ \
diff --git a/externals/grill/vasp/source/env.cpp b/externals/grill/vasp/source/env.cpp
index f846a227..010f888e 100644
--- a/externals/grill/vasp/source/env.cpp
+++ b/externals/grill/vasp/source/env.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "env.h"
#include "classes.h"
#include "util.h"
@@ -58,12 +59,12 @@ BL Env::ChkArgs(I argc,const t_atom *argv)
if(v && v == vasp_base::sym_env) ix++; // if it is "env" ignore it
while(argc > ix) {
- // check for position
+ // check for value
if(flext::CanbeFloat(argv[ix])) ix++;
else
return false;
- // check for value
+ // check for position
if(argc > ix)
if(flext::CanbeFloat(argv[ix])) ix++;
else
@@ -73,7 +74,15 @@ BL Env::ChkArgs(I argc,const t_atom *argv)
return true;
}
-
+V Env::MakeList(flext::AtomList &ret) const
+{
+ ret(cnt*2+1);
+ flext::SetSymbol(ret[0],vasp_base::sym_env);
+ for(I i = 0; i < cnt; ++i) {
+ flext::SetFloat(ret[i*2+1],val[i]);
+ flext::SetFloat(ret[i*2+2],pos[i]);
+ }
+}
V Env::Clear()
{
diff --git a/externals/grill/vasp/source/env.h b/externals/grill/vasp/source/env.h
index e9f8dae7..5b00ffae 100644
--- a/externals/grill/vasp/source/env.h
+++ b/externals/grill/vasp/source/env.h
@@ -23,6 +23,8 @@ public:
static BL ChkArgs(I argc,const t_atom *argv);
+ V MakeList(flext::AtomList &ret) const;
+
V Clear();
BL Ok() const { return cnt && pos != NULL && val != NULL; }
diff --git a/externals/grill/vasp/source/main.cpp b/externals/grill/vasp/source/main.cpp
index 15525aac..1603d107 100644
--- a/externals/grill/vasp/source/main.cpp
+++ b/externals/grill/vasp/source/main.cpp
@@ -8,10 +8,11 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
-const C *VASP_VERSION = "0.1.2pre2";
+const C *VASP_VERSION = "0.1.2pre6";
V lib_setup()
{
@@ -20,7 +21,7 @@ V lib_setup()
post(" VASP modular %s ",VASP_VERSION);
post(" vector assembling signal processor ");
post(" (C)2002 Thomas Grill ");
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
post(" DEBUG BUILD - " __DATE__ " " __TIME__);
#endif
post("");
diff --git a/externals/grill/vasp/source/main.h b/externals/grill/vasp/source/main.h
index 0fad36d8..f8680dab 100644
--- a/externals/grill/vasp/source/main.h
+++ b/externals/grill/vasp/source/main.h
@@ -11,6 +11,9 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#ifndef __VASP_H
#define __VASP_H
+// enable attributes
+#define FLEXT_ATTRIBUTES 1
+
#include <flext.h>
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401)
@@ -52,7 +55,7 @@ class vector;
typedef vector VX;
#endif
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
// buffers are never interleaved - special optimizations may occur
// attention: possibly obsolete when immediate file access is implemented
#define VASP_CHN1
@@ -76,6 +79,9 @@ public:
I Dim() const { return dim; }
F *Data() { return data; }
const F *Data() const { return data; }
+
+ F operator [](I ix) const { return data[ix]; }
+ F &operator [](I ix) { return data[ix]; }
protected:
I dim; F *data;
};
diff --git a/externals/grill/vasp/source/obj_chns.cpp b/externals/grill/vasp/source/obj_chns.cpp
index 1cd15c30..facfe5fe 100755
--- a/externals/grill/vasp/source/obj_chns.cpp
+++ b/externals/grill/vasp/source/obj_chns.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -38,9 +39,9 @@ public:
AddInAnything(2);
AddOutAnything();
- SetupInOut();
FLEXT_ADDMETHOD(1,m_ix);
+ FLEXT_ADDATTR_VAR("index",ix,m_ix);
}
V m_ix(I i) { ix = i; }
@@ -59,6 +60,8 @@ protected:
private:
FLEXT_CALLBACK_I(m_ix);
+ FLEXT_CALLSET_I(m_ix);
+ FLEXT_ATTRGET_I(ix);
};
FLEXT_LIB_V("vasp, vasp.channel vasp.c",vasp_channel)
diff --git a/externals/grill/vasp/source/obj_frames.cpp b/externals/grill/vasp/source/obj_frames.cpp
index fb618e51..c50d5019 100644
--- a/externals/grill/vasp/source/obj_frames.cpp
+++ b/externals/grill/vasp/source/obj_frames.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -31,7 +32,7 @@ class vasp_frames:
FLEXT_HEADER(vasp_frames,vasp_tx)
public:
- vasp_frames(I argc,t_atom *argv):
+ vasp_frames(I argc,t_atom *argv,BL abs = true):
frms(0),setf(false)
{
if(argc && CanbeFloat(argv[0]))
@@ -43,9 +44,9 @@ public:
AddInAnything();
AddInFloat();
AddOutAnything();
- SetupInOut();
FLEXT_ADDMETHOD(1,m_arg);
+ if(abs) FLEXT_ADDATTR_VAR("frames",frms,m_arg);
}
virtual V m_arg(F f)
@@ -68,6 +69,8 @@ protected:
private:
FLEXT_CALLBACK_F(m_arg);
+ FLEXT_CALLSET_I(m_arg);
+ FLEXT_ATTRGET_I(frms);
};
FLEXT_LIB_V("vasp, vasp.frames vasp.f",vasp_frames)
@@ -128,9 +131,10 @@ class vasp_mframes:
public:
vasp_mframes(I argc,t_atom *argv):
- vasp_frames(argc,argv)
+ vasp_frames(argc,argv,false)
{
if(argc && CanbeFloat(argv[0])) m_arg(GetAFloat(argv[0]));
+ FLEXT_ADDATTR_VAR("factor",factor,m_arg);
}
virtual Vasp *x_work()
@@ -150,6 +154,8 @@ public:
protected:
F factor;
+ FLEXT_CALLSET_F(m_arg);
+ FLEXT_ATTRGET_F(factor);
};
FLEXT_LIB_V("vasp, vasp.frames* vasp.f*",vasp_mframes)
diff --git a/externals/grill/vasp/source/obj_imm.cpp b/externals/grill/vasp/source/obj_imm.cpp
index d1ca5da0..9ea9791a 100644
--- a/externals/grill/vasp/source/obj_imm.cpp
+++ b/externals/grill/vasp/source/obj_imm.cpp
@@ -12,7 +12,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
\brief Definitions for immediate vasps
*/
-
+#include "main.h"
#include "classes.h"
#include "util.h"
#include "buflib.h"
@@ -48,10 +48,9 @@ public:
AddInAnything();
AddInInt();
AddOutAnything();
- SetupInOut();
- FLEXT_ADDMETHOD_(0,"frames",m_frames);
FLEXT_ADDMETHOD(1,m_frames);
+ FLEXT_ADDATTR_VAR("frames",frms,m_frames);
}
V m_frames(I n) { frms = n; }
@@ -97,6 +96,8 @@ protected:
private:
FLEXT_CALLBACK_I(m_frames)
+ FLEXT_CALLSET_I(m_frames);
+ FLEXT_ATTRGET_I(frms);
};
FLEXT_LIB_V("vasp, vasp.imm vasp.!",vasp_imm)
diff --git a/externals/grill/vasp/source/obj_offs.cpp b/externals/grill/vasp/source/obj_offs.cpp
index e424056f..07bf1982 100644
--- a/externals/grill/vasp/source/obj_offs.cpp
+++ b/externals/grill/vasp/source/obj_offs.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -43,9 +44,9 @@ public:
AddInAnything();
AddInFloat();
AddOutAnything();
- SetupInOut();
FLEXT_ADDMETHOD(1,m_offs);
+ FLEXT_ADDATTR_VAR("frames",offs,m_offs);
}
V m_offs(F o)
@@ -68,6 +69,8 @@ protected:
private:
FLEXT_CALLBACK_F(m_offs);
+ FLEXT_CALLSET_I(m_offs);
+ FLEXT_ATTRGET_I(offs);
};
FLEXT_LIB_V("vasp, vasp.offset vasp.o",vasp_offset)
@@ -138,7 +141,6 @@ public:
AddInAnything();
// AddOutAnything();
AddOutFloat();
- SetupInOut();
}
virtual V m_bang()
diff --git a/externals/grill/vasp/source/obj_part.cpp b/externals/grill/vasp/source/obj_part.cpp
index 2b0aa256..f1ecf354 100644
--- a/externals/grill/vasp/source/obj_part.cpp
+++ b/externals/grill/vasp/source/obj_part.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -40,14 +41,14 @@ public:
AddInAnything(2);
AddOutAnything(2);
- SetupInOut();
FLEXT_ADDMETHOD_(1,"list",m_part);
+ FLEXT_ADDATTR_VAR("parts",m_getpart,m_setpart);
}
~vasp_part() { if(part) delete[] part; }
- V m_part(I argc,t_atom *argv)
+ V m_part(I argc,const t_atom *argv)
{
if(part) delete[] part; parts = 0;
part = new I[argc];
@@ -62,6 +63,14 @@ public:
}
}
+ V m_getpart(AtomList &ret)
+ {
+ ret(parts);
+ for(I i = 0; i < parts; ++i) SetInt(ret[i],part[i]);
+ }
+
+ V m_setpart(const AtomList &ret) { m_part(ret.Count(),ret.Atoms()); }
+
virtual V m_bang()
{
if(!ref.Ok()) {
@@ -95,6 +104,7 @@ protected:
I parts,*part;
FLEXT_CALLBACK_V(m_part)
+ FLEXT_CALLVAR_V(m_getpart,m_setpart);
};
FLEXT_LIB_V("vasp, vasp.part",vasp_part)
diff --git a/externals/grill/vasp/source/obj_peaks.cpp b/externals/grill/vasp/source/obj_peaks.cpp
index 1c1a218d..bade1ff1 100644
--- a/externals/grill/vasp/source/obj_peaks.cpp
+++ b/externals/grill/vasp/source/obj_peaks.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
#include <math.h>
@@ -44,9 +45,9 @@ public:
AddInAnything();
AddInInt();
AddOutAnything(2);
- SetupInOut();
FLEXT_ADDMETHOD(1,m_peaks);
+ FLEXT_ADDATTR_VAR("peaks",peaks,m_peaks);
}
V m_peaks(I n) { peaks = n; }
@@ -104,6 +105,8 @@ protected:
private:
FLEXT_CALLBACK_I(m_peaks);
+ FLEXT_CALLSET_I(m_peaks);
+ FLEXT_ATTRGET_I(peaks);
};
FLEXT_LIB_V("vasp, vasp.peaks?",vasp_qpeaks)
diff --git a/externals/grill/vasp/source/obj_q.cpp b/externals/grill/vasp/source/obj_q.cpp
index f0465109..c3f86ca5 100644
--- a/externals/grill/vasp/source/obj_q.cpp
+++ b/externals/grill/vasp/source/obj_q.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -35,7 +36,6 @@ public:
{
AddInAnything();
AddOutList();
- SetupInOut();
}
virtual V m_bang()
@@ -86,7 +86,6 @@ public:
{
AddInAnything();
AddOutList(2);
- SetupInOut();
}
virtual V m_bang()
diff --git a/externals/grill/vasp/source/obj_radio.cpp b/externals/grill/vasp/source/obj_radio.cpp
index 7b0608e3..d0c2452e 100644
--- a/externals/grill/vasp/source/obj_radio.cpp
+++ b/externals/grill/vasp/source/obj_radio.cpp
@@ -12,7 +12,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
\brief objects for radio messages.
*/
-
+#include "main.h"
#include "classes.h"
@@ -35,7 +35,6 @@ public:
{
AddInAnything();
AddOutAnything(2);
- SetupInOut();
FLEXT_ADDMETHOD(0,m_any);
}
diff --git a/externals/grill/vasp/source/obj_size.cpp b/externals/grill/vasp/source/obj_size.cpp
index 9a535e60..6c38184c 100644
--- a/externals/grill/vasp/source/obj_size.cpp
+++ b/externals/grill/vasp/source/obj_size.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -32,7 +33,7 @@ class vasp_size:
FLEXT_HEADER(vasp_size,vasp_tx)
public:
- vasp_size(I argc,t_atom *argv):
+ vasp_size(I argc,t_atom *argv,BL abs = true):
size(0),sets(false)
{
if(argc >= 1 && CanbeFloat(argv[0]))
@@ -43,9 +44,9 @@ public:
AddInAnything();
AddInFloat();
AddOutAnything();
- SetupInOut();
FLEXT_ADDMETHOD(1,m_arg);
+ if(abs) FLEXT_ADDATTR_VAR("frames",size,m_arg);
}
virtual V m_arg(F s)
@@ -68,6 +69,8 @@ protected:
private:
FLEXT_CALLBACK_F(m_arg);
+ FLEXT_CALLSET_I(m_arg);
+ FLEXT_ATTRGET_I(size);
};
FLEXT_LIB_V("vasp, vasp.size vasp.s",vasp_size)
@@ -128,9 +131,10 @@ class vasp_msize:
public:
vasp_msize(I argc,t_atom *argv):
- vasp_size(argc,argv)
+ vasp_size(argc,argv,false)
{
if(argc && CanbeFloat(argv[0])) m_arg(GetAFloat(argv[0]));
+ FLEXT_ADDATTR_VAR("factor",factor,m_arg);
}
virtual Vasp *x_work()
@@ -150,6 +154,8 @@ public:
protected:
R factor;
+ FLEXT_CALLSET_F(m_arg);
+ FLEXT_ATTRGET_F(factor);
};
FLEXT_LIB_V("vasp, vasp.size* vasp.s*",vasp_msize)
@@ -217,7 +223,6 @@ public:
AddInAnything();
// AddOutAnything();
AddOutFloat();
- SetupInOut();
}
virtual V m_bang()
diff --git a/externals/grill/vasp/source/obj_split.cpp b/externals/grill/vasp/source/obj_split.cpp
index 42921d2a..5cb40889 100644
--- a/externals/grill/vasp/source/obj_split.cpp
+++ b/externals/grill/vasp/source/obj_split.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -45,7 +46,6 @@ public:
AddInAnything();
AddOutAnything(cnt+1);
- SetupInOut();
}
virtual V m_bang()
@@ -115,7 +115,6 @@ public:
AddInAnything(cnt);
AddOutAnything();
- SetupInOut();
FLEXT_ADDMETHOD_(0,"reset",m_reset);
}
@@ -185,7 +184,6 @@ public:
AddInAnything();
AddOutAnything(n);
AddOutBang();
- SetupInOut();
}
virtual V m_bang()
@@ -248,7 +246,6 @@ public:
AddInAnything(2);
AddOutAnything();
- SetupInOut();
FLEXT_ADDMETHOD_(0,"reset",m_reset);
FLEXT_ADDMETHOD_(1,"vasp",m_add);
diff --git a/externals/grill/vasp/source/obj_sync.cpp b/externals/grill/vasp/source/obj_sync.cpp
index 35f81409..6dcd1bd2 100644
--- a/externals/grill/vasp/source/obj_sync.cpp
+++ b/externals/grill/vasp/source/obj_sync.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -51,7 +52,6 @@ public:
AddInAnything(cnt);
AddOutAnything(cnt);
- SetupInOut();
FLEXT_ADDMETHOD_(0,"reset",m_reset);
diff --git a/externals/grill/vasp/source/obj_vasp.cpp b/externals/grill/vasp/source/obj_vasp.cpp
index 3b52d253..ba91a7c5 100644
--- a/externals/grill/vasp/source/obj_vasp.cpp
+++ b/externals/grill/vasp/source/obj_vasp.cpp
@@ -12,7 +12,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
\brief basic vasp objects.
*/
-
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -72,7 +72,7 @@ FLEXT_LIB_V("vasp, vasp",vasp_v)
\param inlet set - vasp to be stored (and not immediately output)
\retval outlet vasp
- \note In MaxMSP only necessary when buffer is in another window.
+ \note In Max/MSP only necessary when buffer is in another window.
*/
class vasp_update:
public vasp_tx
diff --git a/externals/grill/vasp/source/obj_vecs.cpp b/externals/grill/vasp/source/obj_vecs.cpp
index fd24d273..3c0db9f5 100644
--- a/externals/grill/vasp/source/obj_vecs.cpp
+++ b/externals/grill/vasp/source/obj_vecs.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -42,9 +43,9 @@ public:
AddInAnything(2);
AddOutAnything();
- SetupInOut();
FLEXT_ADDMETHOD(1,m_ix);
+ FLEXT_ADDATTR_VAR("index",ix,m_ix);
}
V m_ix(I i) { ix = i; }
@@ -58,6 +59,8 @@ protected:
private:
FLEXT_CALLBACK_I(m_ix);
+ FLEXT_CALLSET_I(m_ix);
+ FLEXT_ATTRGET_I(ix);
};
FLEXT_LIB_V("vasp, vasp.vector vasp.n",vasp_vector)
@@ -88,7 +91,6 @@ public:
AddInAnything();
// AddOutAnything();
AddOutInt();
- SetupInOut();
}
virtual V m_bang()
diff --git a/externals/grill/vasp/source/opbase.cpp b/externals/grill/vasp/source/opbase.cpp
index 2ea9a13c..df4150f1 100644
--- a/externals/grill/vasp/source/opbase.cpp
+++ b/externals/grill/vasp/source/opbase.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "opbase.h"
#include "opdefs.h"
diff --git a/externals/grill/vasp/source/opparam.cpp b/externals/grill/vasp/source/opparam.cpp
index 9925e4dd..6bf42b5e 100644
--- a/externals/grill/vasp/source/opparam.cpp
+++ b/externals/grill/vasp/source/opparam.cpp
@@ -1,3 +1,14 @@
+/*
+
+VASP modular - vector assembling signal processor / objects for Max/MSP and PD
+
+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.
+
+*/
+
+#include "main.h"
#include "opparam.h"
//#include <math.h>
diff --git a/externals/grill/vasp/source/ops_arith.cpp b/externals/grill/vasp/source/ops_arith.cpp
index 5d62e2c6..6faa1aad 100644
--- a/externals/grill/vasp/source/ops_arith.cpp
+++ b/externals/grill/vasp/source/ops_arith.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_arith.h"
#include "opdefs.h"
#include "util.h"
diff --git a/externals/grill/vasp/source/ops_assign.cpp b/externals/grill/vasp/source/ops_assign.cpp
index 96061ce9..a8033bb9 100644
--- a/externals/grill/vasp/source/ops_assign.cpp
+++ b/externals/grill/vasp/source/ops_assign.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_assign.h"
#include "opdefs.h"
@@ -64,9 +65,9 @@ class vasp_copy:
FLEXT_HEADER(vasp_copy,vasp_anyop)
public:
- vasp_copy(I argc,t_atom *argv): vasp_anyop(argc,argv,VASP_ARG(),true,XletCode(xlet::tp_any,0)) {}
+ vasp_copy(I argc,const t_atom *argv): vasp_anyop(argc,argv,VASP_ARG(),true,XletCode(xlet::tp_any,0)) {}
- virtual V m_to(I,t_atom *) { post("s - destination vasp is ignored!",thisName()); }
+ virtual V m_to(I,const t_atom *) { post("s - destination vasp is ignored!",thisName()); }
virtual Vasp *do_copy(OpParam &p,Vasp &dst) { return VaspOp::m_copy(p,ref,dst); }
@@ -97,7 +98,7 @@ class vasp_ccopy:
FLEXT_HEADER(vasp_ccopy,vasp_copy)
public:
- vasp_ccopy(I argc,t_atom *argv): vasp_copy(argc,argv) {}
+ vasp_ccopy(I argc,const t_atom *argv): vasp_copy(argc,argv) {}
virtual Vasp *do_copy(OpParam &p,Vasp &dst) { return VaspOp::m_ccopy(p,ref,dst); }
diff --git a/externals/grill/vasp/source/ops_carith.cpp b/externals/grill/vasp/source/ops_carith.cpp
index b2464ab2..cf00b439 100644
--- a/externals/grill/vasp/source/ops_carith.cpp
+++ b/externals/grill/vasp/source/ops_carith.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_carith.h"
#include "ops_assign.h"
#include "opdefs.h"
diff --git a/externals/grill/vasp/source/ops_cmp.cpp b/externals/grill/vasp/source/ops_cmp.cpp
index 2f632a54..fe4bd60a 100644
--- a/externals/grill/vasp/source/ops_cmp.cpp
+++ b/externals/grill/vasp/source/ops_cmp.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_cmp.h"
#include "opdefs.h"
#include "util.h"
diff --git a/externals/grill/vasp/source/ops_cplx.cpp b/externals/grill/vasp/source/ops_cplx.cpp
index 70f8c6e2..5311b2db 100644
--- a/externals/grill/vasp/source/ops_cplx.cpp
+++ b/externals/grill/vasp/source/ops_cplx.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_cplx.h"
#include "opdefs.h"
#include "util.h"
diff --git a/externals/grill/vasp/source/ops_dft.cpp b/externals/grill/vasp/source/ops_dft.cpp
index a83d80fc..dec49a26 100644
--- a/externals/grill/vasp/source/ops_dft.cpp
+++ b/externals/grill/vasp/source/ops_dft.cpp
@@ -23,6 +23,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
In-place transformation is only possible for stride=1
*/
+#include "main.h"
#include "ops_dft.h"
#include <math.h>
#include <string.h>
diff --git a/externals/grill/vasp/source/ops_feature.cpp b/externals/grill/vasp/source/ops_feature.cpp
index cb0f57c5..ede711e2 100644
--- a/externals/grill/vasp/source/ops_feature.cpp
+++ b/externals/grill/vasp/source/ops_feature.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_feature.h"
#include "oploop.h"
#include "util.h"
@@ -141,7 +142,9 @@ class vasp_peaks:
FLEXT_HEADER(vasp_peaks,vasp_anyop)
public:
- vasp_peaks(I argc,t_atom *argv): vasp_anyop(argc,argv,VASP_ARG(),true,XletCode(xlet::tp_float,0)) {}
+ vasp_peaks(I argc,const t_atom *argv):
+ vasp_anyop(argc,argv,VASP_ARG(),true,XletCode(xlet::tp_float,0))
+ {}
virtual Vasp *do_peaks(OpParam &p) { return VaspOp::m_peaks(p,ref,&dst); }
@@ -170,7 +173,7 @@ class vasp_valleys:
{
FLEXT_HEADER(vasp_valleys,vasp_peaks)
public:
- vasp_valleys(I argc,t_atom *argv): vasp_peaks(argc,argv) {}
+ vasp_valleys(I argc,const t_atom *argv): vasp_peaks(argc,argv) {}
virtual Vasp *do_peaks(OpParam &p) { return VaspOp::m_valleys(p,ref,&dst); }
};
FLEXT_LIB_V("vasp, vasp.valleys",vasp_valleys)
@@ -181,7 +184,7 @@ class vasp_rpeaks:
{
FLEXT_HEADER(vasp_rpeaks,vasp_peaks)
public:
- vasp_rpeaks(I argc,t_atom *argv): vasp_peaks(argc,argv) {}
+ vasp_rpeaks(I argc,const t_atom *argv): vasp_peaks(argc,argv) {}
virtual Vasp *do_peaks(OpParam &p) { return VaspOp::m_rpeaks(p,ref,&dst); }
};
FLEXT_LIB_V("vasp, vasp.rpeaks",vasp_rpeaks)
@@ -192,7 +195,7 @@ class vasp_rvalleys:
{
FLEXT_HEADER(vasp_rvalleys,vasp_peaks)
public:
- vasp_rvalleys(I argc,t_atom *argv): vasp_peaks(argc,argv) {}
+ vasp_rvalleys(I argc,const t_atom *argv): vasp_peaks(argc,argv) {}
virtual Vasp *do_peaks(OpParam &p) { return VaspOp::m_rvalleys(p,ref,&dst); }
};
FLEXT_LIB_V("vasp, vasp.rvalleys",vasp_rvalleys)
diff --git a/externals/grill/vasp/source/ops_flt.cpp b/externals/grill/vasp/source/ops_flt.cpp
index 64fb74ca..7784b081 100644
--- a/externals/grill/vasp/source/ops_flt.cpp
+++ b/externals/grill/vasp/source/ops_flt.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_flt.h"
#include "opdefs.h"
#include "util.h"
diff --git a/externals/grill/vasp/source/ops_gate.cpp b/externals/grill/vasp/source/ops_gate.cpp
index f8f9b3e3..97faf682 100644
--- a/externals/grill/vasp/source/ops_gate.cpp
+++ b/externals/grill/vasp/source/ops_gate.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_cmp.h"
#include "opdefs.h"
#include "util.h"
diff --git a/externals/grill/vasp/source/ops_gen.cpp b/externals/grill/vasp/source/ops_gen.cpp
index eec81701..f45be684 100644
--- a/externals/grill/vasp/source/ops_gen.cpp
+++ b/externals/grill/vasp/source/ops_gen.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_gen.h"
#include "util.h"
#include <math.h>
diff --git a/externals/grill/vasp/source/ops_qminmax.cpp b/externals/grill/vasp/source/ops_qminmax.cpp
index 05c0e8b5..adcb15d2 100644
--- a/externals/grill/vasp/source/ops_qminmax.cpp
+++ b/externals/grill/vasp/source/ops_qminmax.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_cmp.h"
#include "opdefs.h"
#include "util.h"
diff --git a/externals/grill/vasp/source/ops_rearr.cpp b/externals/grill/vasp/source/ops_rearr.cpp
index 2aa69aa2..bee58c56 100644
--- a/externals/grill/vasp/source/ops_rearr.cpp
+++ b/externals/grill/vasp/source/ops_rearr.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_rearr.h"
#include "oploop.h"
#include "oppermute.h"
@@ -101,11 +102,11 @@ class vasp_shift:
FLEXT_HEADER(vasp_shift,vasp_anyop)
public:
- vasp_shift(I argc,t_atom *argv):
+ vasp_shift(I argc,const t_atom *argv):
vasp_anyop(argc,argv,VASP_ARG_I(0),true),
fill(xsf_zero)
{
- FLEXT_ADDMETHOD_E(0,"fill",m_fill);
+ FLEXT_ADDATTR_VAR1_E("fill",fill);
}
enum xs_fill {
@@ -113,8 +114,6 @@ public:
xsf_none = 0,xsf_zero,xsf_edge
};
- V m_fill(xs_fill f) { fill = f; }
-
virtual Vasp *do_shift(OpParam &p) { return VaspOp::m_shift(p,ref,arg,&dst); }
virtual Vasp *tx_work(const Argument &arg)
@@ -132,7 +131,7 @@ protected:
xs_fill fill;
private:
- FLEXT_CALLBACK_1(m_fill,xs_fill)
+ FLEXT_ATTRVAR_E(fill,xs_fill)
};
FLEXT_LIB_V("vasp, vasp.shift",vasp_shift)
@@ -143,7 +142,7 @@ class vasp_xshift:
FLEXT_HEADER(vasp_xshift,vasp_shift)
public:
- vasp_xshift(I argc,t_atom *argv): vasp_shift(argc,argv) {}
+ vasp_xshift(I argc,const t_atom *argv): vasp_shift(argc,argv) {}
virtual Vasp *do_shift(OpParam &p) { return VaspOp::m_xshift(p,ref,arg,&dst); }
diff --git a/externals/grill/vasp/source/ops_resmp.cpp b/externals/grill/vasp/source/ops_resmp.cpp
index fbeabc07..cb51dbac 100644
--- a/externals/grill/vasp/source/ops_resmp.cpp
+++ b/externals/grill/vasp/source/ops_resmp.cpp
@@ -12,6 +12,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
\brief Routines for resampling
*/
+#include "main.h"
#include "ops_resmp.h"
@@ -207,8 +208,8 @@ public:
vasp_anyop(argc,argv,VASP_ARG_R(1),true),
fill(xtf_zero),inter(xti_4p)
{
- FLEXT_ADDMETHOD_E(0,"fill",m_fill);
- FLEXT_ADDMETHOD_E(0,"inter",m_inter);
+ FLEXT_ADDATTR_VAR1_E("fill",fill);
+ FLEXT_ADDATTR_VAR1_E("inter",inter);
}
enum xt_fill {
@@ -221,9 +222,6 @@ public:
xti_inpl = 0,xti_none,xti_lin,xti_4p
};
- V m_fill(xt_fill f) { fill = f; }
- V m_inter(xt_inter m) { inter = m; }
-
virtual Vasp *do_shift(OpParam &p) { return VaspOp::m_tilt(p,ref,arg,&dst); }
virtual Vasp *tx_work(const Argument &arg)
@@ -243,8 +241,8 @@ protected:
xt_inter inter;
private:
- FLEXT_CALLBACK_1(m_fill,xt_fill)
- FLEXT_CALLBACK_1(m_inter,xt_inter)
+ FLEXT_ATTRVAR_E(fill,xt_fill)
+ FLEXT_ATTRVAR_E(inter,xt_inter)
};
FLEXT_LIB_V("vasp, vasp.tilt",vasp_tilt)
diff --git a/externals/grill/vasp/source/ops_search.cpp b/externals/grill/vasp/source/ops_search.cpp
index 7afc84c2..4202a77c 100644
--- a/externals/grill/vasp/source/ops_search.cpp
+++ b/externals/grill/vasp/source/ops_search.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_search.h"
#include "util.h"
#include "oploop.h"
@@ -134,8 +135,8 @@ public:
vasp_anyop(argc,argv,VASP_ARG_R(0),false,XletCode(xlet::tp_float,0)),
slope(0),dir(0)
{
- FLEXT_ADDMETHOD_I(0,"dir",m_dir);
- FLEXT_ADDMETHOD_I(0,"slope",m_slope);
+ FLEXT_ADDATTR_VAR1("dir",dir);
+ FLEXT_ADDATTR_VAR1("slope",slope);
}
virtual Vasp *do_work(OpParam &p) = 0;
@@ -151,15 +152,12 @@ public:
return ret;
}
- V m_dir(I d) { dir = d; }
- V m_slope(I sl) { slope = sl; }
-
protected:
I dir,slope;
private:
- FLEXT_CALLBACK_I(m_dir)
- FLEXT_CALLBACK_I(m_slope)
+ FLEXT_ATTRVAR_I(dir)
+ FLEXT_ATTRVAR_I(slope)
};
diff --git a/externals/grill/vasp/source/ops_trnsc.cpp b/externals/grill/vasp/source/ops_trnsc.cpp
index 1b26f204..ac4cea1f 100644
--- a/externals/grill/vasp/source/ops_trnsc.cpp
+++ b/externals/grill/vasp/source/ops_trnsc.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_trnsc.h"
#include "opdefs.h"
#include "util.h"
diff --git a/externals/grill/vasp/source/ops_wnd.cpp b/externals/grill/vasp/source/ops_wnd.cpp
index 232649aa..daee3a9e 100644
--- a/externals/grill/vasp/source/ops_wnd.cpp
+++ b/externals/grill/vasp/source/ops_wnd.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_wnd.h"
#include "oploop.h"
#include <math.h>
diff --git a/externals/grill/vasp/source/opvecs.cpp b/externals/grill/vasp/source/opvecs.cpp
index 0e476682..1a226eb3 100644
--- a/externals/grill/vasp/source/opvecs.cpp
+++ b/externals/grill/vasp/source/opvecs.cpp
@@ -13,6 +13,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "opbase.h"
#include "classes.h"
#include "vecblk.h"
diff --git a/externals/grill/vasp/source/util.cpp b/externals/grill/vasp/source/util.cpp
index c487e3d1..417b74c2 100644
--- a/externals/grill/vasp/source/util.cpp
+++ b/externals/grill/vasp/source/util.cpp
@@ -1,3 +1,14 @@
+/*
+
+VASP modular - vector assembling signal processor / objects for Max/MSP and PD
+
+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.
+
+*/
+
+#include "main.h"
#include "util.h"
#include <math.h>
diff --git a/externals/grill/vasp/source/vasp.cpp b/externals/grill/vasp/source/vasp.cpp
index 35bbc5a2..efb3b7a6 100644
--- a/externals/grill/vasp/source/vasp.cpp
+++ b/externals/grill/vasp/source/vasp.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
#include "buflib.h"
@@ -233,24 +234,31 @@ VBuffer *Vasp::Buffer(I ix) const
}
// generate Vasp list of buffer references
-flext::AtomList *Vasp::MakeList(BL withvasp)
+V Vasp::MakeList(flext::AtomList &ret,BL withvasp) const
{
I voffs = withvasp?1:0;
I needed = voffs+1+Vectors()*3;
- flext::AtomList *ret = new flext::AtomList(needed);
+ ret(needed);
if(withvasp)
- flext::SetSymbol((*ret)[0],vasp_base::sym_vasp); // VASP
+ flext::SetSymbol(ret[0],vasp_base::sym_vasp); // VASP
- flext::SetInt((*ret)[voffs],frames); // frames
+ flext::SetInt(ret[voffs],frames); // frames
for(I ix = 0; ix < Vectors(); ++ix) {
- Ref &r = Vector(ix);
- flext::SetSymbol((*ret)[voffs+1+ix*3],r.Symbol().Symbol()); // buf
- flext::SetInt((*ret)[voffs+2+ix*3],r.Offset()); // offs
- flext::SetInt((*ret)[voffs+3+ix*3],r.Channel()); // chn
+ const Ref &r = Vector(ix);
+ flext::SetSymbol(ret[voffs+1+ix*3],r.Symbol().Symbol()); // buf
+ flext::SetInt(ret[voffs+2+ix*3],r.Offset()); // offs
+ flext::SetInt(ret[voffs+3+ix*3],r.Channel()); // chn
}
+}
+
+// generate Vasp list of buffer references
+flext::AtomList *Vasp::MakeList(BL withvasp) const
+{
+ flext::AtomList *ret = new flext::AtomList;
+ MakeList(*ret,withvasp);
return ret;
}
diff --git a/externals/grill/vasp/source/vasp.h b/externals/grill/vasp/source/vasp.h
index ab4530c7..94e1ad73 100644
--- a/externals/grill/vasp/source/vasp.h
+++ b/externals/grill/vasp/source/vasp.h
@@ -125,7 +125,9 @@ public:
VBuffer *ImBuffer() const { return Buffer(1); }
// prepare and reference t_atom list for output
- flext::AtomList *MakeList(BL withvasp = true);
+ V MakeList(flext::AtomList &ret,BL withvasp = true) const;
+ // prepare and reference t_atom list for output
+ flext::AtomList *MakeList(BL withvasp = true) const;
// make a graphical update of all buffers in vasp
V Refresh();
diff --git a/externals/grill/vasp/source/vbuffer.cpp b/externals/grill/vasp/source/vbuffer.cpp
index 137e066c..0308358f 100644
--- a/externals/grill/vasp/source/vbuffer.cpp
+++ b/externals/grill/vasp/source/vbuffer.cpp
@@ -1,3 +1,14 @@
+/*
+
+VASP modular - vector assembling signal processor / objects for Max/MSP and PD
+
+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.
+
+*/
+
+#include "main.h"
#include "vbuffer.h"
#include "buflib.h"
diff --git a/externals/grill/vasp/source/vecblk.cpp b/externals/grill/vasp/source/vecblk.cpp
index 1efc3981..8310cc2f 100644
--- a/externals/grill/vasp/source/vecblk.cpp
+++ b/externals/grill/vasp/source/vecblk.cpp
@@ -1,3 +1,14 @@
+/*
+
+VASP modular - vector assembling signal processor / objects for Max/MSP and PD
+
+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.
+
+*/
+
+#include "main.h"
#include "vecblk.h"
//#include <math.h>