File: IStructure.cpp

package info (click to toggle)
eclipse-cdt 9.9.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 145,456 kB
  • sloc: java: 1,114,843; xml: 64,727; javascript: 18,756; cpp: 5,269; ansic: 3,171; makefile: 1,508; asm: 814; sh: 295; f90: 22; python: 5
file content (90 lines) | stat: -rw-r--r-- 1,423 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// IStructure
struct testStruct1 {
	char m_field1;
	char* m_field2;
	unsigned char m_field3;
	int m_field4;
	unsigned m_field5;
	void* m_field6;
	
	void method1();
	struct testStruct1 method2( char* in_field2, int in_field4 ) {}
	// this is very C++:
	testStruct1( char* in_field2, int in_field4 ) {}
	~testStruct1() {}
};

struct testStruct2 {
};

struct testStruct3 {
} aTestStruct3;

// no semicolon, parser should recover
struct testStruct4NoSemicolon {
}

// forward declaration
struct testStruct5;

// variable declaration using predefined struct.
struct testStruct6 aTestStruct6;

struct {
	int x;
} testAnonymousStructObject1;

struct {
	int x;
} testAnonymousStructObject2= {1};

// to resync the parser if necessary
struct testStruct7 {
};

// an inner struct
struct testStruct8 {
	struct testStruct9Inner {
		int x;
	};
	struct testStruct10Inner {
		int y;
		struct testStruct11Inner {
			int z;
		};
	};
};

union testUnion1 {
	char m_field1;
	char* m_field2;
	unsigned char m_field3;
	int m_field4;
	unsigned m_field5;
	void* m_field6;	
};

class testClass1 {
};

class testClass2NoSemicolon {
}

class catchTheSyntaxError;

class testClass3 {
};

class testClass4Abstract {
	void aNonVirtual();
	virtual void aVirtual();
	virtual void aPureVirtual()=0;
};

class testClass5
: public testClass1, protected testClass3, private testClass4Abstract {
};

// to resync the parser if necessary
class testClass6 {
};