#include "Salamander.h"
#include "STLScribe.h"

namespace Salamander
{

STLScribe::STLScribe(const std::string& filename, accessMode mode) :
	IScribe(filename, mode)
{
	// read/write
	std::ios_base::open_mode iosMode = 
		mode == readOnly ? std::ios::in : 
						   std::ios::out;
	
	// binary
	iosMode |= std::ios::binary;

	//open
	fstream_.open(filename.c_str(), iosMode);
}

STLScribe::~STLScribe()
{
	fstream_.close();
}

}
