FileLike.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* mbed Microcontroller Library
  2. * Copyright (c) 2006-2013 ARM Limited
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef MBED_FILELIKE_H
  17. #define MBED_FILELIKE_H
  18. #include "platform/mbed_toolchain.h"
  19. #include "platform/FileBase.h"
  20. #include "platform/FileHandle.h"
  21. #include "platform/NonCopyable.h"
  22. namespace mbed {
  23. /** \addtogroup platform */
  24. /** @{*/
  25. /**
  26. * \defgroup platform_FileLike FileLike class
  27. * @{
  28. */
  29. /** Class FileLike
  30. *
  31. * A file-like object is one that can be opened with fopen by
  32. * fopen("/name", mode).
  33. *
  34. * @note Synchronization level: Set by subclass
  35. */
  36. class FileLike : public FileHandle, public FileBase, private NonCopyable<FileLike> {
  37. public:
  38. /** Constructor FileLike
  39. *
  40. * @param name The name to use to open the file.
  41. */
  42. FileLike(const char *name = NULL) : FileBase(name, FilePathType) {}
  43. virtual ~FileLike() {}
  44. };
  45. /**@}*/
  46. /**@}*/
  47. } // namespace mbed
  48. #endif