13#ifndef CMSIS_PLUS_POSIX_IO_DIRECTORY_H_
14#define CMSIS_PLUS_POSIX_IO_DIRECTORY_H_
18#if defined(__cplusplus)
22#if defined(OS_USE_OS_APP_CONFIG_H)
23#include <cmsis-plus/os-app-config.h>
35#pragma GCC diagnostic push
37#pragma clang diagnostic ignored "-Wc++98-compat"
38#pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
57#pragma GCC diagnostic push
59#pragma clang diagnostic ignored "-Wpadded"
60#elif defined(__GNUC__)
61#pragma GCC diagnostic ignored "-Wpadded"
69#pragma GCC diagnostic push
71#elif defined(__GNUC__)
72#pragma GCC diagnostic ignored "-Wsuggest-final-methods"
73#pragma GCC diagnostic ignored "-Wsuggest-final-types"
148#pragma GCC diagnostic push
149#if defined(__clang__)
150#elif defined(__GNUC__)
151#pragma GCC diagnostic ignored "-Wredundant-tags"
157#pragma GCC diagnostic pop
194#pragma GCC diagnostic pop
270#pragma GCC diagnostic push
271#if defined(__clang__)
272#elif defined(__GNUC__)
273#pragma GCC diagnostic ignored "-Wredundant-tags"
279#pragma GCC diagnostic pop
304#pragma GCC diagnostic push
305#if defined(__clang__)
306#elif defined(__GNUC__)
307#pragma GCC diagnostic ignored "-Wsuggest-final-methods"
308#pragma GCC diagnostic ignored "-Wsuggest-final-types"
382#pragma GCC diagnostic pop
386#pragma GCC diagnostic push
387#if defined(__clang__)
388#elif defined(__GNUC__)
389#pragma GCC diagnostic ignored "-Wsuggest-final-methods"
390#pragma GCC diagnostic ignored "-Wsuggest-final-types"
392 template<
typename T,
typename L>
448 read (
void)
override;
456 close (
void)
override;
483#pragma GCC diagnostic pop
485#pragma GCC diagnostic pop
508 return &(
impl ().dir_entry_);
535#if defined(OS_TRACE_POSIX_IO_DIRECTORY)
536 trace::printf (
"directory_implementable::%s()=@%p\n", __func__,
this);
540#pragma GCC diagnostic push
541#if defined(__clang__)
542#elif defined(__GNUC__)
543#pragma GCC diagnostic ignored "-Wsuggest-final-methods"
548#if defined(OS_TRACE_POSIX_IO_DIRECTORY)
549 trace::printf (
"directory_implementable::%s() @%p\n", __func__,
this);
552#pragma GCC diagnostic pop
563 template<
typename T,
typename L>
572#if defined(OS_TRACE_POSIX_IO_DIRECTORY)
573 trace::printf (
"directory_lockable::%s()=@%p\n", __func__,
this);
577#pragma GCC diagnostic push
578#if defined(__clang__)
579#elif defined(__GNUC__)
580#pragma GCC diagnostic ignored "-Wsuggest-final-methods"
582 template<
typename T,
typename L>
585#if defined(OS_TRACE_POSIX_IO_DIRECTORY)
586 trace::printf (
"directory_lockable::%s() @%p\n", __func__,
this);
589#pragma GCC diagnostic pop
593 template<
typename T,
typename L>
597#if defined(OS_TRACE_POSIX_IO_DIRECTORY)
598 trace::printf (
"directory_lockable::%s() @%p\n", __func__,
this);
601 std::lock_guard<L> lock
607 template<
typename T,
typename L>
611#if defined(OS_TRACE_POSIX_IO_DIRECTORY)
612 trace::printf (
"directory_lockable::%s() @%p\n", __func__,
this);
615 std::lock_guard<L> lock
621 template<
typename T,
typename L>
625#if defined(OS_TRACE_POSIX_IO_DIRECTORY)
626 trace::printf (
"directory_lockable::%s() @%p\n", __func__,
this);
629 std::lock_guard<L> lock
635 template<
typename T,
typename L>
646#pragma GCC diagnostic pop
class file_system & get_file_system(void) const
virtual int do_close(void)=0
virtual dirent * do_read(void)=0
virtual void do_rewind(void)=0
virtual ~directory_impl()
value_type & impl(void) const
directory_implementable(file_system &fs)
virtual ~directory_implementable() override
value_type & impl(void) const
virtual int close(void) override
directory_lockable(file_system &fs, lockable_type &locker)
virtual ~directory_lockable() override
virtual dirent * read(void) override
virtual void rewind(void) override
class file_system & get_file_system(void) const
virtual dirent * read(void)
virtual void rewind(void)
directory_impl & impl(void) const
The core of a double linked list, pointers to next, previous.
int printf(const char *format,...)
Write a formatted string to the trace device.