aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/vasp/source
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2002-12-28 04:37:42 +0000
committerThomas Grill <xovo@users.sourceforge.net>2002-12-28 04:37:42 +0000
commit562dcc336797951b2a8707413aa44177484c9f2a (patch)
tree162adc736d99b6edf4c03e50061831006ac0f5c4 /externals/grill/vasp/source
parent7b0d76e0a6c7b58f6a7a373755c46bde52ebea79 (diff)
""
svn path=/trunk/; revision=309
Diffstat (limited to 'externals/grill/vasp/source')
-rw-r--r--externals/grill/vasp/source/classes.cpp78
-rw-r--r--externals/grill/vasp/source/classes.h16
-rwxr-xr-xexternals/grill/vasp/source/obj_chns.cpp10
-rw-r--r--externals/grill/vasp/source/obj_frames.cpp17
-rw-r--r--externals/grill/vasp/source/obj_imm.cpp9
-rw-r--r--externals/grill/vasp/source/obj_offs.cpp9
-rw-r--r--externals/grill/vasp/source/obj_part.cpp11
-rw-r--r--externals/grill/vasp/source/obj_peaks.cpp9
-rw-r--r--externals/grill/vasp/source/obj_radio.cpp7
-rw-r--r--externals/grill/vasp/source/obj_size.cpp18
-rw-r--r--externals/grill/vasp/source/obj_split.cpp20
-rw-r--r--externals/grill/vasp/source/obj_sync.cpp15
-rw-r--r--externals/grill/vasp/source/obj_vasp.cpp13
-rw-r--r--externals/grill/vasp/source/obj_vecs.cpp9
-rw-r--r--externals/grill/vasp/source/ops_rearr.cpp7
-rw-r--r--externals/grill/vasp/source/ops_resmp.cpp9
-rw-r--r--externals/grill/vasp/source/ops_search.cpp9
17 files changed, 170 insertions, 96 deletions
diff --git a/externals/grill/vasp/source/classes.cpp b/externals/grill/vasp/source/classes.cpp
index 78c6a0ca..801826dd 100644
--- a/externals/grill/vasp/source/classes.cpp
+++ b/externals/grill/vasp/source/classes.cpp
@@ -24,7 +24,7 @@ const t_symbol *vasp_base::sym_double;
const t_symbol *vasp_base::sym_complex;
const t_symbol *vasp_base::sym_vector;
-V vasp_base::setup(t_class *)
+V vasp_base::Setup(t_class *c)
{
sym_radio = MakeSymbol("radio");
sym_vasp = MakeSymbol("vasp");
@@ -32,22 +32,22 @@ V vasp_base::setup(t_class *)
sym_double = MakeSymbol("double");
sym_complex = MakeSymbol("complex");
sym_vector = MakeSymbol("vector");
-}
-vasp_base::vasp_base():
- refresh(false),argchk(false),
- unit(xsu_sample),loglvl(0)
-{
- FLEXT_ADDMETHOD_(0,"radio",m_radio);
+ FLEXT_CADDMETHOD_(c,0,"radio",m_radio);
// LATER!
/*
- FLEXT_ADDATTR_VAR1("argchk",argchk);
- FLEXT_ADDATTR_VAR1("loglvl",loglvl);
- FLEXT_ADDATTR_VAR1_E("unit",unit);
+ FLEXT_CADDATTR_VAR1(c,"argchk",argchk);
+ FLEXT_CADDATTR_VAR1(c,"loglvl",loglvl);
+ FLEXT_CADDATTR_VAR1_E(c,"unit",unit);
*/
}
+vasp_base::vasp_base():
+ refresh(false),argchk(false),
+ unit(xsu_sample),loglvl(0)
+{}
+
vasp_base::~vasp_base() {}
@@ -91,20 +91,24 @@ vasp_op::vasp_op(BL op)
// ,thrid(0)
#endif
{
- FLEXT_ADDBANG(0,m_dobang);
- FLEXT_ADDMETHOD_(0,"vasp",m_vasp);
- FLEXT_ADDMETHOD_(0,"set",m_set);
-
- FLEXT_ADDATTR_VAR("ref",m_getref,m_setref);
if(op) FLEXT_ADDATTR_VAR("to",m_getto,m_setto);
+}
+
+V vasp_op::Setup(t_class *c)
+{
+ FLEXT_CADDBANG(c,0,m_dobang);
+ FLEXT_CADDMETHOD_(c,0,"vasp",m_vasp);
+ FLEXT_CADDMETHOD_(c,0,"set",m_set);
+
+ FLEXT_CADDATTR_VAR(c,"ref",m_getref,m_setref);
- FLEXT_ADDMETHOD_(0,"stop",m_stop);
+ FLEXT_CADDMETHOD_(c,0,"stop",m_stop);
- FLEXT_ADDATTR_VAR("update",m_getupd,m_setupd);
+ FLEXT_CADDATTR_VAR(c,"update",m_getupd,m_setupd);
#ifdef FLEXT_THREADS
- FLEXT_ADDATTR_VAR1("detach",detach);
- FLEXT_ADDATTR_VAR1("prior",prior);
+ FLEXT_CADDATTR_VAR1(c,"detach",detach);
+ FLEXT_CADDATTR_VAR1(c,"prior",prior);
#endif
}
@@ -252,18 +256,21 @@ vasp_binop::vasp_binop(I argc,const t_atom *argv,const Argument &def,BL op,UL ou
AddInAnything(2);
AddOutAnything(1);
AddOutlets(outcode);
+}
- FLEXT_ADDMETHOD(1,a_list);
- FLEXT_ADDMETHOD_(1,"vasp",a_vasp);
- FLEXT_ADDMETHOD_(1,"env",a_env);
- FLEXT_ADDMETHOD_(1,"float",a_float);
- FLEXT_ADDMETHOD_(1,"double",a_double);
- FLEXT_ADDMETHOD_(1,"int",a_int);
- 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::Setup(t_class *c)
+{
+ FLEXT_CADDMETHOD(c,1,a_list);
+ FLEXT_CADDMETHOD_(c,1,"vasp",a_vasp);
+ FLEXT_CADDMETHOD_(c,1,"env",a_env);
+ FLEXT_CADDMETHOD_(c,1,"float",a_float);
+ FLEXT_CADDMETHOD_(c,1,"double",a_double);
+ FLEXT_CADDMETHOD_(c,1,"int",a_int);
+ FLEXT_CADDMETHOD_(c,1,"complex",a_complex);
+ FLEXT_CADDMETHOD_(c,1,"vector",a_vector);
+ FLEXT_CADDMETHOD_(c,1,"radio",a_radio);
+
+ FLEXT_CADDATTR_VAR(c,"arg",m_getarg,m_setarg);
}
V vasp_binop::a_list(I argc,const t_atom *argv)
@@ -374,12 +381,15 @@ vasp_anyop::vasp_anyop(I argc,const t_atom *argv,const Argument &def,BL op,UL ou
AddInAnything(2);
AddOutAnything(1);
AddOutlets(outcode);
+}
- FLEXT_ADDMETHOD(1,a_list);
- FLEXT_ADDMETHOD_(1,"vasp",a_list);
- FLEXT_ADDMETHOD_(1,"radio",a_radio);
+V vasp_anyop::Setup(t_class *c)
+{
+ FLEXT_CADDMETHOD(c,1,a_list);
+ FLEXT_CADDMETHOD_(c,1,"vasp",a_list);
+ FLEXT_CADDMETHOD_(c,1,"radio",a_radio);
- FLEXT_ADDATTR_VAR("arg",m_getarg,m_setarg);
+ FLEXT_CADDATTR_VAR(c,"arg",m_getarg,m_setarg);
}
V vasp_anyop::a_list(I argc,const t_atom *argv)
diff --git a/externals/grill/vasp/source/classes.h b/externals/grill/vasp/source/classes.h
index c032abd7..1ef17a3f 100644
--- a/externals/grill/vasp/source/classes.h
+++ b/externals/grill/vasp/source/classes.h
@@ -18,7 +18,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
class vasp_base:
public flext_base
{
- FLEXT_HEADER_S(vasp_base,flext_base,setup)
+ FLEXT_HEADER_S(vasp_base,flext_base,Setup)
public:
enum xs_unit {
@@ -54,7 +54,7 @@ protected:
BL ToOutVasp(I outlet,Vasp &v);
private:
- static V setup(t_class *);
+ static V Setup(t_class *);
FLEXT_CALLBACK_V(m_radio)
@@ -67,7 +67,7 @@ private:
class vasp_op:
public vasp_base
{
- FLEXT_HEADER(vasp_op,vasp_base)
+ FLEXT_HEADER_S(vasp_op,vasp_base,Setup)
protected:
vasp_op(BL withto = false);
@@ -128,6 +128,8 @@ protected:
#endif
private:
+ static V Setup(t_class *);
+
virtual V m_bang() = 0; // do! and output current Vasp
};
@@ -173,7 +175,7 @@ protected:
class vasp_binop:
public vasp_tx
{
- FLEXT_HEADER(vasp_binop,vasp_tx)
+ FLEXT_HEADER_S(vasp_binop,vasp_tx,Setup)
protected:
vasp_binop(I argc,const t_atom *argv,const Argument &def = Argument(),BL withto = false,UL outcode = 0);
@@ -199,6 +201,8 @@ protected:
V m_getarg(AtomList &l) { arg.MakeList(l); }
private:
+ static V Setup(t_class *);
+
FLEXT_CALLBACK_V(a_list)
FLEXT_CALLBACK_V(a_vasp)
FLEXT_CALLBACK_V(a_env)
@@ -218,7 +222,7 @@ private:
class vasp_anyop:
public vasp_tx
{
- FLEXT_HEADER(vasp_anyop,vasp_tx)
+ FLEXT_HEADER_S(vasp_anyop,vasp_tx,Setup)
protected:
vasp_anyop(I argc,const t_atom *argv,const Argument &def = Argument(),BL withto = false,UL outcode = 0);
@@ -237,6 +241,8 @@ protected:
V m_getarg(AtomList &l) { arg.MakeList(l); }
private:
+ static V Setup(t_class *);
+
FLEXT_CALLBACK_V(a_list)
FLEXT_CALLBACK_V(a_radio)
diff --git a/externals/grill/vasp/source/obj_chns.cpp b/externals/grill/vasp/source/obj_chns.cpp
index facfe5fe..b8c2affc 100755
--- a/externals/grill/vasp/source/obj_chns.cpp
+++ b/externals/grill/vasp/source/obj_chns.cpp
@@ -26,7 +26,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
class vasp_channel:
public vasp_tx
{
- FLEXT_HEADER(vasp_channel,vasp_tx)
+ FLEXT_HEADER_S(vasp_channel,vasp_tx,Setup)
public:
vasp_channel(I argc,t_atom *argv):
@@ -39,9 +39,12 @@ public:
AddInAnything(2);
AddOutAnything();
+ }
- FLEXT_ADDMETHOD(1,m_ix);
- FLEXT_ADDATTR_VAR("index",ix,m_ix);
+ static V Setup(t_class *c)
+ {
+ FLEXT_CADDMETHOD(c,1,m_ix);
+ FLEXT_CADDATTR_VAR(c,"index",ix,m_ix);
}
V m_ix(I i) { ix = i; }
@@ -90,7 +93,6 @@ public:
{
AddInAnything();
AddOutInt();
- SetupInOut();
}
virtual V m_bang()
diff --git a/externals/grill/vasp/source/obj_frames.cpp b/externals/grill/vasp/source/obj_frames.cpp
index c50d5019..9f6b54a7 100644
--- a/externals/grill/vasp/source/obj_frames.cpp
+++ b/externals/grill/vasp/source/obj_frames.cpp
@@ -29,7 +29,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
class vasp_frames:
public vasp_tx
{
- FLEXT_HEADER(vasp_frames,vasp_tx)
+ FLEXT_HEADER_S(vasp_frames,vasp_tx,Setup)
public:
vasp_frames(I argc,t_atom *argv,BL abs = true):
@@ -45,10 +45,14 @@ public:
AddInFloat();
AddOutAnything();
- FLEXT_ADDMETHOD(1,m_arg);
if(abs) FLEXT_ADDATTR_VAR("frames",frms,m_arg);
}
+ static V Setup(t_class *c)
+ {
+ FLEXT_CADDMETHOD(c,1,m_arg);
+ }
+
virtual V m_arg(F f)
{
frms = (I)f; //! \todo unit processing
@@ -127,14 +131,18 @@ FLEXT_LIB_V("vasp, vasp.frames+ vasp.f+",vasp_dframes)
class vasp_mframes:
public vasp_frames
{
- FLEXT_HEADER(vasp_mframes,vasp_frames)
+ FLEXT_HEADER_S(vasp_mframes,vasp_frames,Setup)
public:
vasp_mframes(I argc,t_atom *argv):
vasp_frames(argc,argv,false)
{
if(argc && CanbeFloat(argv[0])) m_arg(GetAFloat(argv[0]));
- FLEXT_ADDATTR_VAR("factor",factor,m_arg);
+ }
+
+ static V Setup(t_class *c)
+ {
+ FLEXT_CADDATTR_VAR(c,"factor",factor,m_arg);
}
virtual Vasp *x_work()
@@ -221,7 +229,6 @@ public:
{
AddInAnything();
AddOutInt();
- SetupInOut();
}
virtual V m_bang() { ToOutInt(0,ref.ChkFrames()); } //! \todo unit processing
diff --git a/externals/grill/vasp/source/obj_imm.cpp b/externals/grill/vasp/source/obj_imm.cpp
index 9ea9791a..4d4000d2 100644
--- a/externals/grill/vasp/source/obj_imm.cpp
+++ b/externals/grill/vasp/source/obj_imm.cpp
@@ -34,7 +34,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
class vasp_imm:
public vasp_op
{
- FLEXT_HEADER(vasp_imm,vasp_op)
+ FLEXT_HEADER_S(vasp_imm,vasp_op,Setup)
public:
vasp_imm(I argc,t_atom *argv):
@@ -48,9 +48,12 @@ public:
AddInAnything();
AddInInt();
AddOutAnything();
+ }
- FLEXT_ADDMETHOD(1,m_frames);
- FLEXT_ADDATTR_VAR("frames",frms,m_frames);
+ static V Setup(t_class *c)
+ {
+ FLEXT_CADDMETHOD(c,1,m_frames);
+ FLEXT_CADDATTR_VAR(c,"frames",frms,m_frames);
}
V m_frames(I n) { frms = n; }
diff --git a/externals/grill/vasp/source/obj_offs.cpp b/externals/grill/vasp/source/obj_offs.cpp
index 07bf1982..6ecfeefd 100644
--- a/externals/grill/vasp/source/obj_offs.cpp
+++ b/externals/grill/vasp/source/obj_offs.cpp
@@ -30,7 +30,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
class vasp_offset:
public vasp_tx
{
- FLEXT_HEADER(vasp_offset,vasp_tx)
+ FLEXT_HEADER_S(vasp_offset,vasp_tx,Setup)
public:
vasp_offset(I argc,t_atom *argv):
@@ -44,9 +44,12 @@ public:
AddInAnything();
AddInFloat();
AddOutAnything();
+ }
- FLEXT_ADDMETHOD(1,m_offs);
- FLEXT_ADDATTR_VAR("frames",offs,m_offs);
+ static V Setup(t_class *c)
+ {
+ FLEXT_CADDMETHOD(c,1,m_offs);
+ FLEXT_CADDATTR_VAR(c,"frames",offs,m_offs);
}
V m_offs(F o)
diff --git a/externals/grill/vasp/source/obj_part.cpp b/externals/grill/vasp/source/obj_part.cpp
index f1ecf354..5f0e652b 100644
--- a/externals/grill/vasp/source/obj_part.cpp
+++ b/externals/grill/vasp/source/obj_part.cpp
@@ -31,7 +31,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
class vasp_part:
public vasp_op
{
- FLEXT_HEADER(vasp_part,vasp_op)
+ FLEXT_HEADER_S(vasp_part,vasp_op,Setup)
public:
vasp_part(I argc,t_atom *argv):
@@ -41,13 +41,16 @@ public:
AddInAnything(2);
AddOutAnything(2);
-
- FLEXT_ADDMETHOD_(1,"list",m_part);
- FLEXT_ADDATTR_VAR("parts",m_getpart,m_setpart);
}
~vasp_part() { if(part) delete[] part; }
+ static V Setup(t_class *c)
+ {
+ FLEXT_CADDMETHOD_(c,1,"list",m_part);
+ FLEXT_CADDATTR_VAR(c,"parts",m_getpart,m_setpart);
+ }
+
V m_part(I argc,const t_atom *argv)
{
if(part) delete[] part; parts = 0;
diff --git a/externals/grill/vasp/source/obj_peaks.cpp b/externals/grill/vasp/source/obj_peaks.cpp
index bade1ff1..003acfaa 100644
--- a/externals/grill/vasp/source/obj_peaks.cpp
+++ b/externals/grill/vasp/source/obj_peaks.cpp
@@ -31,7 +31,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
class vasp_qpeaks:
public vasp_op
{
- FLEXT_HEADER(vasp_qpeaks,vasp_op)
+ FLEXT_HEADER_S(vasp_qpeaks,vasp_op,Setup)
public:
vasp_qpeaks(I argc,t_atom *argv):
@@ -45,9 +45,12 @@ public:
AddInAnything();
AddInInt();
AddOutAnything(2);
+ }
- FLEXT_ADDMETHOD(1,m_peaks);
- FLEXT_ADDATTR_VAR("peaks",peaks,m_peaks);
+ static V Setup(t_class *c)
+ {
+ FLEXT_CADDMETHOD(c,1,m_peaks);
+ FLEXT_CADDATTR_VAR(c,"peaks",peaks,m_peaks);
}
V m_peaks(I n) { peaks = n; }
diff --git a/externals/grill/vasp/source/obj_radio.cpp b/externals/grill/vasp/source/obj_radio.cpp
index d0c2452e..a3fde97c 100644
--- a/externals/grill/vasp/source/obj_radio.cpp
+++ b/externals/grill/vasp/source/obj_radio.cpp
@@ -27,7 +27,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
class vasp_radio:
public flext_base
{
- FLEXT_HEADER(vasp_radio,flext_base)
+ FLEXT_HEADER_S(vasp_radio,flext_base,Setup)
public:
@@ -35,8 +35,11 @@ public:
{
AddInAnything();
AddOutAnything(2);
+ }
- FLEXT_ADDMETHOD(0,m_any);
+ static V Setup(t_class *c)
+ {
+ FLEXT_CADDMETHOD(c,0,m_any);
}
virtual V m_any(const t_symbol *s,I argc,t_atom *argv);
diff --git a/externals/grill/vasp/source/obj_size.cpp b/externals/grill/vasp/source/obj_size.cpp
index 1d28b1cb..b061824b 100644
--- a/externals/grill/vasp/source/obj_size.cpp
+++ b/externals/grill/vasp/source/obj_size.cpp
@@ -30,7 +30,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
class vasp_size:
public vasp_tx
{
- FLEXT_HEADER(vasp_size,vasp_tx)
+ FLEXT_HEADER_S(vasp_size,vasp_tx,Setup)
public:
vasp_size(I argc,t_atom *argv,BL abs = true):
@@ -45,9 +45,13 @@ public:
AddInFloat();
AddOutAnything();
- FLEXT_ADDMETHOD(1,m_arg);
if(abs) FLEXT_ADDATTR_VAR("frames",size,m_arg);
- FLEXT_ADDATTR_VAR1("keep",keep);
+ }
+
+ static V Setup(t_class *c)
+ {
+ FLEXT_CADDMETHOD(c,1,m_arg);
+ FLEXT_CADDATTR_VAR1(c,"keep",keep);
}
virtual V m_arg(F s)
@@ -129,14 +133,18 @@ FLEXT_LIB_V("vasp, vasp.size+ vasp.s+",vasp_dsize)
class vasp_msize:
public vasp_size
{
- FLEXT_HEADER(vasp_msize,vasp_size)
+ FLEXT_HEADER_S(vasp_msize,vasp_size,Setup)
public:
vasp_msize(I argc,t_atom *argv):
vasp_size(argc,argv,false)
{
if(argc && CanbeFloat(argv[0])) m_arg(GetAFloat(argv[0]));
- FLEXT_ADDATTR_VAR("factor",factor,m_arg);
+ }
+
+ static V Setup(t_class *c)
+ {
+ FLEXT_CADDATTR_VAR(c,"factor",factor,m_arg);
}
virtual Vasp *x_work()
diff --git a/externals/grill/vasp/source/obj_split.cpp b/externals/grill/vasp/source/obj_split.cpp
index e308e19c..8a3dda94 100644
--- a/externals/grill/vasp/source/obj_split.cpp
+++ b/externals/grill/vasp/source/obj_split.cpp
@@ -95,7 +95,7 @@ FLEXT_LIB_V("vasp, vasp.split",vasp_split)
class vasp_join:
public vasp_tx
{
- FLEXT_HEADER(vasp_join,vasp_tx)
+ FLEXT_HEADER_S(vasp_join,vasp_tx,Setup)
public:
vasp_join(I argc,t_atom *argv):
@@ -115,12 +115,15 @@ public:
AddInAnything(cnt);
AddOutAnything();
-
- FLEXT_ADDMETHOD_(0,"reset",m_reset);
}
~vasp_join() { if(vi) delete[] vi; }
+ static V Setup(t_class *c)
+ {
+ FLEXT_CADDMETHOD_(c,0,"reset",m_reset);
+ }
+
virtual Vasp *x_work() {
CVasp *ret = new CVasp(ref);
for(I i = 0; i < cnt-1; ++i) if(vi[i]) *ret += *vi[i];
@@ -231,7 +234,7 @@ FLEXT_LIB_V("vasp, vasp.spit",vasp_spit)
class vasp_gather:
public vasp_tx
{
- FLEXT_HEADER(vasp_gather,vasp_tx)
+ FLEXT_HEADER_S(vasp_gather,vasp_tx,Setup)
public:
vasp_gather(I argc,t_atom *argv)
@@ -246,12 +249,13 @@ public:
AddInAnything(2);
AddOutAnything();
-
- FLEXT_ADDMETHOD_(0,"reset",m_reset);
- FLEXT_ADDMETHOD_(1,"vasp",m_add);
}
- ~vasp_gather() { }
+ static V Setup(t_class *c)
+ {
+ FLEXT_CADDMETHOD_(c,0,"reset",m_reset);
+ FLEXT_CADDMETHOD_(c,1,"vasp",m_add);
+ }
virtual Vasp *x_work()
{
diff --git a/externals/grill/vasp/source/obj_sync.cpp b/externals/grill/vasp/source/obj_sync.cpp
index 9d6e3610..a8726328 100644
--- a/externals/grill/vasp/source/obj_sync.cpp
+++ b/externals/grill/vasp/source/obj_sync.cpp
@@ -31,7 +31,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
class vasp_sync:
public vasp_op
{
- FLEXT_HEADER(vasp_sync,vasp_op)
+ FLEXT_HEADER_S(vasp_sync,vasp_op,Setup)
public:
vasp_sync(I argc,t_atom *argv):
@@ -52,12 +52,19 @@ public:
AddInAnything(cnt);
AddOutAnything(cnt);
+ }
- FLEXT_ADDMETHOD_(0,"reset",m_reset);
-
+ static V Setup(t_class *c)
+ {
+ FLEXT_CADDMETHOD_(c,0,"reset",m_reset);
}
- virtual BL Init() { BL ret = vasp_op::Init(); m_reset(); return ret; }
+ virtual BL Init()
+ {
+ BL ret = vasp_op::Init();
+ m_reset();
+ return ret;
+ }
~vasp_sync()
{
diff --git a/externals/grill/vasp/source/obj_vasp.cpp b/externals/grill/vasp/source/obj_vasp.cpp
index 680bede7..2b4319c3 100644
--- a/externals/grill/vasp/source/obj_vasp.cpp
+++ b/externals/grill/vasp/source/obj_vasp.cpp
@@ -32,7 +32,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
class vasp_v:
public vasp_tx
{
- FLEXT_HEADER(vasp_v,vasp_tx)
+ FLEXT_HEADER_S(vasp_v,vasp_tx,Setup)
public:
@@ -42,12 +42,15 @@ public:
AddInAnything(2);
AddOutAnything();
+ }
- FLEXT_ADDMETHOD_(0,"list",m_vasp);
+ static V Setup(t_class *c)
+ {
+ FLEXT_CADDMETHOD_(c,0,"list",m_vasp);
- FLEXT_ADDMETHOD_(1,"list",m_set);
- FLEXT_ADDMETHOD_(1,"vasp",m_set);
- FLEXT_ADDMETHOD_(1,"radio",a_radio);
+ FLEXT_CADDMETHOD_(c,1,"list",m_set);
+ FLEXT_CADDMETHOD_(c,1,"vasp",m_set);
+ FLEXT_CADDMETHOD_(c,1,"radio",a_radio);
}
V a_radio(I,t_atom *) {}
diff --git a/externals/grill/vasp/source/obj_vecs.cpp b/externals/grill/vasp/source/obj_vecs.cpp
index 3c0db9f5..2806a806 100644
--- a/externals/grill/vasp/source/obj_vecs.cpp
+++ b/externals/grill/vasp/source/obj_vecs.cpp
@@ -30,7 +30,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
class vasp_vector:
public vasp_tx
{
- FLEXT_HEADER(vasp_vector,vasp_tx)
+ FLEXT_HEADER_S(vasp_vector,vasp_tx,Setup)
public:
vasp_vector(I argc,t_atom *argv):
@@ -43,9 +43,12 @@ public:
AddInAnything(2);
AddOutAnything();
+ }
- FLEXT_ADDMETHOD(1,m_ix);
- FLEXT_ADDATTR_VAR("index",ix,m_ix);
+ static V Setup(t_class *c)
+ {
+ FLEXT_CADDMETHOD(c,1,m_ix);
+ FLEXT_CADDATTR_VAR(c,"index",ix,m_ix);
}
V m_ix(I i) { ix = i; }
diff --git a/externals/grill/vasp/source/ops_rearr.cpp b/externals/grill/vasp/source/ops_rearr.cpp
index 0da06cfd..b7712115 100644
--- a/externals/grill/vasp/source/ops_rearr.cpp
+++ b/externals/grill/vasp/source/ops_rearr.cpp
@@ -99,14 +99,17 @@ BL VecOp::d_shift(OpParam &p)
class vasp_shift:
public vasp_anyop
{
- FLEXT_HEADER(vasp_shift,vasp_anyop)
+ FLEXT_HEADER_S(vasp_shift,vasp_anyop,Setup)
public:
vasp_shift(I argc,const t_atom *argv):
vasp_anyop(argc,argv,VASP_ARG_I(0),true),
fill(xsf_zero)
+ {}
+
+ static V Setup(t_class *c)
{
- FLEXT_ADDATTR_VAR1_E("fill",fill);
+ FLEXT_CADDATTR_VAR1_E(c,"fill",fill);
}
enum xs_fill {
diff --git a/externals/grill/vasp/source/ops_resmp.cpp b/externals/grill/vasp/source/ops_resmp.cpp
index 0c578284..e7e33bb9 100644
--- a/externals/grill/vasp/source/ops_resmp.cpp
+++ b/externals/grill/vasp/source/ops_resmp.cpp
@@ -201,15 +201,18 @@ Vasp *VaspOp::m_tilt(OpParam &p,CVasp &src,const Argument &arg,CVasp *dst,BL sym
class vasp_tilt:
public vasp_anyop
{
- FLEXT_HEADER(vasp_tilt,vasp_anyop)
+ FLEXT_HEADER_S(vasp_tilt,vasp_anyop,Setup)
public:
vasp_tilt(I argc,t_atom *argv):
vasp_anyop(argc,argv,VASP_ARG_R(1),true),
fill(xtf_zero),inter(xti_4p)
+ {}
+
+ static V Setup(t_class *c)
{
- FLEXT_ADDATTR_VAR1_E("fill",fill);
- FLEXT_ADDATTR_VAR1_E("inter",inter);
+ FLEXT_CADDATTR_VAR1_E(c,"fill",fill);
+ FLEXT_CADDATTR_VAR1_E(c,"inter",inter);
}
enum xt_fill {
diff --git a/externals/grill/vasp/source/ops_search.cpp b/externals/grill/vasp/source/ops_search.cpp
index 6401f558..580a4d1b 100644
--- a/externals/grill/vasp/source/ops_search.cpp
+++ b/externals/grill/vasp/source/ops_search.cpp
@@ -128,15 +128,18 @@ Vasp *VaspOp::m_search(OpParam &p,CVasp &src,const Argument &arg,CVasp *dst,BL s
class vasp_search:
public vasp_anyop
{
- FLEXT_HEADER(vasp_search,vasp_anyop)
+ FLEXT_HEADER_S(vasp_search,vasp_anyop,Setup)
public:
vasp_search(I argc,t_atom *argv):
vasp_anyop(argc,argv,VASP_ARG_R(0),false,XletCode(xlet::tp_float,0)),
slope(0),dir(0)
+ {}
+
+ static V Setup(t_class *c)
{
- FLEXT_ADDATTR_VAR1("dir",dir);
- FLEXT_ADDATTR_VAR1("slope",slope);
+ FLEXT_CADDATTR_VAR1(c,"dir",dir);
+ FLEXT_CADDATTR_VAR1(c,"slope",slope);
}
virtual Vasp *do_work(OpParam &p) = 0;