1 #ifndef AWFUL_ABF_WRITER_OBJS_H
2 #define AWFUL_ABF_WRITER_OBJS_H
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.
19 Impl::WriteContext
< buffered_stream_type
> wct( Stream
);
20 wct
.writeObject( pObj_
);
22 uint32_t size
= Stream
.tell() - begin
- 4;
24 Stream
.writeU32( size
);