Aspose::Slides::IBlobManagementOptions Class Referenceabstract

A Binary Large Object (BLOB) is a binary data stored as a single entity - i.e. BLOB can be an audio, video or presentation itself. A number of techniques are used to optimize memory consumption while working with BLOBs - which was already stored in the presentation or be added later programmatically. Using IBlobManagementOptions you can change a different behavior aspects regarding BLOBs handling for the IPresentation instance lifetime. More...

Inherits System::Object.

Inherited by Aspose::Slides::BlobManagementOptions.

Public Member Functions

virtual Aspose::Slides::PresentationLockingBehavior get_PresentationLockingBehavior ()=0
 This property defines if an instance of the Presentation class can be an owner of the source - file or stream during the instance lifetime. If the instance is an owner, it locks the source. This helps to improve memory consumption and performance while working with BLOBs, but the source (stream or file) can't be changed during Presentation's instance lifetime. This is an example:

auto loadOptions = MakeObject<LoadOptions>();
loadOptions->get_BlobManagementOptions()->set_PresentationLockingBehavior(PresentationLockingBehavior::KeepLocked);
{
auto pres = MakeObject<Presentation>(u"pres.pptx", loadOptions);
// IOException will be thrown because pres.pptx is locked for a Presentation lifetime
// File::Delete(u"pres.pptx");
}
// after Presentation object destroyed, file is unlocked and can be deleted
IO::File::Delete(u"pres.pptx");
More...
 
virtual void set_PresentationLockingBehavior (Aspose::Slides::PresentationLockingBehavior value)=0
 This property defines if an instance of the Presentation class can be an owner of the source - file or stream during the instance lifetime. If the instance is an owner, it locks the source. This helps to improve memory consumption and performance while working with BLOBs, but the source (stream or file) can't be changed during Presentation's instance lifetime. This is an example:

auto loadOptions = MakeObject<LoadOptions>();
loadOptions->get_BlobManagementOptions()->set_PresentationLockingBehavior(PresentationLockingBehavior::KeepLocked);
{
auto pres = MakeObject<Presentation>(u"pres.pptx", loadOptions);
// IOException will be thrown because pres.pptx is locked for a Presentation lifetime
// File::Delete(u"pres.pptx");
}
// after Presentation object destroyed, file is unlocked and can be deleted
IO::File::Delete(u"pres.pptx");
More...
 
virtual bool get_IsTemporaryFilesAllowed ()=0
 This property defines if temporary files can be created while working with BLOBs, what greatly decreases the memory consumption but requires permissions to create files. More...
 
virtual void set_IsTemporaryFilesAllowed (bool value)=0
 This property defines if temporary files can be created while working with BLOBs, what greatly decreases the memory consumption but requires permissions to create files. More...
 
virtual System::String get_TempFilesRootPath ()=0
 The root path where temporary files will be created. Hosting process should have permissions to create files and folders there. More...
 
virtual void set_TempFilesRootPath (System::String value)=0
 The root path where temporary files will be created. Hosting process should have permissions to create files and folders there. More...
 
virtual uint64_t get_MaxBlobsBytesInMemory ()=0
 Defines the maximum amount (in bytes) that all BLOBs in total may occupy in memory. First, all BLOBs loading into memory as default behavior and only when it reaches the limit defined by this property, other mechanisms (such as temporary files) can be involved. In terms of performance, the most efficient way is storing BLOBs in memory, but from the other side, it leads to a high memory consumption what may be undesirable. Using this property, you may set the optimal behavior for your environment or other requirements. More...
 
virtual void set_MaxBlobsBytesInMemory (uint64_t value)=0
 Defines the maximum amount (in bytes) that all BLOBs in total may occupy in memory. First, all BLOBs loading into memory as default behavior and only when it reaches the limit defined by this property, other mechanisms (such as temporary files) can be involved. In terms of performance, the most efficient way is storing BLOBs in memory, but from the other side, it leads to a high memory consumption what may be undesirable. Using this property, you may set the optimal behavior for your environment or other requirements. 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)
 

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

A Binary Large Object (BLOB) is a binary data stored as a single entity - i.e. BLOB can be an audio, video or presentation itself. A number of techniques are used to optimize memory consumption while working with BLOBs - which was already stored in the presentation or be added later programmatically. Using IBlobManagementOptions you can change a different behavior aspects regarding BLOBs handling for the IPresentation instance lifetime.

Member Function Documentation

◆ get_IsTemporaryFilesAllowed()

virtual bool Aspose::Slides::IBlobManagementOptions::get_IsTemporaryFilesAllowed ( )
pure virtual

This property defines if temporary files can be created while working with BLOBs, what greatly decreases the memory consumption but requires permissions to create files.

All files will be deleted after work with the presentation will be finished.

Implemented in Aspose::Slides::BlobManagementOptions.

◆ get_MaxBlobsBytesInMemory()

