Aspose::Pdf::Annotations::AnnotationSelector Class Referencefinal

This class is used for selecting annotations using Visitor template idea. More...

#include "AnnotationSelector.h"

Inherits Aspose::Pdf::Annotations::IAnnotationVisitor.

Public Member Functions

ASPOSE_PDF_SHARED_API System::SharedPtr< System::Collections::Generic::IList< System::SharedPtr< Annotation > > > get_Selected () const
 The list of selected objects. More...
 
ASPOSE_PDF_SHARED_API AnnotationSelector ()
 Initializes new instance of the AnnotationSelector class. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< LinkAnnotation > link) override
 Select link annotation if AnnotationSelector was initialized with LinkAnnotation object. More...
 
ASPOSE_PDF_SHARED_API AnnotationSelector (System::SharedPtr< Annotation > annotation)
 Initializes new AnnotationSelector object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< FileAttachmentAnnotation > attachment) override
 Select attachment annotation if AnnotationSelector was initialized with FileAttachmentAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< TextAnnotation > text) override
 Select text annotation if AnnotationSelector was initialized with TextAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< RedactionAnnotation > redact)
 Select redact annotation if AnnotationSelector was initialized with RedactAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< FreeTextAnnotation > freetext) override
 Select freetext annotation if AnnotationSelector was initialized with FreeTextAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< HighlightAnnotation > highlight) override
 Select attachment annotation if AnnotationSelector was initialized with FreeTextAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< UnderlineAnnotation > underline) override
 Select underline annotation if AnnotationSelector was initialized with UnderlineAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< StrikeOutAnnotation > strikeOut) override
 Select strikeOut annotation if AnnotationSelector was initialized with StrikeOutAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< SquigglyAnnotation > squiggly) override
 Select squiggly annotation if AnnotationSelector was initialized with SquigglyAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< PopupAnnotation > popup) override
 Select popup annotation if AnnotationSelector was initialized with PopupAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< LineAnnotation > line) override
 Select line annotation if AnnotationSelector was initialized with LineAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< CircleAnnotation > circle) override
 Select circle annotation if AnnotationSelector was initialized with CircleAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< SquareAnnotation > square) override
 Select square annotation if AnnotationSelector was initialized with SquareAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< InkAnnotation > ink) override
 Select ink annotation if AnnotationSelector was initialized with InkAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< PolylineAnnotation > polyline) override
 Select polyline annotation if AnnotationSelector was initialized with PolylineAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< PolygonAnnotation > polygon) override
 Select polygon annotation if AnnotationSelector was initialized with PolygonAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< CaretAnnotation > caret) override
 Select caret annotation if AnnotationSelector was initialized with CaretAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< StampAnnotation > stamp) override
 Select stamp annotation if AnnotationSelector was initialized with StampAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< WidgetAnnotation > widget) override
 Select widget annotation if AnnotationSelector was initialized with WidgetAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< WatermarkAnnotation > watermark)
 Select watermark annotation if AnnotationSelector was initialized with WatermarkAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< MovieAnnotation > movie) override
 Select movie annotation if AnnotationSelector was initialized with MovieAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< RichMediaAnnotation > richMedia)
 Select movie annotation if AnnotationSelector was initialized with RichMedia annotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< ScreenAnnotation > screen) override
 Select screen annotation if AnnotationSelector was initialized with ScreenAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< PDF3DAnnotation > pdf3D)
 Select PDF3D annotation if AnnotationSelector was initialized with PDF3DAnnotation object. More...
 
ASPOSE_PDF_SHARED_API void Visit (System::SharedPtr< ColorBarAnnotation > colorBar)
 Select ColorBar annotation if AnnotationSelector was initialized with ColorBar object. More...
 
