Class: Wx::StreamBase
- Inherits:
-
Object
- Object
- Wx::StreamBase
- Defined in:
- lib/wx/doc/gen/fs_file.rb
Overview
This class is untracked and should not be derived from nor instances extended!
This class is the base class of most stream related classes in wxWidgets.
It must not be used directly.
Category: Streams
Direct Known Subclasses
Instance Method Summary collapse
-
#get_last_error ⇒ Wx::StreamError
(also: #last_error)
This function returns the last error.
-
#get_length ⇒ Integer
(also: #length)
Returns the length of the stream in bytes.
-
#get_size ⇒ Integer
(also: #size)
This function returns the size of the stream.
-
#initialize ⇒ Wx::StreamBase
constructor
Creates a dummy stream object.
-
#is_ok ⇒ Boolean
(also: #ok?)
Returns true if no error occurred on the stream.
-
#is_seekable ⇒ Boolean
(also: #seekable?)
Returns true if the stream supports seeking to arbitrary offsets.
-
#reset(error = Wx::StreamError::STREAM_NO_ERROR) ⇒ void
Resets the stream state.
Constructor Details
#initialize ⇒ Wx::StreamBase
Creates a dummy stream object.
It doesn’t do anything.
168 |
# File 'lib/wx/doc/gen/fs_file.rb', line 168 def initialize; end |
Instance Method Details
#get_last_error ⇒ Wx::StreamError Also known as: last_error
This function returns the last error.
172 |
# File 'lib/wx/doc/gen/fs_file.rb', line 172 def get_last_error; end |
#get_length ⇒ Integer Also known as: length
Returns the length of the stream in bytes.
If the length cannot be determined (this is always the case for socket streams for example), returns InvalidOffset.
179 |
# File 'lib/wx/doc/gen/fs_file.rb', line 179 def get_length; end |
#get_size ⇒ Integer Also known as: size
This function returns the size of the stream.
For example, for a file it is the size of the file. There are streams which do not have size by definition, such as socket streams. In that cases, #get_size returns 0 so you should always test its return value.
187 |
# File 'lib/wx/doc/gen/fs_file.rb', line 187 def get_size; end |
#is_ok ⇒ Boolean Also known as: ok?
Returns true if no error occurred on the stream.
195 |
# File 'lib/wx/doc/gen/fs_file.rb', line 195 def is_ok; end |
#is_seekable ⇒ Boolean Also known as: seekable?
Returns true if the stream supports seeking to arbitrary offsets.
200 |
# File 'lib/wx/doc/gen/fs_file.rb', line 200 def is_seekable; end |
#reset(error = Wx::StreamError::STREAM_NO_ERROR) ⇒ void
This method returns an undefined value.
Resets the stream state.
By default, resets the stream to good state, i.e. clears any errors. Since wxWidgets 2.9.3 can be also used to explicitly set the state to the specified error (the error argument didn’t exist in the previous versions).
209 |
# File 'lib/wx/doc/gen/fs_file.rb', line 209 def reset(error=Wx::StreamError::STREAM_NO_ERROR) end |