virtual uint64_t Aspose::Slides::IBlobManagementOptions::get_MaxBlobsBytesInMemory ( )
pure virtual

Defines the maximum amount (in bytes) that all BLOBs in total may occupy in memory. First, all BLOBs loading into memory as default behavior and only when it reaches the limit defined by this property, other mechanisms (such as temporary files) can be involved. In terms of performance, the most efficient way is storing BLOBs in memory, but from the other side, it leads to a high memory consumption what may be undesirable. Using this property, you may set the optimal behavior for your environment or other requirements.

This property will be ignored if IsTemporaryFilesAllowed is set to false. It makes no sense to limit the maximum BLOBs in memory, because if IsTemporaryFilesAllowed is set to false, the memory is the only place where BLOBs can be stored.

Default value is 629,145,600 bytes (600Mb).

Implemented in Aspose::Slides::BlobManagementOptions.

◆ get_PresentationLockingBehavior()

virtual Aspose::Slides::PresentationLockingBehavior Aspose::Slides::IBlobManagementOptions::get_PresentationLockingBehavior ( )
pure virtual

This property defines if an instance of the Presentation class can be an owner of the source - file or stream during the instance lifetime. If the instance is an owner, it locks the source. This helps to improve memory consumption and performance while working with BLOBs, but the source (stream or file) can't be changed during Presentation's instance lifetime. This is an example:

auto loadOptions = MakeObject<LoadOptions>();
loadOptions->get_BlobManagementOptions()->set_PresentationLockingBehavior(PresentationLockingBehavior::KeepLocked);
{
auto pres = MakeObject<Presentation>(u"pres.pptx", loadOptions);
// IOException will be thrown because pres.pptx is locked for a Presentation lifetime
// File::Delete(u"pres.pptx");
}
// after Presentation object destroyed, file is unlocked and can be deleted
IO::File::Delete(u"pres.pptx");

Implemented in Aspose::Slides::BlobManagementOptions.

◆ get_TempFilesRootPath()

virtual System::String Aspose::Slides::IBlobManagementOptions::get_TempFilesRootPath ( )
pure virtual

The root path where temporary files will be created. Hosting process should have permissions to create files and folders there.

Implemented in Aspose::Slides::BlobManagementOptions.

◆ set_IsTemporaryFilesAllowed()

virtual void Aspose::Slides::IBlobManagementOptions::set_IsTemporaryFilesAllowed ( bool  value)
pure virtual

This property defines if temporary files can be created while working with BLOBs, what greatly decreases the memory consumption but requires permissions to create files.

All files will be deleted after work with the presentation will be finished.

Implemented in Aspose::Slides::BlobManagementOptions.

◆ set_MaxBlobsBytesInMemory()

virtual void Aspose::Slides::IBlobManagementOptions::set_MaxBlobsBytesInMemory ( uint64_t  value)
pure virtual

Defines the maximum amount (in bytes) that all BLOBs in total may occupy in memory. First, all BLOBs loading into memory as default behavior and only when it reaches the limit defined by this property, other mechanisms (such as temporary files) can be involved. In terms of performance, the most efficient way is storing BLOBs in memory, but from the other side, it leads to a high memory consumption what may be undesirable. Using this property, you may set the optimal behavior for your environment or other requirements.

This property will be ignored if IsTemporaryFilesAllowed is set to false. It makes no sense to limit the maximum BLOBs in memory, because if IsTemporaryFilesAllowed is set to false, the memory is the only place where BLOBs can be stored.

Default value is 629,145,600 bytes (600Mb).

Implemented in Aspose::Slides::BlobManagementOptions.

◆ set_PresentationLockingBehavior()

virtual void Aspose::Slides::IBlobManagementOptions::set_PresentationLockingBehavior ( Aspose::Slides::PresentationLockingBehavior  value)
pure virtual

This property defines if an instance of the Presentation class can be an owner of the source - file or stream during the instance lifetime. If the instance is an owner, it locks the source. This helps to improve memory consumption and performance while working with BLOBs, but the source (stream or file) can't be changed during Presentation's instance lifetime. This is an example:

auto loadOptions = MakeObject<LoadOptions>();
loadOptions->get_BlobManagementOptions()->set_PresentationLockingBehavior(PresentationLockingBehavior::KeepLocked);
{
auto pres = MakeObject<Presentation>(u"pres.pptx", loadOptions);
// IOException will be thrown because pres.pptx is locked for a Presentation lifetime
// File::Delete(u"pres.pptx");
}
// after Presentation object destroyed, file is unlocked and can be deleted
IO::File::Delete(u"pres.pptx");

Implemented in Aspose::Slides::BlobManagementOptions.

◆ set_TempFilesRootPath()

virtual void Aspose::Slides::IBlobManagementOptions::set_TempFilesRootPath ( System::String  value)
pure virtual

The root path where temporary files will be created. Hosting process should have permissions to create files and folders there.

Implemented in Aspose::Slides::BlobManagementOptions.