Try to better my life as a programmer, starting with more comments and documentation

This commit is contained in:
Thomas Krijnen
2012-03-17 11:47:31 +00:00
parent cdbafac676
commit c31bc16dba
12 changed files with 81616 additions and 1021 deletions
+13 -2
View File
@@ -33,7 +33,13 @@
const int BUF_SIZE = (128 * 1024 * 1024);
namespace IfcParse {
/// The File class represents a ISO 10303-21 IFC-SPF file in memory.
/// The file is interpreted as a sequence of tokens which are lazily
/// interpreted only when requested. If the size of the file is
/// larger than BUF_SIZE, the file is split into seperate pages, of
/// which only one is simultaneously kept in memory, for files
/// that define their entities not in a sequential nature, this is
/// detrimental for the performance of the parser.
class File {
private:
std::ifstream stream;
@@ -50,11 +56,16 @@ namespace IfcParse {
File(const std::string& fn);
File(std::istream& f, int len);
File(void* data, int len);
/// Returns the character at the cursor
char Peek();
/// Returns the character at specified offset
char Read(unsigned int offset);
void Inc();
/// Increment the file cursor and reads new page if necessary
void Inc();
void Close();
/// Moves the file cursor to an arbitrary offset in the file
void Seek(unsigned int offset);
/// Returns the cursor position
unsigned int Tell();
};
}