- 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 reference 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 int32_t 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 (uint32_t argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
virtual ASPOSECPP_SHARED_API bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool Equals (double const &objA, double const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 Specialization of Object::ReferenceEquals for case of string and nullptr. More...
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 Specialization of Object::ReferenceEquals for case of strings. More...
 

Protected Attributes

System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Annotation > > > selected
 
System::SharedPtr< Annotationannotation
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. 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 ()
 Implements C# typeof(System.Object) construct. More...
 

Detailed Description

This class is used for selecting annotations using Visitor template idea.

Constructor & Destructor Documentation

◆ AnnotationSelector() [1/2]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Annotations::AnnotationSelector::AnnotationSelector ( )

Initializes new instance of the AnnotationSelector class.

◆ AnnotationSelector() [2/2]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Annotations::AnnotationSelector::AnnotationSelector ( System::SharedPtr< Annotation annotation)

Initializes new AnnotationSelector object.

Parameters
annotationAnnotation to be selected. This object only describes some characteristics we want found annotations to have, e.g. the type of annotation.

Member Function Documentation

◆ get_Selected()

ASPOSE_PDF_SHARED_API System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<Annotation> > > Aspose::Pdf::Annotations::AnnotationSelector::get_Selected ( ) const

The list of selected objects.

◆ Visit() [1/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< LinkAnnotation link)
overridevirtual

Select link annotation if AnnotationSelector was initialized with LinkAnnotation object.

Parameters
linkLinkAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [2/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< FileAttachmentAnnotation attachment)
overridevirtual

Select attachment annotation if AnnotationSelector was initialized with FileAttachmentAnnotation object.

Parameters
attachmentFileAttachmentAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [3/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< TextAnnotation text)
overridevirtual

Select text annotation if AnnotationSelector was initialized with TextAnnotation object.

Parameters
textTextAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [4/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< RedactionAnnotation redact)

Select redact annotation if AnnotationSelector was initialized with RedactAnnotation object.

Parameters
redactRedactAnnotation object for selecting.

◆ Visit() [5/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< FreeTextAnnotation freetext)
overridevirtual

Select freetext annotation if AnnotationSelector was initialized with FreeTextAnnotation object.

Parameters
freetextFreeTextAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [6/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< HighlightAnnotation highlight)
overridevirtual

Select attachment annotation if AnnotationSelector was initialized with FreeTextAnnotation object.

Parameters
highlightHighlightAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [7/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< UnderlineAnnotation underline)
overridevirtual

Select underline annotation if AnnotationSelector was initialized with UnderlineAnnotation object.

Parameters
underlineUnderlineAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [8/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< StrikeOutAnnotation strikeOut)
overridevirtual

Select strikeOut annotation if AnnotationSelector was initialized with StrikeOutAnnotation object.

Parameters
strikeOutStrikeOutAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [9/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< SquigglyAnnotation squiggly)
overridevirtual

Select squiggly annotation if AnnotationSelector was initialized with SquigglyAnnotation object.

Parameters
squigglySquigglyAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [10/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< PopupAnnotation popup)
overridevirtual

Select popup annotation if AnnotationSelector was initialized with PopupAnnotation object.

Parameters
popupPopupAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [11/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< LineAnnotation line)
overridevirtual

Select line annotation if AnnotationSelector was initialized with LineAnnotation object.

Parameters
lineLineAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [12/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< CircleAnnotation circle)
overridevirtual

Select circle annotation if AnnotationSelector was initialized with CircleAnnotation object.

Parameters
circleCircleAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [13/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< SquareAnnotation square)
overridevirtual

Select square annotation if AnnotationSelector was initialized with SquareAnnotation object.

Parameters
squareSquareAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [14/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< InkAnnotation ink)
overridevirtual

Select ink annotation if AnnotationSelector was initialized with InkAnnotation object.

Parameters
inkInkAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [15/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< PolylineAnnotation polyline)
overridevirtual

Select polyline annotation if AnnotationSelector was initialized with PolylineAnnotation object.

Parameters
polylinePolylineAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [16/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< PolygonAnnotation polygon)
overridevirtual

Select polygon annotation if AnnotationSelector was initialized with PolygonAnnotation object.

Parameters
polygonPolygonAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [17/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< CaretAnnotation caret)
overridevirtual

Select caret annotation if AnnotationSelector was initialized with CaretAnnotation object.

Parameters
caretCaretAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [18/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< StampAnnotation stamp)
overridevirtual

Select stamp annotation if AnnotationSelector was initialized with StampAnnotation object.

Parameters
stampStampAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [19/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< WidgetAnnotation widget)
overridevirtual

Select widget annotation if AnnotationSelector was initialized with WidgetAnnotation object.

Parameters
widgetWidgetAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [20/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< WatermarkAnnotation watermark)

Select watermark annotation if AnnotationSelector was initialized with WatermarkAnnotation object.

Parameters
watermarkWatermarkAnnotation for selecting.

◆ Visit() [21/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< MovieAnnotation movie)
overridevirtual

Select movie annotation if AnnotationSelector was initialized with MovieAnnotation object.

Parameters
movieMovieAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [22/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< RichMediaAnnotation richMedia)

Select movie annotation if AnnotationSelector was initialized with RichMedia annotation object.

Parameters
richMediaRichMedia annotation.

◆ Visit() [23/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< ScreenAnnotation screen)
overridevirtual

Select screen annotation if AnnotationSelector was initialized with ScreenAnnotation object.

Parameters
screenScreenAnnotation object for selecting.

Implements Aspose::Pdf::Annotations::IAnnotationVisitor.

◆ Visit() [24/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< PDF3DAnnotation pdf3D)

Select PDF3D annotation if AnnotationSelector was initialized with PDF3DAnnotation object.

Parameters
pdf3DPDF3DAnnotation object for selecting.

◆ Visit() [25/25]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Annotations::AnnotationSelector::Visit ( System::SharedPtr< ColorBarAnnotation colorBar)

Select ColorBar annotation if AnnotationSelector was initialized with ColorBar object.

Parameters
colorBarPDF3DAnnotation object for selecting.

Member Data Documentation

◆ annotation

System::SharedPtr<Annotation> Aspose::Pdf::Annotations::AnnotationSelector::annotation
protected

◆ selected

System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Annotation> > > Aspose::Pdf::Annotations::AnnotationSelector::selected
protected