ELC in dev
ELC-lang
载入中...
搜索中...
未找到
elc::defs::stream_n::std_ostream_wrap< char_T, traits > 模板结构体 参考
类 elc::defs::stream_n::std_ostream_wrap< char_T, traits > 继承关系图:
[图例]
elc::defs::stream_n::std_ostream_wrap< char_T, traits > 的协作图:
[图例]

Public 类型

typedef ::std::basic_ostream< char_T, traitsstream_t
 
- Public 类型 继承自 elc::defs::stream_n::text_stream_t< char_T >
typedef char_T char_type
 
typedef char_type data_type
 

Public 成员函数

 std_ostream_wrap (stream_t &stream) noexcept
 
virtual ~std_ostream_wrap () noexcept override=default
 
virtual int_t seek (seek_type dir, int_t off) noexcept override
 
virtual int_t tell () noexcept override
 
virtual void seek_to (int_t pos) noexcept override
 
virtual void sync () noexcept override
 
virtual void flush () noexcept override
 
virtual void close () noexcept override
 
virtual void write (const char_T *buf, size_t size) noexcept override
 
- Public 成员函数 继承自 elc::defs::stream_n::base_stream_t
virtual ~base_stream_t ()=default
 

Public 属性

stream_t_stream
 

详细描述

template<class char_T, class traits = ::std::char_traits<char_T>>
struct elc::defs::stream_n::std_ostream_wrap< char_T, traits >

在文件 all_defs.cpp29556 行定义.

成员类型定义说明

◆ stream_t

template<class char_T , class traits = ::std::char_traits<char_T>>
typedef ::std::basic_ostream<char_T,traits> elc::defs::stream_n::std_ostream_wrap< char_T, traits >::stream_t

在文件 all_defs.cpp29557 行定义.

构造及析构函数说明

◆ std_ostream_wrap()

template<class char_T , class traits = ::std::char_traits<char_T>>
elc::defs::stream_n::std_ostream_wrap< char_T, traits >::std_ostream_wrap ( stream_t stream)
inlinenoexcept

在文件 all_defs.cpp29559 行定义.

29559:_stream(stream){}
constexpr T down_cast(U a) noexcept
向下转型至

◆ ~std_ostream_wrap()

template<class char_T , class traits = ::std::char_traits<char_T>>
virtual elc::defs::stream_n::std_ostream_wrap< char_T, traits >::~std_ostream_wrap ( )
overridevirtualdefaultnoexcept

成员函数说明

◆ close()

template<class char_T , class traits = ::std::char_traits<char_T>>
virtual void elc::defs::stream_n::std_ostream_wrap< char_T, traits >::close ( )
inlineoverridevirtualnoexcept

实现了 elc::defs::stream_n::base_stream_t.

在文件 all_defs.cpp29607 行定义.

29607 {
29608 _stream.flush();
29609 }

◆ flush()

template<class char_T , class traits = ::std::char_traits<char_T>>
virtual void elc::defs::stream_n::std_ostream_wrap< char_T, traits >::flush ( )
inlineoverridevirtualnoexcept

实现了 elc::defs::stream_n::base_stream_t.

在文件 all_defs.cpp29604 行定义.

29604 {
29605 _stream.flush();
29606 }

◆ seek()

template<class char_T , class traits = ::std::char_traits<char_T>>
virtual int_t elc::defs::stream_n::std_ostream_wrap< char_T, traits >::seek ( seek_type  dir,
int_t  off 
)
inlineoverridevirtualnoexcept

实现了 elc::defs::stream_n::base_stream_t.

在文件 all_defs.cpp29566 行定义.

29566 {
29567 typename stream_t::iostate state = stream_t::goodbit;
29568 const typename stream_t::sentry isok(_stream);
29569
29570 if(!isok)
29571 state |= stream_t::badbit;
29572 else{
29573 try{
29574 switch(dir){
29575 case beg:
29576 _stream.seekp(off);
29577 break;
29578 case cur:
29579 _stream.seekp(off,_stream.cur);
29580 break;
29581 case end:
29582 _stream.seekp(off,_stream.end);
29583 break;
29584 }
29585 return tell();
29586 }catch(...){
29587 state |= stream_t::badbit;
29588 }
29589 }
29590 _stream.setstate(state);
29591 return -1;
29592 }
virtual int_t tell() noexcept override

◆ seek_to()

template<class char_T , class traits = ::std::char_traits<char_T>>
virtual void elc::defs::stream_n::std_ostream_wrap< char_T, traits >::seek_to ( int_t  pos)
inlineoverridevirtualnoexcept

实现了 elc::defs::stream_n::base_stream_t.

在文件 all_defs.cpp29597 行定义.

29597 {
29598 const typename stream_t::pos_type base_p;
29599 _stream.seekp(base_p+pos);
29600 }

◆ sync()

template<class char_T , class traits = ::std::char_traits<char_T>>
virtual void elc::defs::stream_n::std_ostream_wrap< char_T, traits >::sync ( )
inlineoverridevirtualnoexcept

实现了 elc::defs::stream_n::base_stream_t.

在文件 all_defs.cpp29601 行定义.

29601 {
29602 _stream.flush();
29603 }

◆ tell()

template<class char_T , class traits = ::std::char_traits<char_T>>
virtual int_t elc::defs::stream_n::std_ostream_wrap< char_T, traits >::tell ( )
inlineoverridevirtualnoexcept

重载 elc::defs::stream_n::base_stream_t .

在文件 all_defs.cpp29593 行定义.

29593 {
29594 const typename stream_t::pos_type base_p;
29595 return int_t(_stream.tellp()-base_p);
29596 }
int64_t int_t
Definition all_defs.cpp:357

◆ write()

template<class char_T , class traits = ::std::char_traits<char_T>>
virtual void elc::defs::stream_n::std_ostream_wrap< char_T, traits >::write ( const char_T buf,
size_t  size 
)
inlineoverridevirtualnoexcept

实现了 elc::defs::stream_n::noexcept_text_ostream_t< char_T >.

在文件 all_defs.cpp29610 行定义.

29610 {
29611 typename stream_t::iostate state = stream_t::goodbit;
29612 const typename stream_t::sentry isok(_stream);
29613
29614 if(!isok)
29615 state |= stream_t::badbit;
29616 else{
29617 try{
29618 _stream.write(buf,size);
29619 }catch(...){
29620 state |= stream_t::badbit;
29621 }
29622 }
29623 _stream.setstate(state);
29624 }

类成员变量说明

◆ _stream

template<class char_T , class traits = ::std::char_traits<char_T>>
stream_t& elc::defs::stream_n::std_ostream_wrap< char_T, traits >::_stream

在文件 all_defs.cpp29558 行定义.


该结构体的文档由以下文件生成: