// file : examples/cxx/hybrid/binary/custom/orawstream.ixx // author : Boris Kolpackov // copyright : not copyrighted - public domain inline orawstream:: orawstream (xml_schema::buffer& buf) : buf_ (buf) { } inline void orawstream:: operator<< (bool x) { *align (1, 1) = x; } inline void orawstream:: operator<< (signed char x) { *reinterpret_cast (align (1, 1)) = x; } inline void orawstream:: operator<< (unsigned char x) { *reinterpret_cast (align (1, 1)) = x; } inline void orawstream:: operator<< (short x) { *reinterpret_cast (align (2, 2)) = x; } inline void orawstream:: operator<< (unsigned short x) { *reinterpret_cast (align (2, 2)) = x; } inline void orawstream:: operator<< (int x) { *reinterpret_cast (align (4, 4)) = x; } inline void orawstream:: operator<< (unsigned int x) { *reinterpret_cast (align (4, 4)) = x; } inline void orawstream:: operator<< (long x) { *reinterpret_cast ( align (sizeof (long), sizeof (long))) = x; } inline void orawstream:: operator<< (unsigned long x) { *reinterpret_cast ( align (sizeof (unsigned long), sizeof (unsigned long))) = x; } #ifdef XSDE_LONGLONG inline void orawstream:: operator<< (long long x) { *reinterpret_cast (align (8, 8)) = x; } inline void orawstream:: operator<< (unsigned long long x) { *reinterpret_cast (align (8, 8)) = x; } #endif inline void orawstream:: operator<< (as_size x) { *reinterpret_cast ( align (sizeof (size_t), sizeof (size_t))) = x.s_; } inline void orawstream:: operator<< (float x) { *reinterpret_cast ( align (sizeof (float), sizeof (float))) = x; } inline void orawstream:: operator<< (double x) { *reinterpret_cast ( align (sizeof (double), sizeof (double))) = x; } inline void operator<< (orawstream&, const xml_schema::any_type&) { }