Aspose::Pdf::EmbeddedFileCollection Class Reference

Class representing embedded files collection. More...

Inherits System::Collections::Generic::ICollection< System::SharedPtr< Aspose::Pdf::FileSpecification > >.

Inherited by Aspose::Pdf::Collection.

Public Member Functions

bool get_IsSynchronized ()
 Gets a value indicating whether access to this collection is synchronized (thread safe). More...
 
System::SharedPtr< System::Objectget_SyncRoot () const
 Gets an object that can be used to synchronize access to this collection. More...
 
int32_t get_Count () const
 Gets number of embedded files in collection. More...
 
bool get_IsReadOnly () const
 Determines if collection is read only. Always returns false. More...
 
void CopyTo (System::ArrayPtr< System::SharedPtr< FileSpecification >> array, int32_t index)
 Copies array of FileSpecification object into colleciton. More...
 
System::SharedPtr< System::Collections::Generic::IEnumerator< System::SharedPtr< FileSpecification > > > GetEnumerator ()
 Returns colleciton enumerator. More...
 
void Add (System::SharedPtr< FileSpecification > const &file)
 Adds embedded file specification into collection. More...
 
void Add (System::String key, System::SharedPtr< FileSpecification > file)
 Adds file to embedded files with the specified key. More...
 
void DeleteByKey (System::String key)
 Deletes file from the collection by its key in the collection. More...
 
void Delete (System::String name)
 Delete embedded file by name. More...
 
void Delete ()
 Remove all embedded files from document. More...
 
bool Remove (System::SharedPtr< FileSpecification > const &item)
 Removes specified FileSpecification from collection. Not supported. More...
 
bool Contains (System::SharedPtr< FileSpecification > const &item) const
 Determines if collection contains specified FileSpecification. Not supported. More...
 
void Clear ()
 Remove all embedded files from document. More...
 
System::SharedPtr< FileSpecificationidx_get (int32_t index)
 Gets embedded file by its index. More...
 
System::SharedPtr< FileSpecificationidx_get (System::String name)
 Gets embedded file by its name. More...
 
- Public Member Functions inherited from System::Collections::Generic::ICollection< System::SharedPtr< Aspose::Pdf::FileSpecification > >
virtual void CopyTo (System::ArrayPtr< System::SharedPtr< Aspose::Pdf::FileSpecification > > array, int arrayIndex)=0
 
ICollectionoperator= (ICollection &&)
 
ICollectionoperator= (const ICollection &)
 
 ICollection ()
 Default constructor. More...
 
 ICollection (const ICollection &)
 Copy constructor. More...
 
 ICollection (ICollection &&)
 Move constructor. More...
 
virtual ~ICollection ()
 Destructor. More...
 
- Public Member Functions inherited from System::Collections::Generic::IEnumerable< System::SharedPtr< Aspose::Pdf::FileSpecification > >
System::SharedPtr< Aspose::Pdf::FileSpecificationLINQ_ElementAt (int index)
 
System::SharedPtr< Aspose::Pdf::FileSpecificationLINQ_First ()
 
System::SharedPtr< Aspose::Pdf::FileSpecificationLINQ_FirstOrDefault ()
 
System::SharedPtr< Aspose::Pdf::FileSpecificationLINQ_FirstOrDefault (std::function< bool(System::SharedPtr< Aspose::Pdf::FileSpecification >)> predicate)
 
System::SharedPtr< Aspose::Pdf::FileSpecificationLINQ_Last ()
 
System::SharedPtr< Aspose::Pdf::FileSpecificationLINQ_LastOrDefault ()
 
SharedPtr< List< System::SharedPtr< Aspose::Pdf::FileSpecification > > > LINQ_ToList ()
 
int LINQ_Count ()
 
System::ArrayPtr< System::SharedPtr< Aspose::Pdf::FileSpecification > > LINQ_ToArray ()
 
bool LINQ_All (std::function< bool(System::SharedPtr< Aspose::Pdf::FileSpecification >)> predicate)
 
bool LINQ_Any ()
 
bool LINQ_Any (std::function< bool(System::SharedPtr< Aspose::Pdf::FileSpecification >)> predicate)
 
SharedPtr< IEnumerable< System::SharedPtr< Aspose::Pdf::FileSpecification > > > LINQ_Where (std::function< bool(System::SharedPtr< Aspose::Pdf::FileSpecification >)> predicate)
 
bool LINQ_Contains (System::SharedPtr< Aspose::Pdf::FileSpecification > value)
 
SharedPtr< IEnumerable< ResultType > > LINQ_Cast ()
 
SharedPtr< IEnumerable< Result > > LINQ_Cast ()
 
SharedPtr< IEnumerable< ResultType > > LINQ_OfType ()
 
SharedPtr< IEnumerable< Result > > LINQ_OfType ()
 
SharedPtr< IEnumerable< ResultType > > LINQ_Select (const Func< System::SharedPtr< Aspose::Pdf::FileSpecification >, ResultType > &selector)
 
SharedPtr< IEnumerable< Result > > LINQ_Select (const Func< Source, Result > &selector)
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API 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...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () const
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API 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

 EmbeddedFileCollection ()
 Constructor of EmbeddedFileCollection. More...
 
 EmbeddedFileCollection (System::SharedPtr< Document > document)
 Constructor of EmbeddedFileCollection. More...
 
void ConvertToObjects ()
 
virtual ~EmbeddedFileCollection ()
 
- Protected Member Functions inherited from System::Collections::Generic::IEnumerable< System::SharedPtr< Aspose::Pdf::FileSpecification > >
 ~IEnumerable () override
 Destructor. More...
 

Protected Attributes

