16.01.2011 - new modules - pimath and pigeometry

This commit is contained in:
peri4
2011-01-18 13:15:41 +03:00
parent a32edb1fef
commit 3610ea9212
17 changed files with 817 additions and 63 deletions

View File

@@ -4,12 +4,13 @@
bool PIFile::open(const PIString & path_, Flags<Mode> mode_) {
cpath = path_;
cmode = mode_;
string st = cpath.stdString();
if (cmode[New]) {
stream.open(cpath.stdString().c_str(), fstream::in | fstream::out | fstream::trunc);
stream.open(st.c_str(), fstream::in | fstream::out | fstream::trunc | fstream::binary);
stream.close();
cmode &= ~New;
stream.open(cpath.stdString().c_str(), (fstream::openmode)(int)cmode | fstream::binary);
} else stream.open(cpath.stdString().c_str(), (fstream::openmode)(int)cmode | fstream::binary);
stream.open(st.c_str(), (fstream::openmode)(int)cmode | fstream::binary);
} else stream.open(st.c_str(), (fstream::openmode)(int)cmode | fstream::binary);
return isOpened();
}