1 /***************************************************************************
2 scriptfunction.h - description
4 begin : Thu Apr 17 2003
5 copyright : (C) 2003 by Jason Harris
6 email : kstars@30doradus.org
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
18 #ifndef SCRIPTFUNCTION_H
19 #define SCRIPTFUNCTION_H
30 ScriptFunction( QString name
, QString desc
, bool clockfcn
=false,
31 QString at1
="", QString an1
="",
32 QString at2
="", QString an2
="",
33 QString at3
="", QString an3
="",
34 QString at4
="", QString an4
="",
35 QString at5
="", QString an5
="",
36 QString at6
="", QString an6
=""
38 ScriptFunction( ScriptFunction
*sf
);
41 QString
name() const { return Name
; }
42 QString
prototype() const;
43 QString
description() const { return Description
; }
44 QString
argType( unsigned int n
) const { return ArgType
[n
]; }
45 QString
argName( unsigned int n
) const { return ArgName
[n
]; }
46 QString
argVal( unsigned int n
) const { return ArgVal
[n
]; }
48 void setValid( bool b
) { Valid
= b
; }
49 bool valid() const { return Valid
; }
51 void setClockFunction( bool b
=true ) { ClockFunction
= b
; }
52 bool isClockFunction() const { return ClockFunction
; }
54 void setArg( unsigned int n
, QString newVal
) { ArgVal
[n
] = newVal
; }
56 unsigned int numArgs() const { return NumArgs
; }
58 QString
scriptLine() const;
60 void setINDIProperty(QString prop
) { INDIProp
= prop
; }
61 QString
INDIProperty() const { return INDIProp
; }
64 QString Name
, Description
;
69 bool Valid
, ClockFunction
;