math: added Vector3f and Vector4f. Comparison is wrong, and many operations and conve...
[fail.git] / abf / write-context-fwd.h
blob50e3b0d521d8c0206f11937f7470f6b08ae13072
1 #ifndef AWFUL_ABF_WRITER_CONTEXT_FWD_H
2 #define AWFUL_ABF_WRITER_CONTEXT_FWD_H
4 #include <map>
6 namespace awful { namespace abf { namespace Impl
8 template< class stream_type > class WriteContext
9 {
10 public:
11 WriteContext( stream_type& Stream_ ) :
12 Stream( Stream_ ),
13 m_NextObjectID( 0 )
17 template< class C > void writeObject( const Pointer< C >& pObj_ );
19 int32_t getObjectID( const RefCounted* pObject )
21 std::map< const RefCounted*, int32_t >::const_iterator it =
22 m_Objects.find( pObject );
24 if( it == m_Objects.end() )
25 return -1;
27 return it->second;
30 stream_type& Stream;
32 private:
33 std::map< const RefCounted*, int32_t > m_Objects;
34 int m_NextObjectID;
36 }}}
38 #endif