GCC Code Coverage Report


Directory: codebase/
File: codebase/interface/include/public/api.SequenceContainer.hpp
Date: 2023-03-16 04:37:09
Exec Total Coverage
Lines: 1 1 100.0%
Functions: 1 1 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 /**
2 * @file api.SequenceContainer.hpp
3 * @author Sergey Baigudin, sergey@baigudin.software
4 * @copyright 2022, Sergey Baigudin, Baigudin Software
5 */
6 #ifndef API_SEQUENCECONTAINER_HPP_
7 #define API_SEQUENCECONTAINER_HPP_
8
9 #include "api.Collection.hpp"
10
11 namespace eoos
12 {
13 namespace api
14 {
15
16 /**
17 * @class SequenceContainer<T>
18 * @brief Sequence сontainer interface.
19 *
20 * @tparam T Data type of string characters.
21 */
22 template <typename T>
23 class SequenceContainer : public Collection<T>
24 {
25
26 public:
27
28 /**
29 * @brief Destructor.
30 */
31 virtual ~SequenceContainer() = 0;
32
33 /**
34 * @brief Returns pointer to the first element of sequence сontainer.
35 *
36 * @note Be careful, some action with the object might relocate internal buffer
37 * that contains elements. By this reason, a returned address will be actual
38 * until you do not call a non-constant function of this class for an object.
39 *
40 * @return Address of the first element, or NULLPTR if an error occurred.
41 *
42 * @todo Extend this function with constant function declaration as well.
43 */
44 virtual T* getData() const = 0;
45
46 };
47
48 template <typename T> ///< SCA MISRA-C++:2008 Defected Rule 7-3-1
49 130 inline SequenceContainer<T>::~SequenceContainer() {}
50
51 } // namespace api
52 } // namespace eoos
53 #endif // API_SEQUENCECONTAINER_HPP_
54