Aspose::Pdf::DestinationCollection Class Referencefinal

Class represents the collection of all destinations (a name tree mapping name strings to destinations (see 12.3.2.3, "Named Destinations") and (see 7.7.4, "Name Dictionary")) in the pdf document. More...

Inherits System::Collections::Generic::ICollection< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > >.

Classes

class  DestinationEnumerator
 Class represents enumerator of the collection. More...
 

Public Member Functions

int32_t get_Count () const
 Gets the number of elements contained in the collection. More...
 
bool get_IsReadOnly () const
 Gets a value indicating whether the collection is read-only. More...
 
System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > idx_get (int32_t index)
 Gets the destination object by index. More...
 
int32_t GetPageNumber (System::String destinameName, bool useCache)
 Returns the page number of destination by the name. More...
 
System::SharedPtr< Annotations::ExplicitDestinationGetExplicitDestination (System::String destinameName, bool useCache)
 Returns the explicit destination by the name. More...
 
System::SharedPtr< System::Collections::Generic::IEnumerator< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > > > GetEnumerator ()
 Returns the enumerator. More...
 
int32_t IndexOf (System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object >> value)
 Returns the index of destination in collection. More...
 
bool Contains (System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object >> const &value) const
 Determines whether this instance contains the object. More...
 
void CopyTo (System::ArrayPtr< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object >>> array, int32_t arrayIndex)
 Copies the elements of the collection to an Array, starting at a particular Array index. More...
 
void Add (System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object >> const &item)
 Adds the specified item. Collection is read-only. Always throws NotSupportedException exception. More...
 
void Clear ()
 Collection is read-only. Always throws NotSupportedException exception. More...
 
bool Remove (System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object >> const &item)
 Removes the specified item. Collection is read-only. Always throws NotSupportedException exception. More...
 
- Public Member Functions inherited from System::Collections::Generic::ICollection< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > >
virtual void Add (const System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > &item)=0
 
virtual bool Contains (const System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > &item) const=0
 
virtual bool Remove (const System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > &item)=0
 
virtual void CopyTo (System::ArrayPtr< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > > 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::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > >
System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > LINQ_ElementAt (int index)
 
System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > LINQ_First ()
 
System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > LINQ_FirstOrDefault ()
 
System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > LINQ_FirstOrDefault (std::function< bool(System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > >)> predicate)
 
System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > LINQ_Last ()
 
System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > LINQ_LastOrDefault ()
 
SharedPtr< List< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > > > LINQ_ToList ()
 
int LINQ_Count ()
 
System::ArrayPtr< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > > LINQ_ToArray ()
 
bool LINQ_All (std::function< bool(System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > >)> predicate)
 
bool LINQ_Any ()
 
bool LINQ_Any (std::function< bool(System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > >)> predicate)
 
SharedPtr< IEnumerable< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > > > LINQ_Where (std::function< bool(System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > >)> predicate)
 
bool LINQ_Contains (System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > 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::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > >, 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

 DestinationCollection (System::SharedPtr< Document > document)
 Initializes new Destination collection instance from the document . More...
 
virtual ~DestinationCollection ()
 
- Protected Member Functions inherited from System::Collections::Generic::IEnumerable< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > >
 ~IEnumerable () override
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from System::Collections::Generic::ICollection< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > >
typedef System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > ValueType
 Value type name. More...
 
typedef ICollection< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > > ThisType
 Collection type name. More...
 
- Public Types inherited from System::Collections::Generic::IEnumerable< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > >
typedef IEnumerator< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > > > IEnumeratorType
 Enumerator type. More...
 
using ValueType = System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object > >
 
- 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 represents the collection of all destinations (a name tree mapping name strings to destinations (see 12.3.2.3, "Named Destinations") and (see 7.7.4, "Name Dictionary")) in the pdf document.

Constructor & Destructor Documentation

◆ DestinationCollection()

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

Initializes new Destination collection instance from the document .

Parameters
documentDocument contained destinations.

◆ ~DestinationCollection()

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

Member Function Documentation

◆ Add()

void Aspose::Pdf::DestinationCollection::Add ( System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object >> const &  item)

Adds the specified item. Collection is read-only. Always throws NotSupportedException exception.

Parameters
itemThe item.
Exceptions
NotSupportedException

◆ Clear()

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

◆ Contains()

bool Aspose::Pdf::DestinationCollection::Contains ( System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object >> const &  value) const

Determines whether this instance contains the object.

Parameters
valueThe value.
Returns
true if [contains] [the specified value]; otherwise, false.

◆ CopyTo()

void Aspose::Pdf::DestinationCollection::CopyTo ( System::ArrayPtr< System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object >>>  array,
int32_t  arrayIndex 
)

Copies the elements of the collection to an Array, starting at a particular Array index.

Parameters
arrayThe one-dimensional Array that is the destination of the elements copied from collection
arrayIndexThe zero-based index in array at which copying begins.

◆ get_Count()

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

◆ get_IsReadOnly()

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

◆ GetEnumerator()

◆ GetExplicitDestination()

System::SharedPtr<Annotations::ExplicitDestination> Aspose::Pdf::DestinationCollection::GetExplicitDestination ( System::String  destinameName,
bool  useCache 
)

Returns the explicit destination by the name.

Parameters
destinameNameThe name of destination.
useCacheDetermines whether cached version of collection is used or not.
Returns
The ExplicitDestination object for destination found; otherwise, null.

◆ GetPageNumber()

int32_t Aspose::Pdf::DestinationCollection::GetPageNumber ( System::String  destinameName,
bool  useCache 
)

Returns the page number of destination by the name.

Parameters
destinameNameThe name of destination.
useCacheDetermines whether cached version of collection is used or not.
Returns
The page number if destination was found; otherwise, -1.

◆ idx_get()

System::Collections::Generic::KeyValuePair<System::String, System::SharedPtr<System::Object> > Aspose::Pdf::DestinationCollection::idx_get ( int32_t  index)

Gets the destination object by index.

Parameters
indexThe index of destination to get.
Returns
Destination.

◆ IndexOf()

int32_t Aspose::Pdf::DestinationCollection::IndexOf ( System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object >>  value)

Returns the index of destination in collection.

Parameters
valueThe value to find.
Returns
The index of destination in collection.

◆ Remove()

bool Aspose::Pdf::DestinationCollection::Remove ( System::Collections::Generic::KeyValuePair< System::String, System::SharedPtr< System::Object >> const &  item)

Removes the specified item. Collection is read-only. Always throws NotSupportedException exception.

Parameters
itemThe item.
Returns
Exceptions
NotSupportedException