Aspose::Cells::Properties::IDocumentPropertyCollection Class Referenceabstract

Base class for IBuiltInDocumentPropertyCollection and ICustomDocumentPropertyCollection collections. More...

Inherits IEnumerable, and Object.

Inherited by Aspose::Cells::Properties::IBuiltInDocumentPropertyCollection [virtual], and Aspose::Cells::Properties::ICustomDocumentPropertyCollection [virtual].

Public Member Functions

virtual Aspose::Cells::Systems::Int32 GetCount ()=0
 Gets number of items in the collection. More...
 
virtual intrusive_ptr< Aspose::Cells::Properties::IDocumentPropertyGetObjectByIndex (intrusive_ptr< Aspose::Cells::Systems::String > name)=0
 Returns a IDocumentProperty object by the name of the property. More...
 
virtual intrusive_ptr< Aspose::Cells::Properties::IDocumentPropertyGetObjectByIndex (Aspose::Cells::Systems::Int32 index)=0
 Returns a IDocumentProperty object by index. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::Collections::IEnumerator > GetEnumerator ()=0
 
virtual bool Contains (intrusive_ptr< Aspose::Cells::Systems::String > name)=0
 Returns true if a property with the specified name exists in the collection. More...
 
virtual Aspose::Cells::Systems::Int32 IndexOf (intrusive_ptr< Aspose::Cells::Systems::String > name)=0
 Gets the index of a property by name. More...
 
virtual void Remove (intrusive_ptr< Aspose::Cells::Systems::String > name)=0
 Removes a property with the specified name from the collection. More...
 
virtual void RemoveAt (Aspose::Cells::Systems::Int32 index)=0
 Removes a property at the specified index. More...
 
virtual void Clear ()=0
 Removes all properties from the collection. More...
 
virtual void add_ref ()
 
virtual int release_ref ()
 

Detailed Description

Base class for IBuiltInDocumentPropertyCollection and ICustomDocumentPropertyCollection collections.

[C++]
//Instantiate an IWorkbook object, which must contains document property
intrusive_ptr<Aspose::Cells::IWorkbook> workbook = Factory::CreateIWorkbook(new String("C:\\book1.xls"));
//Retrieve a list of all custom document properties of the Excel file
intrusive_ptr<Aspose::Cells::Properties::ICustomDocumentPropertyCollection> customProperties =
workbook->GetIWorksheets()->GetICustomDocumentProperties();
//Accessng a custom document property by using the property index
intrusive_ptr<Aspose::Cells::Properties::IDocumentProperty> customProperty1 = customProperties->GetIndexObject(3);
//Accessng a custom document property by using the property name
intrusive_ptr<Aspose::Cells::Properties::IDocumentProperty> customProperty2 = customProperties->GetIndexObject(new String("Owner"));

Member Function Documentation

◆ add_ref()

virtual void Aspose::Cells::Properties::IDocumentPropertyCollection::add_ref ( )
inlinevirtual

◆ Clear()

virtual void Aspose::Cells::Properties::IDocumentPropertyCollection::Clear ( )
pure virtual

Removes all properties from the collection.

◆ Contains()

virtual bool Aspose::Cells::Properties::IDocumentPropertyCollection::Contains ( intrusive_ptr< Aspose::Cells::Systems::String >  name)
pure virtual

Returns true if a property with the specified name exists in the collection.

Parameters
nameThe case-insensitive name of the property.
Returns
True if the property exists in the collection; false otherwise.

◆ GetCount()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::Properties::IDocumentPropertyCollection::GetCount ( )
pure virtual

Gets number of items in the collection.

◆ GetEnumerator()

virtual intrusive_ptr<Aspose::Cells::Systems::Collections::IEnumerator> Aspose::Cells::Properties::IDocumentPropertyCollection::GetEnumerator ( )
pure virtual

Returns

◆ GetObjectByIndex() [1/2]

virtual intrusive_ptr<Aspose::Cells::Properties::IDocumentProperty> Aspose::Cells::Properties::IDocumentPropertyCollection::GetObjectByIndex ( intrusive_ptr< Aspose::Cells::Systems::String >  name)
pure virtual

Returns a IDocumentProperty object by the name of the property.

<overloads>Returns a IDocumentProperty object.</overloads>

Returns null if a property with the specified name is not found.

Parameters
nameThe case-insensitive name of the property to retrieve.

Implemented in Aspose::Cells::Properties::IBuiltInDocumentPropertyCollection.

◆ GetObjectByIndex() [2/2]

virtual intrusive_ptr<Aspose::Cells::Properties::IDocumentProperty> Aspose::Cells::Properties::IDocumentPropertyCollection::GetObjectByIndex ( Aspose::Cells::Systems::Int32  index)
pure virtual

Returns a IDocumentProperty object by index.

Parameters
indexZero-based index of the IDocumentProperty to retrieve.

◆ IndexOf()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::Properties::IDocumentPropertyCollection::IndexOf ( intrusive_ptr< Aspose::Cells::Systems::String >  name)
pure virtual

Gets the index of a property by name.

Parameters
nameThe case-insensitive name of the property.
Returns
The zero based index. Negative value if not found.

◆ release_ref()

virtual int Aspose::Cells::Properties::IDocumentPropertyCollection::release_ref ( )
inlinevirtual

◆ Remove()

virtual void Aspose::Cells::Properties::IDocumentPropertyCollection::Remove ( intrusive_ptr< Aspose::Cells::Systems::String >  name)
pure virtual

Removes a property with the specified name from the collection.

Parameters
nameThe case-insensitive name of the property.

◆ RemoveAt()

virtual void Aspose::Cells::Properties::IDocumentPropertyCollection::RemoveAt ( Aspose::Cells::Systems::Int32  index)
pure virtual

Removes a property at the specified index.

Parameters
indexThe zero based index.