91 std::ios::openmode omd = std::ios::app;
93 omd |= std::ios::binary;
94 std::ofstream os( hdr.
filename().c_str(), omd );
100 std::string opmode = ascii ?
"ascii" :
"binar";
103 std::unique_ptr<ItemWriter<uint32_t> > sw( sw1.
writer( opmode ) );
107 for ( it=thing.begin(); it!=et; ++it )
109 sw->write( os, it->first );
111 uint32_t nitem = tex.
nItem();
112 sw->write( os, nitem );
113 const std::vector<T> & vec = tex.
data();
114 iw->
write( os, &vec[0], nitem );
const std::vector< T > & data() const
std::map< int, Texture< T > >::const_iterator const_iterator
const aims::PythonHeader & header() const
Get the header.
bool write(const T &obj, const std::string &filename, carto::Object options=carto::none(), const std::string *format=0)
Finds the correct format and writes the object, global version.