-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdma.h
47 lines (43 loc) · 1.04 KB
/
dma.h
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
38
39
40
41
42
43
44
45
46
47
// dma.h -- inheritance and dynamic memory allocation
#ifndef DMA_H_
#define DMA_H_
#include <iostream>
// Base Class Using DMA
class baseDMA
{
private:
char * label;
int rating;
public:
baseDMA (const char * l = "null", int r = 0);
baseDMA (const baseDMA & rs);
virtual ~baseDMA();
baseDMA & operator= (const baseDMA & rs);
friend std::ostream & operator<< (std::ostream & os, const baseDMA & rs);
};
class lacksDMA: public baseDMA
{
private:
enum {COL_LEN = 40};
char color[COL_LEN];
public:
lacksDMA (const char * c = "blank", const char * l = "null",
int r = 0);
lacksDMA (const char * c, const baseDMA & rs);
friend std::ostream & operator<< (std::ostream & os,
const lacksDMA & rs);
};
class hasDMA: public baseDMA
{
private:
char * style;
public:
hasDMA (const char * s = "none", const char * l = "null",
int r = 0);
hasDMA (const char * s, const baseDMA & rs);
hasDMA (const hasDMA & hs);
~hasDMA();
hasDMA & operator= (const hasDMA & rs);
friend std::ostream & operator<< (std::ostream & os, const hasDMA & rs);
};
#endif