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

Public 类型

typedef ::std::basic_istream< 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_istream_wrap (stream_t &stream) noexcept
 
virtual ~std_istream_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 size_t read (char_T *buf, size_t size) noexcept override
 
- Public 成员函数 继承自 elc::defs::stream_n::noexcept_text_istream_t< char_T >
virtual void unread (const char_T *buf, size_t size) noexcept override=0
 
virtual char_T peek () noexcept override
 
virtual char_T get () noexcept override
 
- Public 成员函数 继承自 elc::defs::stream_n::base_stream_t
virtual ~base_stream_t ()=default
 
- Public 成员函数 继承自 elc::defs::stream_n::noexcept_not_unreadable_istream_t
virtual bool is_end () noexcept override=0
 
virtual bool waitting_for_data () noexcept override=0
 
virtual operator bool () noexcept override
 

Public 属性

stream_t_stream
 

详细描述

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

在文件 all_defs.cpp29469 行定义.

成员类型定义说明

◆ stream_t

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

在文件 all_defs.cpp29470 行定义.

构造及析构函数说明

◆ std_istream_wrap()

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

在文件 all_defs.cpp29472 行定义.

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

◆ ~std_istream_wrap()

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

成员函数说明

◆ close()

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

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

在文件 all_defs.cpp29533 行定义.

29533 {
29534 _stream.sync();
29535 }

◆ flush()

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

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

在文件 all_defs.cpp29530 行定义.

29530 {
29531 _stream.sync();
29532 }

◆ read()

template<class char_T , class traits = ::std::char_traits<char_T>>
virtual size_t elc::defs::stream_n::std_istream_wrap< char_T, traits >::read ( char_T buf,
size_t  size 
)
inlineoverridevirtualnoexcept

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

在文件 all_defs.cpp29536 行定义.

29536 {
29537 typename stream_t::iostate state = stream_t::goodbit;
29538 const typename stream_t::sentry isok(_stream);
29539
29540 if(!isok)
29541 state |= stream_t::badbit;
29542 else{
29543 try{
29544 _stream.read(buf,size);
29545 return size_t(_stream.gcount());
29546 }catch(...){
29547 state |= stream_t::badbit;
29548 }
29549 }
29550 _stream.setstate(state);
29551 return 0;
29552 }
size_type_t<::size_t > size_t

◆ seek()

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

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

在文件 all_defs.cpp29479 行定义.

29479 {
29480 typename stream_t::iostate state = stream_t::goodbit;
29481 const typename stream_t::sentry isok(_stream);
29482
29483 if(!isok)
29484 state |= stream_t::badbit;
29485 else{
29486 try{
29487 switch(dir){
29488 case beg:
29489 _stream.seekg(off);
29490 break;
29491 case cur:
29492 _stream.seekg(off,_stream.cur);
29493 break;
29494 case end:
29495 _stream.seekg(off,_stream.end);
29496 break;
29497 }
29498 return tell();
29499 }catch(...){
29500 state |= stream_t::badbit;
29501 }
29502 }
29503 _stream.setstate(state);
29504 return -1;
29505 }
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_istream_wrap< char_T, traits >::seek_to ( int_t  pos)
inlineoverridevirtualnoexcept

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

在文件 all_defs.cpp29523 行定义.

29523 {
29524 const typename stream_t::pos_type base_p;
29525 _stream.seekg(base_p+pos);
29526 }

◆ sync()

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

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

在文件 all_defs.cpp29527 行定义.

29527 {
29528 _stream.sync();
29529 }

◆ tell()

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

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

在文件 all_defs.cpp29506 行定义.

29506 {
29507 typename stream_t::iostate state = stream_t::goodbit;
29508 const typename stream_t::sentry isok(_stream);
29509
29510 if(!isok)
29511 state |= stream_t::badbit;
29512 else{
29513 try{
29514 const typename stream_t::pos_type base_p;
29515 return int_t(_stream.tellg()-base_p);
29516 }catch(...){
29517 state |= stream_t::badbit;
29518 }
29519 }
29520 _stream.setstate(state);
29521 return -1;
29522 }
int64_t int_t
Definition all_defs.cpp:357

类成员变量说明

◆ _stream

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

在文件 all_defs.cpp29471 行定义.


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