Changeset 792 for cpp/frams/param/paramtabobj.h
- Timestamp:
- 05/29/18 16:32:45 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/param/paramtabobj.h
r286 r792 10 10 class ParamTab 11 11 { 12 ParamEntry *tab;13 int siz;14 void init() {siz=0; tab=(ParamEntry*)calloc(sizeof(ParamEntry),1);}15 void resize(int s);16 int measureTab(const ParamEntry *pe);12 ParamEntry *tab; 13 int siz; 14 void init() { siz = 0; tab = (ParamEntry*)calloc(sizeof(ParamEntry), 1); } 15 void resize(int s); 16 int measureTab(const ParamEntry *pe); 17 17 18 19 ParamTab(const ParamEntry* pe=0,int maxcount=-1) {init(); if (pe) add(pe,maxcount);}20 ParamTab(const ParamTab& src) {init(); add(src);}21 ~ParamTab() {clear();}18 public: 19 ParamTab(const ParamEntry* pe = 0, int maxcount = -1) { init(); if (pe) add(pe, maxcount); } 20 ParamTab(const ParamTab& src) { init(); add(src); } 21 ~ParamTab() { clear(); } 22 22 23 int size() const {return siz;}24 ParamEntry* getParamTab() const {return tab;}25 ParamEntry* operator()() const {return tab;}23 int size() const { return siz; } 24 ParamEntry* getParamTab() const { return tab; } 25 ParamEntry* operator()() const { return tab; } 26 26 27 /** @return position of the last added entry */28 int add(const ParamEntry*,int count=1);29 int add(const ParamTab& src) {return add(src.getParamTab(), src.size());}30 void remove(int i,int count=1);31 void clear() {resize(-1);}27 /** @return position of the last added entry */ 28 int add(const ParamEntry*, int count = 1); 29 int add(const ParamTab& src) { return add(src.getParamTab(), src.size()); } 30 void remove(int i, int count = 1); 31 void clear() { resize(-1); } 32 32 }; 33 33
Note: See TracChangeset
for help on using the changeset viewer.