Commit of the debugged version of Alex' improvement to OpenMesh. File i/o is now done via istream/ostream instances such that direct buffer writing to files (serialization) will also be possible in future releases.

Code is tested.

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@221 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Mike Kremer
2009-11-17 13:54:16 +00:00
parent 86b53bf930
commit efa67fbcfc
24 changed files with 512 additions and 242 deletions

View File

@@ -103,6 +103,10 @@ public:
BaseImporter& _bi,
Options& _opt);
bool read(std::istream& _is,
BaseImporter& _bi,
Options& _opt);
bool can_u_read(const std::string& _filename) const;
enum ValueType {
@@ -116,15 +120,14 @@ private:
bool can_u_read(std::istream& _is) const;
bool read(std::fstream& _in, BaseImporter& _bi, Options& _opt ) const;
bool read_ascii(std::fstream& _in, BaseImporter& _bi) const;
bool read_binary(std::fstream& _in, BaseImporter& _bi, bool swap) const;
bool read_ascii(std::istream& _in, BaseImporter& _bi) const;
bool read_binary(std::istream& _in, BaseImporter& _bi, bool swap) const;
float readToFloatValue(ValueType _type , std::fstream& _in) const;
void readValue(ValueType _type , std::fstream& _in, float& _value) const;
void readValue(ValueType _type , std::fstream& _in, unsigned int& _value) const;
void readValue(ValueType _type , std::fstream& _in, int& _value) const;
void readValue(ValueType _type , std::istream& _in, float& _value) const;
void readValue(ValueType _type , std::istream& _in, unsigned int& _value) const;
void readValue(ValueType _type , std::istream& _in, int& _value) const;
//available options for reading
mutable Options options_;