Aspose::Slides::StreamWrapper Class Reference

Aspose.IO.Stream wrapper for COM interface. More...

Inherits Aspose::Slides::IStreamWrapper.

Public Member Functions

System::SharedPtr< System::IO::Streamget_Stream ()
 Gets a stream. Read-only System::IO::Stream. More...
 
bool get_CanRead ()
 Gets a value indicating whether the current stream supports reading. Read-only bool. More...
 
bool get_CanSeek ()
 Gets a value indicating whether the current stream supports seeking. Read-only bool. More...
 
bool get_CanWrite ()
 Gets a value indicating whether the current stream supports writing. Read-only bool. More...
 
int64_t get_Length ()
 Gets the length in bytes of the stream. Read-only int64_t. More...
 
int64_t get_Position ()
 Gets the position within the current stream. Read-only int64_t. More...
 
void Close ()
 Closes the current stream and releases any resources. More...
 
void Flush ()
 Clears all buffers for this stream and causes any buffered data to be written to the underlying device. More...
 
void Read (System::ArrayPtr< uint8_t > buffer, int32_t offset, int32_t count)
 Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. More...
 
int32_t ReadByte ()
 Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. More...
 
int64_t Seek (int64_t offset, System::IO::SeekOrigin origin)
 Sets the position within the current stream More...
 
void Write (System::ArrayPtr< uint8_t > buffer, int32_t offset, int32_t count)
 writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. More...
 
void WriteByte (uint8_t value)
 Writes a byte to the current position in the stream and advances the position within the stream by one byte. More...
 
- Public Member Functions inherited from System::IDisposable
virtual void Dispose ()
 Does nothing. More...
 
- Public Member Functions inherited from System::Object
 Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ~Object ()
 Destroys object. Frees all internal data structures. More...
 
 Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared refernce counter. More...
 
void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual String ToString () ASPOSE_CONST
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 

Protected Member Functions

 StreamWrapper (System::SharedPtr< System::IO::Stream > stream)
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Impleemnts C# typeof(System.Object) construct. More...
 

Detailed Description

Aspose.IO.Stream wrapper for COM interface.

Constructor & Destructor Documentation

◆ StreamWrapper()

Aspose::Slides::StreamWrapper::StreamWrapper ( System::SharedPtr< System::IO::Stream stream)
protected

Member Function Documentation

◆ Close()

void Aspose::Slides::StreamWrapper::Close ( )
virtual

Closes the current stream and releases any resources.

Implements Aspose::Slides::IStreamWrapper.

◆ Flush()

void Aspose::Slides::StreamWrapper::Flush ( )
virtual

Clears all buffers for this stream and causes any buffered data to be written to the underlying device.

Implements Aspose::Slides::IStreamWrapper.

◆ get_CanRead()

bool Aspose::Slides::StreamWrapper::get_CanRead ( )
virtual

Gets a value indicating whether the current stream supports reading. Read-only bool.

Implements Aspose::Slides::IStreamWrapper.

◆ get_CanSeek()

bool Aspose::Slides::StreamWrapper::get_CanSeek ( )
virtual

Gets a value indicating whether the current stream supports seeking. Read-only bool.

Implements Aspose::Slides::IStreamWrapper.

◆ get_CanWrite()

bool Aspose::Slides::StreamWrapper::get_CanWrite ( )
virtual

Gets a value indicating whether the current stream supports writing. Read-only bool.

Implements Aspose::Slides::IStreamWrapper.

◆ get_Length()

int64_t Aspose::Slides::StreamWrapper::get_Length ( )
virtual

Gets the length in bytes of the stream. Read-only int64_t.

Implements Aspose::Slides::IStreamWrapper.

◆ get_Position()

int64_t Aspose::Slides::StreamWrapper::get_Position ( )
virtual

Gets the position within the current stream. Read-only int64_t.

Implements Aspose::Slides::IStreamWrapper.

◆ get_Stream()

System::SharedPtr<System::IO::Stream> Aspose::Slides::StreamWrapper::get_Stream ( )
virtual

Gets a stream. Read-only System::IO::Stream.

Implements Aspose::Slides::IStreamWrapper.

◆ Read()

void Aspose::Slides::StreamWrapper::Read ( System::ArrayPtr< uint8_t >  buffer,
int32_t  offset,
int32_t  count 
)
virtual

Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.

Implements Aspose::Slides::IStreamWrapper.

◆ ReadByte()

int32_t Aspose::Slides::StreamWrapper::ReadByte ( )
virtual

Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.

Returns

Implements Aspose::Slides::IStreamWrapper.

◆ Seek()

int64_t Aspose::Slides::StreamWrapper::Seek ( int64_t  offset,
System::IO::SeekOrigin  origin 
)
virtual

Sets the position within the current stream

Implements Aspose::Slides::IStreamWrapper.

◆ Write()

void Aspose::Slides::StreamWrapper::Write ( System::ArrayPtr< uint8_t >  buffer,
int32_t  offset,
int32_t  count 
)
virtual

writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.

Implements Aspose::Slides::IStreamWrapper.

◆ WriteByte()

void Aspose::Slides::StreamWrapper::WriteByte ( uint8_t  value)
virtual

Writes a byte to the current position in the stream and advances the position within the stream by one byte.

Parameters
value

Implements Aspose::Slides::IStreamWrapper.