File: objtab.C

package info (click to toggle)
flying 6.20-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 752 kB
  • ctags: 1,873
  • sloc: cpp: 10,966; makefile: 189
file content (37 lines) | stat: -rw-r--r-- 523 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef _global_h
#	include "global.h"
#endif

#ifndef _objtab_h
#	include "objtab.h"
#endif


void ObjTab::Init(int size_val) {
int i;

	size = size_val;
	obj  = new Object*[size];
	time = new Real[size];
	for (i=0;i<size;i++) {
		obj[i]=0L;
		time[i]=MAX_TIME;
	}
#if (!DIRECT_ACCESS)
	ind  = new unsigned[size];
	new_ind = new unsigned[size];
	for (i=0;i<size;i++) {
		ind[i]=i;
	}
#endif
}

ObjTab::~ObjTab() {
	delete [] obj;
	delete [] time;
#if (!DIRECT_ACCESS)
	delete [size] ind;
	delete [size] new_ind;
#endif

}