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