source: cpp/frams/param/paramlist.h @ 1252

Last change on this file since 1252 was 1250, checked in by Maciej Komosinski, 17 months ago

Added class ParamList? implementing ParamInterface?

File size: 1.4 KB
RevLine 
[1250]1// This file is a part of Framsticks SDK.  http://www.framsticks.com/
2// Copyright (C) 1996-2019  Maciej Komosinski and Szymon Ulatowski.
3// See LICENSE.txt for details.
4
5#ifndef _PARAMLIST_H_
6#define _PARAMLIST_H_
7
8#include "param.h"
9#include <frams/util/list.h>
10
11class ParamList : public ParamInterface
12{
13        SList list;
14        const char *objname;
15        int getSubParam(int i, ParamInterface **sub_p, int *sub_i);
16        int getSubGroup(int i, ParamInterface **sub_p, int *sub_i);
17public:
18
19        ParamList(const char* n = 0, const char* d = 0) :objname(n), description(d) {}
20
21        void operator+=(ParamInterface *p) { list += p; }
22        void operator-=(ParamInterface *p) { list -= p; }
23
24        const char* getName() { return objname; }
25        const char* description;
26        const char* getDescription() { return description; }
27
28        int getGroupCount();
29        int getPropCount();
30
31        const char *id(int i);
32        const char *name(int i);
33        const char *type(int i);
34        const char *help(int i);
35        int flags(int i);
36        int group(int i);
37        void call(int i, ExtValue* args, ExtValue *ret);
38        const char *grname(int i);
39
40        int grmember(int gi, int n);
41
42        SString getString(int);
43        paInt getInt(int);
44        double getDouble(int);
45        ExtValue getExtValue(int);
46        ExtObject getObject(int);
47
48        int setInt(int, paInt);
49        int setDouble(int, double);
50        int setString(int, const SString &);
51        int setObject(int, const ExtObject&);
52        int setExtValue(int, const ExtValue&);
53};
54
55#endif
Note: See TracBrowser for help on using the repository browser.