Aspose.Tasks for C++
Aspose::Tasks::RateCollection Class Reference

Represents a collection which contains Rate objects. More...

#include <RateCollection.h>

Inherits System::Collections::Generic::IDictionary< typename, typename >.

Public Member Functions

int32_t get_Count () const override
 Gets the number of elements contained in the RateCollection. More...
 
bool get_IsReadOnly () const override
 Gets a value indicating whether this collection is read only. More...
 
System::SharedPtr< Resourceget_ParentResource () const
 Gets the parent Resource object for this collection. More...
 
System::SharedPtr< RateByDateCollectionidx_get (const RateType &key) const override
 Returns the element at the specified index. More...
 
void idx_set (const RateType &key, System::SharedPtr< RateByDateCollection > value) override
 Sets the element at the specified index. More...
 
System::SharedPtr< RateAdd (System::DateTime ratesFrom)
 Adds a new Rate instance to this collection. More...
 
System::SharedPtr< RateAdd (System::DateTime ratesFrom, RateType type)
 Adds a new Rate instance to this collection. More...
 
bool Remove (const System::SharedPtr< Rate > &item)
 Removes Rate instance from this collection. More...
 
System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Rate > > > ToList () const
 Converts the RateCollection object to a list of Rate objects. More...
 
System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Rate > > > ToList (RateType type) const
 Converts the RateCollection object to a list of Rate objects filtered by specified RateType type. More...
 

Detailed Description

Represents a collection which contains Rate objects.

Member Function Documentation

◆ Add() [1/2]

System::SharedPtr<Rate> Aspose::Tasks::RateCollection::Add ( System::DateTime  ratesFrom)

Adds a new Rate instance to this collection.

Parameters
ratesFromThe date the new rate comes into effect.
Returns
Added Rate instance.

◆ Add() [2/2]

System::SharedPtr<Rate> Aspose::Tasks::RateCollection::Add ( System::DateTime  ratesFrom,
RateType  type 
)

Adds a new Rate instance to this collection.

Parameters
ratesFromThe date the new rate comes into effect.
typeThe rate table to add into.
Returns
Added Rate instance.

◆ get_Count()

int32_t Aspose::Tasks::RateCollection::get_Count ( ) const
override

Gets the number of elements contained in the RateCollection.

◆ get_IsReadOnly()

bool Aspose::Tasks::RateCollection::get_IsReadOnly ( ) const
override

Gets a value indicating whether this collection is read only.

◆ get_ParentResource()

System::SharedPtr<Resource> Aspose::Tasks::RateCollection::get_ParentResource ( ) const

Gets the parent Resource object for this collection.

◆ idx_get()

System::SharedPtr<RateByDateCollection> Aspose::Tasks::RateCollection::idx_get ( const RateType &  key) const
override

Returns the element at the specified index.

Parameters
keyThe zero-based index of the element to get or set.
Returns
the element at the specified index.

◆ idx_set()

void Aspose::Tasks::RateCollection::idx_set ( const RateType &  key,
System::SharedPtr< RateByDateCollection value 
)
override

Sets the element at the specified index.

Parameters
keyThe zero-based index of the element to get or set.
valuethe element at the specified index.

◆ Remove()

bool Aspose::Tasks::RateCollection::Remove ( const System::SharedPtr< Rate > &  item)

Removes Rate instance from this collection.

Parameters
itemThe item to remove.
Returns
true if the specified Rate was removed successfully; otherwise, false.

◆ ToList() [1/2]

System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Rate> > > Aspose::Tasks::RateCollection::ToList ( ) const

Converts the RateCollection object to a list of Rate objects.

Returns
List of Rate objects.

◆ ToList() [2/2]

System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Rate> > > Aspose::Tasks::RateCollection::ToList ( RateType  type) const

Converts the RateCollection object to a list of Rate objects filtered by specified RateType type.

Parameters
typeThe type to filter on.
Returns
a list of Rate objects.