Opencv 3.1 project on GR-PEACH board

Fork of gr-peach-opencv-project by the do

Committer:
thedo
Date:
Tue Jul 04 06:23:13 2017 +0000
Revision:
170:54ff26da7eb6
Parent:
166:3a9487d57a5c
project opencv 3.1 on GR PEACH board, no use SD card.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
thedo 166:3a9487d57a5c 1 /* mbed Microcontroller Library
thedo 166:3a9487d57a5c 2 * Copyright (c) 2006-2013 ARM Limited
thedo 166:3a9487d57a5c 3 *
thedo 166:3a9487d57a5c 4 * Licensed under the Apache License, Version 2.0 (the "License");
thedo 166:3a9487d57a5c 5 * you may not use this file except in compliance with the License.
thedo 166:3a9487d57a5c 6 * You may obtain a copy of the License at
thedo 166:3a9487d57a5c 7 *
thedo 166:3a9487d57a5c 8 * http://www.apache.org/licenses/LICENSE-2.0
thedo 166:3a9487d57a5c 9 *
thedo 166:3a9487d57a5c 10 * Unless required by applicable law or agreed to in writing, software
thedo 166:3a9487d57a5c 11 * distributed under the License is distributed on an "AS IS" BASIS,
thedo 166:3a9487d57a5c 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
thedo 166:3a9487d57a5c 13 * See the License for the specific language governing permissions and
thedo 166:3a9487d57a5c 14 * limitations under the License.
thedo 166:3a9487d57a5c 15 */
thedo 166:3a9487d57a5c 16 #ifndef MBED_FILEBASE_H
thedo 166:3a9487d57a5c 17 #define MBED_FILEBASE_H
thedo 166:3a9487d57a5c 18
thedo 166:3a9487d57a5c 19 typedef int FILEHANDLE;
thedo 166:3a9487d57a5c 20
thedo 166:3a9487d57a5c 21 #include <cstdio>
thedo 166:3a9487d57a5c 22 #include <cstring>
thedo 166:3a9487d57a5c 23
thedo 166:3a9487d57a5c 24 #include "platform/platform.h"
thedo 166:3a9487d57a5c 25 #include "platform/SingletonPtr.h"
thedo 166:3a9487d57a5c 26 #include "platform/PlatformMutex.h"
thedo 166:3a9487d57a5c 27
thedo 166:3a9487d57a5c 28 namespace mbed {
thedo 166:3a9487d57a5c 29 /** \addtogroup platform */
thedo 166:3a9487d57a5c 30 /** @{*/
thedo 166:3a9487d57a5c 31
thedo 166:3a9487d57a5c 32 typedef enum {
thedo 166:3a9487d57a5c 33 FilePathType,
thedo 166:3a9487d57a5c 34 FileSystemPathType
thedo 166:3a9487d57a5c 35 } PathType;
thedo 166:3a9487d57a5c 36 /** @}*/
thedo 166:3a9487d57a5c 37
thedo 166:3a9487d57a5c 38 /**
thedo 166:3a9487d57a5c 39 * @class FileBase
thedo 166:3a9487d57a5c 40 * @ingroup platform
thedo 166:3a9487d57a5c 41 */
thedo 166:3a9487d57a5c 42 class FileBase {
thedo 166:3a9487d57a5c 43 public:
thedo 166:3a9487d57a5c 44 FileBase(const char *name, PathType t);
thedo 166:3a9487d57a5c 45 virtual ~FileBase();
thedo 166:3a9487d57a5c 46
thedo 166:3a9487d57a5c 47 const char* getName(void);
thedo 166:3a9487d57a5c 48 PathType getPathType(void);
thedo 166:3a9487d57a5c 49
thedo 166:3a9487d57a5c 50 static FileBase *lookup(const char *name, unsigned int len);
thedo 166:3a9487d57a5c 51
thedo 166:3a9487d57a5c 52 static FileBase *get(int n);
thedo 166:3a9487d57a5c 53
thedo 166:3a9487d57a5c 54 /* disallow copy constructor and assignment operators */
thedo 166:3a9487d57a5c 55 private:
thedo 166:3a9487d57a5c 56 static FileBase *_head;
thedo 166:3a9487d57a5c 57 static SingletonPtr<PlatformMutex> _mutex;
thedo 166:3a9487d57a5c 58
thedo 166:3a9487d57a5c 59 FileBase *_next;
thedo 166:3a9487d57a5c 60 const char * const _name;
thedo 166:3a9487d57a5c 61 const PathType _path_type;
thedo 166:3a9487d57a5c 62 FileBase(const FileBase&);
thedo 166:3a9487d57a5c 63 FileBase & operator = (const FileBase&);
thedo 166:3a9487d57a5c 64 };
thedo 166:3a9487d57a5c 65
thedo 166:3a9487d57a5c 66 } // namespace mbed
thedo 166:3a9487d57a5c 67
thedo 166:3a9487d57a5c 68 #endif
thedo 166:3a9487d57a5c 69
thedo 166:3a9487d57a5c 70