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 : 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); |
41 | + | void setMyNumber(int newValue) throw(); |
42 | size_t getCount(); | |
43 | ||
44 | static int getId(); | |
45 | } | |
46 | ||
47 | size_t | |
48 | Example::getCount() | |
49 | { | |
50 | int anyVariableInFunctionScope; | |
51 | ||
52 | if ( a == b ) | |
53 | return false; | |
54 | ||
55 | for ( int i = 0; i < 25; i += a ) | |
56 | { | |
57 | anything(); | |
58 | } | |
59 | ||
60 | int i = 0; | |
61 | while ( i < 25 ) | |
62 | { | |
63 | anything(); | |
64 | ||
65 | i += a; | |
66 | } | |
67 | ||
68 | int i = 0; | |
69 | do | |
70 | { | |
71 | anything(); | |
72 | ||
73 | i += a; | |
74 | } while ( i < 25 ); | |
75 | ||
76 | return b; | |
77 | } | |
78 | ||
79 | } | |
80 | } | |
81 | ||
82 | using namespace test::subNamespace; | |
83 | ||
84 | example = new Example(); | |
85 | myExampleCopy = example; |