F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
DefaultFile.cpp
Go to the documentation of this file.
1// ======================================================================
2// \title Os/Stub/DefaultFile.cpp
3// \brief sets default Os::File to no-op stub implementation via linker
4// ======================================================================
5#include "Os/Stub/File.hpp"
8#include "Os/Delegate.hpp"
9namespace Os {
10
15FileInterface *FileInterface::getDelegate(FileHandleStorage& aligned_placement_new_memory, const FileInterface* to_copy) {
16 return Os::Delegate::makeDelegate<FileInterface, Os::Stub::File::StubFile>(
17 aligned_placement_new_memory, to_copy
18 );
19}
20
25FileSystemInterface *FileSystemInterface::getDelegate(FileSystemHandleStorage& aligned_placement_new_memory) {
26 return Os::Delegate::makeDelegate<FileSystemInterface, Os::Stub::FileSystem::StubFileSystem>(
27 aligned_placement_new_memory
28 );
29}
30
34DirectoryInterface *DirectoryInterface::getDelegate(DirectoryHandleStorage& aligned_placement_new_memory) {
35 return Os::Delegate::makeDelegate<DirectoryInterface, Os::Stub::Directory::StubDirectory>(
36 aligned_placement_new_memory
37 );
38}
39}
U8 DirectoryHandleStorage[FW_DIRECTORY_HANDLE_MAX_SIZE]
Definition Os.hpp:15
U8 FileSystemHandleStorage[FW_FILESYSTEM_HANDLE_MAX_SIZE]
Definition Os.hpp:16
U8 FileHandleStorage[FW_FILE_HANDLE_MAX_SIZE]
Definition Os.hpp:13
static DirectoryInterface * getDelegate(DirectoryHandleStorage &aligned_new_memory)
provide a pointer to a Directory delegate object
static FileInterface * getDelegate(FileHandleStorage &aligned_placement_new_memory, const FileInterface *to_copy=nullptr)
provide a pointer to a file delegate object
static FileSystemInterface * getDelegate(FileSystemHandleStorage &aligned_new_memory)
provide a pointer to a FileSystem delegate object