Aspose::Words::MailMerging::MappedDataFieldCollection Class Reference

Detailed Description

Allows to automatically map between names of fields in your data source and names of mail merge fields in the document.

This is implemented as a collection of string keys into string values. The keys are the names of mail merge fields in the document and the values are the names of fields in your data source.

See also
Aspose::Words::MailMerging::MailMerge
Aspose::Words::MailMerging::MailMerge::get_MappedDataFields

#include <Aspose.Words.Cpp/MailMerging/MappedDataFieldCollection.h>

+ Inheritance diagram for Aspose::Words::MailMerging::MappedDataFieldCollection:

Public Types

using const_iterator = typename const_iterator
 
using iterator = typename iterator
 
using iterator_holder_type = Dictionary< String, String >
 

Public Member Functions

void Add (String documentFieldName, String dataSourceFieldName)
 Adds a new field mapping. More...
 
const_iterator begin () const noexcept
 
iterator begin () noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 
void Clear ()
 Removes all elements from the collection. More...
 
bool ContainsKey (String documentFieldName)
 Determines whether a mapping from the specified field in the document exists in the collection. More...
 
bool ContainsValue (String dataSourceFieldName)
 Determines whether a mapping from the specified field in the data source exists in the collection. More...
 
const_iterator end () const noexcept
 
iterator end () noexcept
 
int32_t get_Count ()
 Gets the number of elements contained in the collection. More...
 
SharedPtr< IEnumerator< KeyValuePair< String, String > > > GetEnumerator () override
 Returns a dictionary enumerator object that can be used to iterate over all items in the collection. More...
 
virtual const TypeInfoGetType () const override
 
String idx_get (String documentFieldName)
 Gets or sets the name of the field in the data source associated with the specified mail merge field. More...
 
void idx_set (String documentFieldName, String value)
 Gets or sets the name of the field in the data source associated with the specified mail merge field. More...
 
virtual bool Is (const TypeInfo &target) const override
 
void Remove (String documentFieldName)
 Removes a field mapping. More...
 

Static Public Member Functions

static const TypeInfoType ()
 

Member Typedef Documentation

◆ const_iterator

◆ iterator

◆ iterator_holder_type

Member Function Documentation

◆ Add()

void Aspose::Words::MailMerging::MappedDataFieldCollection::Add ( System::String  documentFieldName,
System::String  dataSourceFieldName 
)

Adds a new field mapping.

Parameters
documentFieldNameCase-sensitive name of the mail merge field in the document.
dataSourceFieldNameCase-sensitive name of the field in the data source.

◆ begin() [1/2]

const_iterator Aspose::Words::MailMerging::MappedDataFieldCollection::begin ( ) const
noexcept

◆ begin() [2/2]

iterator Aspose::Words::MailMerging::MappedDataFieldCollection::begin ( )
noexcept

◆ cbegin()

const_iterator Aspose::Words::MailMerging::MappedDataFieldCollection::cbegin ( ) const
noexcept

◆ cend()

const_iterator Aspose::Words::MailMerging::MappedDataFieldCollection::cend ( ) const
noexcept

◆ Clear()

void Aspose::Words::MailMerging::MappedDataFieldCollection::Clear ( )

Removes all elements from the collection.

◆ ContainsKey()

bool Aspose::Words::MailMerging::MappedDataFieldCollection::ContainsKey ( System::String  documentFieldName)

Determines whether a mapping from the specified field in the document exists in the collection.

Parameters
documentFieldNameCase-sensitive name of the mail merge field in the document.
Returns
True if item is found in the collection; otherwise, false.

◆ ContainsValue()

bool Aspose::Words::MailMerging::MappedDataFieldCollection::ContainsValue ( System::String  dataSourceFieldName)

Determines whether a mapping from the specified field in the data source exists in the collection.

Parameters
dataSourceFieldNameCase-sensitive name of the field in the data source.
Returns
True if item is found in the collection; otherwise, false.

◆ end() [1/2]

const_iterator Aspose::Words::MailMerging::MappedDataFieldCollection::end ( ) const
noexcept

◆ end() [2/2]

iterator Aspose::Words::MailMerging::MappedDataFieldCollection::end ( )
noexcept

◆ get_Count()

int32_t Aspose::Words::MailMerging::MappedDataFieldCollection::get_Count ( )

Gets the number of elements contained in the collection.

◆ GetEnumerator()

System::SharedPtr<System::Collections::Generic::IEnumerator<System::Collections::Generic::KeyValuePair<System::String, System::String> > > Aspose::Words::MailMerging::MappedDataFieldCollection::GetEnumerator ( )
override

Returns a dictionary enumerator object that can be used to iterate over all items in the collection.

◆ GetType()

virtual const System::TypeInfo& Aspose::Words::MailMerging::MappedDataFieldCollection::GetType ( ) const
overridevirtual

Reimplemented from System::Object.

◆ idx_get()

System::String Aspose::Words::MailMerging::MappedDataFieldCollection::idx_get ( System::String  documentFieldName)

Gets or sets the name of the field in the data source associated with the specified mail merge field.

◆ idx_set()

void Aspose::Words::MailMerging::MappedDataFieldCollection::idx_set ( System::String  documentFieldName,
System::String  value 
)

Gets or sets the name of the field in the data source associated with the specified mail merge field.

◆ Is()

virtual bool Aspose::Words::MailMerging::MappedDataFieldCollection::Is ( const System::TypeInfo target) const
overridevirtual

Reimplemented from System::Object.

◆ Remove()

void Aspose::Words::MailMerging::MappedDataFieldCollection::Remove ( System::String  documentFieldName)

Removes a field mapping.

Parameters
documentFieldNameCase-sensitive name of the mail merge field in the document.

◆ Type()

static const System::TypeInfo& Aspose::Words::MailMerging::MappedDataFieldCollection::Type ( )
static