F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
DefaultFile.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title Os/Posix/DefaultFile.cpp
3 // \brief sets default Os::File to posix implementation via linker
4 // ======================================================================
5 #include "Os/File.hpp"
6 #include "Os/Posix/File.hpp"
7 #include "Os/FileSystem.hpp"
9 #include "Os/Directory.hpp"
10 #include "Os/Posix/Directory.hpp"
11 #include "Os/Delegate.hpp"
12 
13 namespace Os {
15  return Os::Delegate::makeDelegate<FileInterface, Os::Posix::File::PosixFile>(aligned_new_memory, to_copy);
16 }
18  return Os::Delegate::makeDelegate<FileSystemInterface, Os::Posix::FileSystem::PosixFileSystem>(aligned_new_memory);
19 }
21  return Os::Delegate::makeDelegate<DirectoryInterface, Os::Posix::Directory::PosixDirectory>(aligned_new_memory);
22 }
23 }
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
Definition: DefaultFile.cpp:20
static FileInterface * getDelegate(FileHandleStorage &aligned_placement_new_memory, const FileInterface *to_copy=nullptr)
provide a pointer to a file delegate object
Definition: DefaultFile.cpp:14
static FileSystemInterface * getDelegate(FileSystemHandleStorage &aligned_new_memory)
provide a pointer to a FileSystem delegate object
Definition: DefaultFile.cpp:17