math: added Vector3f and Vector4f. Comparison is wrong, and many operations and conve...
[fail.git] / abf / writer-OBJS.h
blob3d59e46e0811dc0250d3b632e1f657aa1de13402
1 #ifndef AWFUL_ABF_WRITER_OBJS_H
2 #define AWFUL_ABF_WRITER_OBJS_H
4 #include <map>
6 namespace awful { namespace abf
8 template< class EndianessPolicy > template< class C > void BaseWriter< EndianessPolicy >::
9 WriteOBJS( buffered_stream_type& Stream, const Pointer< C >& pObj_ )
11 const char objs[] = { 'O', 'B', 'J', 'S' };
12 Stream.write( objs, sizeof( objs ) );
14 uint64_t begin = Stream.tell();
16 // Write 0 for the chunk size, it will be fixed after the object chunk is written.
17 Stream.writeU32( 0 );
19 Impl::WriteContext< buffered_stream_type > wct( Stream );
20 wct.writeObject( pObj_ );
22 uint32_t size = Stream.tell() - begin - 4;
23 Stream.seek( begin );
24 Stream.writeU32( size );
28 #endif