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 | |
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 | if ( a == b ) | |
49 | return false; | |
50 | ||
51 | for ( int i = 0; i < 25; i += a ) | |
52 | { | |
53 | anything(); | |
54 | } | |
55 | ||
56 | int i = 0; | |
57 | while ( i < 25 ) | |
58 | { | |
59 | anything(); | |
60 | ||
61 | i += a; | |
62 | } | |
63 | ||
64 | int i = 0; | |
65 | do | |
66 | { | |
67 | anything(); | |
68 | ||
69 | i += a; | |
70 | } while ( i < 25 ); | |
71 | ||
72 | return b; | |
73 | } | |
74 | ||
75 | } | |
76 | } | |
77 | ||
78 | using namespace test::subNamespace; | |
79 | ||
80 | example = new Example(); | |
81 | myExampleCopy = example; |