quick facts

Purpose: Improve Coding Skills

Time Frame: ~1 week

Link:
GitHub

Object Oriented File wrapper

The purpose of this file wrapper was to learn how the f* (fopen, fread, etc.) functions in the C standard library work, and to test out Visual Studio 11. Along the way, I learned that fstreams in the C++ language do very similar work to what I have implemented here. However, I still wanted to learn how to manipulate file buffers, and improve my interface-writing skills.

Something I'm unhappy with is the way the C++ language deals with enumerations, and how you cannot bitwise or them together to get a resulting enumeration back. This leads to inelegant lines such as...

Line 238 of File_Wrapper.cpp:
mode = static_cast<Mode>(mode | MODE_WRITE);

If I were to go back and re-start this project, I would typedef Mode to be an unsigned integer, and use constants for the different mode types, for easier and faster end-user access.

This project wasn't entirely completed when I stopped working on it. However, it is unlikely that I will ever continue working on it.