GCC Code Coverage Report


Directory: ./
File: Stub/DefaultFile.cpp
Date: 2026-09-03 22:13:09
Exec Total Coverage
Lines: 0 8 0.0%
Functions: 0 3 0.0%
Branches: 0 0 -%

Line Branch Exec Source
1 // ======================================================================
2 // \title Os/Stub/DefaultFile.cpp
3 // \brief sets default Os::File to no-op stub implementation via linker
4 // ======================================================================
5 #include "Os/Delegate.hpp"
6 #include "Os/Stub/Directory.hpp"
7 #include "Os/Stub/File.hpp"
8 #include "Os/Stub/FileSystem.hpp"
9 namespace Os {
10
11 //! \brief get a delegate for FileInterface that intercepts calls for stub file usage
12 //! \param aligned_new_memory: aligned memory to fill
13 //! \param to_copy: pointer to copy-constructor input
14 //! \return: pointer to delegate
15 FileInterface* FileInterface::getDelegate(FileHandleStorage& aligned_placement_new_memory,
16 const FileInterface* to_copy) {
17 return Os::Delegate::makeDelegate<FileInterface, Os::Stub::File::StubFile>(aligned_placement_new_memory, to_copy);
18 }
19
20 //! \brief get a delegate for FileSystemInterface that intercepts calls for stub fileSystem usage
21 //! \param aligned_new_memory: aligned memory to fill
22 //! \param to_copy: pointer to copy-constructor input
23 //! \return: pointer to delegate
24 FileSystemInterface* FileSystemInterface::getDelegate(FileSystemHandleStorage& aligned_placement_new_memory) {
25 return Os::Delegate::makeDelegate<FileSystemInterface, Os::Stub::FileSystem::StubFileSystem>(
26 aligned_placement_new_memory);
27 }
28
29 //! \brief get a delegate for DirectoryInterface that intercepts calls for stub Directory usage
30 //! \param aligned_new_memory: aligned memory to fill
31 //! \return: pointer to delegate
32 DirectoryInterface* DirectoryInterface::getDelegate(DirectoryHandleStorage& aligned_placement_new_memory) {
33 return Os::Delegate::makeDelegate<DirectoryInterface, Os::Stub::Directory::StubDirectory>(
34 aligned_placement_new_memory);
35 }
36 } // namespace Os
37