minor changes

This commit is contained in:
granzuglia 2007-10-18 15:00:51 +00:00
parent 905795302a
commit 0d78cce991
1 changed files with 10 additions and 7 deletions

View File

@ -6,9 +6,7 @@
#include <fstream> #include <fstream>
#include <ostream> #include <ostream>
namespace vcg {
namespace tri {
namespace io {
class TextUtility class TextUtility
{ {
public: public:
@ -21,10 +19,10 @@ public:
} }
}; };
class IDTF_File class Output_File
{ {
public: public:
IDTF_File(const std::string& file) Output_File(const std::string& file)
:_file() :_file()
{ {
_file.open(file.c_str(),std::ios::out); _file.open(file.c_str(),std::ios::out);
@ -38,7 +36,7 @@ public:
_file << tmp << st << std::endl; _file << tmp << st << std::endl;
} }
~IDTF_File() ~Output_File()
{ {
_file.close(); _file.close();
} }
@ -48,13 +46,18 @@ private:
std::string _tab; std::string _tab;
}; };
namespace vcg {
namespace tri {
namespace io {
template<typename SaveMeshType> template<typename SaveMeshType>
class ExporterIDTF class ExporterIDTF
{ {
public: public:
static void Save(SaveMeshType& m,const char* file,const int mask) static void Save(SaveMeshType& m,const char* file,const int mask)
{ {
IDTF_File idtf(file); Output_File idtf(file);
idtf.write(0,"FILE_FORMAT \"IDTF\""); idtf.write(0,"FILE_FORMAT \"IDTF\"");
idtf.write(0,"FORMAT_VERSION 100\n"); idtf.write(0,"FORMAT_VERSION 100\n");