System::SharedPtr< Engine::IPdfDocument > EngineDoc
 PDF document where embedded files are placed. More...
 

Additional Inherited Members

- Public Types inherited from System::Collections::Generic::ICollection< System::SharedPtr< Aspose::Pdf::FileSpecification > >
typedef System::SharedPtr< Aspose::Pdf::FileSpecificationValueType
 Value type name. More...
 
typedef ICollection< System::SharedPtr< Aspose::Pdf::FileSpecification > > ThisType
 Collection type name. More...
 
- Public Types inherited from System::Collections::Generic::IEnumerable< System::SharedPtr< Aspose::Pdf::FileSpecification > >
typedef IEnumerator< System::SharedPtr< Aspose::Pdf::FileSpecification > > IEnumeratorType
 Enumerator type. More...
 
using ValueType = System::SharedPtr< Aspose::Pdf::FileSpecification >
 
- 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

Class representing embedded files collection.

Constructor & Destructor Documentation

◆ EmbeddedFileCollection() [1/2]

Aspose::Pdf::EmbeddedFileCollection::EmbeddedFileCollection ( )
protected

Constructor of EmbeddedFileCollection.

◆ EmbeddedFileCollection() [2/2]

Aspose::Pdf::EmbeddedFileCollection::EmbeddedFileCollection ( System::SharedPtr< Document document)
protected

Constructor of EmbeddedFileCollection.

Parameters
documentDocument where embedded files are placed.

◆ ~EmbeddedFileCollection()

virtual Aspose::Pdf::EmbeddedFileCollection::~EmbeddedFileCollection ( )
protectedvirtual

Member Function Documentation

◆ Add() [1/2]

void Aspose::Pdf::EmbeddedFileCollection::Add ( System::SharedPtr< FileSpecification > const &  file)
virtual

Adds embedded file specification into collection.

Parameters
fileFileSpecification which should be added into colleciton.

Implements System::Collections::Generic::ICollection< System::SharedPtr< Aspose::Pdf::FileSpecification > >.

◆ Add() [2/2]

void Aspose::Pdf::EmbeddedFileCollection::Add ( System::String  key,
System::SharedPtr< FileSpecification file 
)

Adds file to embedded files with the specified key.

Parameters
keyKey in the embedded files.
fileFile specification.

◆ Clear()

void Aspose::Pdf::EmbeddedFileCollection::Clear ( )
virtual

◆ Contains()

bool Aspose::Pdf::EmbeddedFileCollection::Contains ( System::SharedPtr< FileSpecification > const &  item) const
virtual

◆ ConvertToObjects()

void Aspose::Pdf::EmbeddedFileCollection::ConvertToObjects ( )
protected

◆ CopyTo()

void Aspose::Pdf::EmbeddedFileCollection::CopyTo ( System::ArrayPtr< System::SharedPtr< FileSpecification >>  array,
int32_t  index 
)

Copies array of FileSpecification object into colleciton.

Parameters
arrayArray of objects which will be copied.
indexStarting index from which copying will be started.

◆ Delete() [1/2]

void Aspose::Pdf::EmbeddedFileCollection::Delete ( System::String  name)

Delete embedded file by name.

Parameters
nameName of the embedded file which should be deleted.

◆ Delete() [2/2]

void Aspose::Pdf::EmbeddedFileCollection::Delete ( )

Remove all embedded files from document.

◆ DeleteByKey()

void Aspose::Pdf::EmbeddedFileCollection::DeleteByKey ( System::String  key)

Deletes file from the collection by its key in the collection.

Parameters
name

◆ get_Count()

int32_t Aspose::Pdf::EmbeddedFileCollection::get_Count ( ) const
virtual

◆ get_IsReadOnly()

bool Aspose::Pdf::EmbeddedFileCollection::get_IsReadOnly ( ) const
virtual

Determines if collection is read only. Always returns false.

Reimplemented from System::Collections::Generic::ICollection< System::SharedPtr< Aspose::Pdf::FileSpecification > >.

◆ get_IsSynchronized()

bool Aspose::Pdf::EmbeddedFileCollection::get_IsSynchronized ( )

Gets a value indicating whether access to this collection is synchronized (thread safe).

◆ get_SyncRoot()

System::SharedPtr<System::Object> Aspose::Pdf::EmbeddedFileCollection::get_SyncRoot ( ) const

Gets an object that can be used to synchronize access to this collection.

◆ GetEnumerator()

System::SharedPtr<System::Collections::Generic::IEnumerator<System::SharedPtr<FileSpecification> > > Aspose::Pdf::EmbeddedFileCollection::GetEnumerator ( )
virtual

Returns colleciton enumerator.

Returns
Enumerator of colleciton.

Implements System::Collections::Generic::IEnumerable< System::SharedPtr< Aspose::Pdf::FileSpecification > >.

◆ idx_get() [1/2]

System::SharedPtr<FileSpecification> Aspose::Pdf::EmbeddedFileCollection::idx_get ( int32_t  index)

Gets embedded file by its index.

Parameters
indexIndex of embedded file. Numbering is started from 1.
Returns
Retreived embedded file specification

◆ idx_get() [2/2]

System::SharedPtr<FileSpecification> Aspose::Pdf::EmbeddedFileCollection::idx_get ( System::String  name)

Gets embedded file by its name.

Parameters
nameEmbedded file name.
Returns
Retreived embedded file specification.

◆ Remove()

bool Aspose::Pdf::EmbeddedFileCollection::Remove ( System::SharedPtr< FileSpecification > const &  item)
virtual

Member Data Documentation

◆ EngineDoc

System::SharedPtr<Engine::IPdfDocument> Aspose::Pdf::EmbeddedFileCollection::EngineDoc
protected

PDF document where embedded files are placed.