source: cpp/gdk/paramvmobj.h @ 68

Last change on this file since 68 was 68, checked in by Maciej Komosinski, 13 years ago

added missing sources; updated sources for compatibility with vs2008 and added project files

File size: 1.6 KB
Line 
1// This file is a part of the Framsticks GDK library.
2// Copyright (C) 2002-2011  Szymon Ulatowski.  See LICENSE.txt for details.
3// Refer to http://www.framsticks.com/ for further information.
4
5#ifndef _PARAMVMOBJ_H_
6#define _PARAMVMOBJ_H_
7
8#include "param.h"
9#include "extvalue.h"
10
11class ParamVMObj: public DestrBase
12{
13ParamInterface *iface;
14  public:
15Param par;
16ParamVMObj(ParamInterface *pi=0);
17static ExtObject makeObject(ParamInterface *pi);
18int findGroupId(const char* name);
19#define STATRICKCLASS ParamVMObj
20PARAMGETDEF(name) {arg1->setString(iface->getName());}
21PARAMGETDEF(props) {arg1->setInt(iface->getPropCount());}
22PARAMGETDEF(groups) {arg1->setInt(iface->getGroupCount());}
23PARAMPROCDEF(p_make);
24PARAMPROCDEF(p_get) {iface->get(arg1->getInt(),*arg2);}
25PARAMPROCDEF(p_set) {arg2->setInt(iface->set(arg1[1].getInt(),arg1[0]));}
26PARAMPROCDEF(p_getid) {arg2->setString(iface->id(arg1->getInt()));}
27PARAMPROCDEF(p_getname) {arg2->setString(iface->name(arg1->getInt()));}
28PARAMPROCDEF(p_getgroup)  {arg2->setInt(iface->group(arg1->getInt()));}
29PARAMPROCDEF(p_getgrname)  {arg2->setString(iface->grname(arg1->getInt()));}
30PARAMPROCDEF(p_gettype) {arg2->setString(iface->type(arg1->getInt()));}
31PARAMPROCDEF(p_getflags) {arg2->setInt(iface->flags(arg1->getInt()));}
32PARAMPROCDEF(p_gethelp) {arg2->setString(iface->help(arg1->getInt()));}
33PARAMPROCDEF(p_findid) {arg2->setInt(iface->findId(arg1->getString()));}
34PARAMPROCDEF(p_findgroupid);
35PARAMPROCDEF(p_findidingroup);
36PARAMPROCDEF(p_setDef) {iface->setDefault((int)arg1->getInt());}
37PARAMPROCDEF(p_setAllDef) {iface->setDefault();}
38PARAMPROCDEF(p_call);
39#undef STATRICKCLASS
40};
41
42#endif
Note: See TracBrowser for help on using the repository browser.