mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 10:06:47 +00:00
Try to better my life as a programmer, starting with more comments and documentation
This commit is contained in:
+13
-2
@@ -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();
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user