Trying to develop an understanding of the functioning of the the SDFat library for Arduino IDE. I stumbled across these lines of codes in the SDfat.h header file.
/**
1* \class SdBaseFile
2* \brief Class for backward compatibility.
3*/
4 class SdBaseFile : public FatFile {
5 public:
6 SdBaseFile() {}
7 /** Create a file object and open it in the current working directory.
8 *
9 * \param[in] path A path for a file to be opened.
10 *
11 * \param[in] oflag Values for \a oflag are constructed by a
12 * bitwise-inclusive OR of open flags. see
13 * FatFile::open(FatFile*, const char*, uint8_t).
14 */
15 SdBaseFile(const char* path, uint8_t oflag) : FatFile(path, oflag) {}
16 };
If someone could please explain me how this class declaration works.
1) What does the :public Fatfile
in line#4 do.
2) Why are there two constructors in line#6 and line#15 (if at all they are that).
My comprehension is being limited by the lack of syntactical understanding of the definition/ declaration here. Appreciate the help.
Thanks