SHOW:
|
|
- or go back to the newest paste.
1 | // C++ standard includes | |
2 | #include <string> | |
3 | #include <vector> | |
4 | ||
5 | // 3rd party lib includes | |
6 | #include <boost/thread.hpp> | |
7 | ||
8 | // project dependencies | |
9 | #include "anything.hpp" | |
10 | ||
11 | namespace test | |
12 | { | |
13 | namespace subNamespace | |
14 | { | |
15 | ||
16 | enum MyEnum | |
17 | { | |
18 | E_ONE, | |
19 | E_TWO, | |
20 | E_THREE | |
21 | } | |
22 | ||
23 | - | class Example |
23 | + | class Example : public MyAwesomeBaseClass |
24 | { | |
25 | private: | |
26 | int m_myNumber; | |
27 | Example *m_next; | |
28 | ||
29 | void m_reset(); | |
30 | bool m_test(Demo *myObj, int crit); | |
31 | ||
32 | protected: | |
33 | string s_testShared; | |
34 | ||
35 | bool s_sharedFunction(); | |
36 | ||
37 | public: | |
38 | Demo(); | |
39 | ~Demo(); | |
40 | ||
41 | void setMyNumber(int newValue); | |
42 | size_t getCount(); | |
43 | } | |
44 | ||
45 | size_t | |
46 | Example::getCount() | |
47 | { | |
48 | int anyVariableInFunctionScope; | |
49 | ||
50 | if ( a == b ) | |
51 | return false; | |
52 | ||
53 | for ( int i = 0; i < 25; i += a ) | |
54 | { | |
55 | anything(); | |
56 | } | |
57 | ||
58 | int i = 0; | |
59 | while ( i < 25 ) | |
60 | { | |
61 | anything(); | |
62 | ||
63 | i += a; | |
64 | } | |
65 | ||
66 | int i = 0; | |
67 | do | |
68 | { | |
69 | anything(); | |
70 | ||
71 | i += a; | |
72 | } while ( i < 25 ); | |
73 | ||
74 | return b; | |
75 | } | |
76 | ||
77 | } | |
78 | } | |
79 | ||
80 | using namespace test::subNamespace; | |
81 | ||
82 | example = new Example(); | |
83 | myExampleCopy = example; |