aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/vasp/source/obj_size.cpp
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2002-12-17 04:36:31 +0000
committerThomas Grill <xovo@users.sourceforge.net>2002-12-17 04:36:31 +0000
commita5b45e8e2e99686ea73fa2793d7fec84f0d1a3ed (patch)
tree4b31406382bacd13aa784ea22d584ac634f8d8ad /externals/grill/vasp/source/obj_size.cpp
parenta0cb0bd2e02740e50ec16dde2fb4e07f1702d1d0 (diff)
""
svn path=/trunk/; revision=303
Diffstat (limited to 'externals/grill/vasp/source/obj_size.cpp')
-rw-r--r--externals/grill/vasp/source/obj_size.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/externals/grill/vasp/source/obj_size.cpp b/externals/grill/vasp/source/obj_size.cpp
index 6c38184c..1d28b1cb 100644
--- a/externals/grill/vasp/source/obj_size.cpp
+++ b/externals/grill/vasp/source/obj_size.cpp
@@ -34,7 +34,7 @@ class vasp_size:
public:
vasp_size(I argc,t_atom *argv,BL abs = true):
- size(0),sets(false)
+ size(0),sets(false),keep(true)
{
if(argc >= 1 && CanbeFloat(argv[0]))
m_arg(GetAFloat(argv[0]));
@@ -47,6 +47,7 @@ public:
FLEXT_ADDMETHOD(1,m_arg);
if(abs) FLEXT_ADDATTR_VAR("frames",size,m_arg);
+ FLEXT_ADDATTR_VAR1("keep",keep);
}
virtual V m_arg(F s)
@@ -58,19 +59,20 @@ public:
virtual Vasp *x_work()
{
Vasp *ret = new Vasp(ref);
- if(sets) ret->Size(size);
+ if(sets) ret->Size(size,keep);
return ret;
}
virtual V m_help() { post("%s - Set the size of the vector buffers",thisName()); }
protected:
I size;
- BL sets;
+ BL sets,keep;
private:
FLEXT_CALLBACK_F(m_arg);
FLEXT_CALLSET_I(m_arg);
FLEXT_ATTRGET_I(size);
+ FLEXT_ATTRVAR_B(keep);
};
FLEXT_LIB_V("vasp, vasp.size vasp.s",vasp_size)
@@ -227,7 +229,7 @@ public:
virtual V m_bang()
{
- if(!ref.Ok())
+ if(!ref.Check())
post("%s - Invalid vasp!",thisName());
else if(ref.Vectors() > 1)
post("%s - More than one vector in vasp!",thisName());