GCC Code Coverage Report


Directory: codebase/
File: codebase/system/include/private/sys.Object.hpp
Date: 2023-03-16 04:37:09
Exec Total Coverage
Lines: 4 4 100.0%
Functions: 2 2 100.0%
Branches: 1 2 50.0%

Line Branch Exec Source
1 /**
2 * @file sys.Object.hpp
3 * @author Sergey Baigudin, sergey@baigudin.software
4 * @copyright 2014-2022, Sergey Baigudin, Baigudin Software
5 */
6 #ifndef SYS_OBJECT_HPP_
7 #define SYS_OBJECT_HPP_
8
9 #include "lib.Object.hpp"
10 #include "sys.Types.hpp"
11
12 namespace eoos
13 {
14 namespace sys
15 {
16
17 /**
18 * @class Object
19 * @brief Root class of the operating system class hierarchy.
20 */
21 class Object : public lib::Object<>
22 {
23 typedef lib::Object<> Parent;
24
25 public:
26
27 /**
28 * @brief Constructor.
29 */
30 1022 Object()
31 1022 : lib::Object<>() {
32 1022 }
33
34 /**
35 * @brief Destructor.
36 */
37
1/2
✓ Branch 1 taken 1021 times.
✗ Branch 2 not taken.
2042 virtual ~Object() {}
38
39 /**
40 * @copydoc eoos::Object::Object(const Object&)
41 */
42 Object(const Object& obj)
43 : lib::Object<>(obj) {
44 }
45
46 /**
47 * @copydoc eoos::Object::operator=(const Object&)
48 */
49 Object& operator=(const Object& obj)
50 {
51 static_cast<void>( Parent::operator=(obj) );
52 return *this;
53 }
54
55 #if EOOS_CPP_STANDARD >= 2011
56
57 /**
58 * @copydoc eoos::Object::Object(const Object&&)
59 */
60 Object(Object&& obj)
61 : lib::Object<>( lib::move(obj) ) {
62 }
63
64 /**
65 * @copydoc eoos::Object::operator=(const Object&&)
66 */
67 Object& operator=(Object&& obj)
68 {
69 Parent::operator=( lib::move(obj) );
70 return *this;
71 }
72
73 #endif // EOOS_CPP_STANDARD >= 2011
74
75 };
76
77 } // namespace sys
78 } // namespace eoos
79 #endif // SYS_OBJECT_HPP_
80