source: cpp/gdk/paramtabobj.h @ 105

Last change on this file since 105 was 66, checked in by Maciej Komosinski, 14 years ago

set 'eol-style' to 'native'

  • Property svn:eol-style set to native
File size: 958 bytes
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 _PARAMTABOBJ_H_
6#define _PARAMTABOBJ_H_
7
8#include "param.h"
9
10class ParamTab
11{
12ParamEntry *tab;
13int siz;
14void init() {siz=0; tab=(ParamEntry*)calloc(sizeof(ParamEntry),1);}
15void resize(int s);
16int measureTab(const ParamEntry *pe);
17
18  public:
19ParamTab(const ParamEntry* pe=0,int maxcount=-1) {init(); if (pe) add(pe,maxcount);}
20ParamTab(const ParamTab& src) {init(); add(src);}
21~ParamTab() {clear();}
22
23int size() const {return siz;}
24ParamEntry* getParamTab() const {return tab;}
25ParamEntry* operator()() const {return tab;}
26
27/** @return position of the last added entry */
28int add(const ParamEntry*,int count=1);
29int add(const ParamTab& src) {return add(src.getParamTab(), src.size());}
30void remove(int i,int count=1);
31void clear() {resize(-1);}
32};
33
34#endif
Note: See TracBrowser for help on using the repository browser.