Aspose::Words::Properties::CustomDocumentProperties Class Reference

Detailed Description

A collection of custom document properties.

Each DocumentProperty object represents a custom property of a container document.

See also
Aspose::Words::Document, Aspose::Words::Document::get_BuiltInDocumentProperties, Aspose::Words::Document::get_CustomDocumentProperties

The names of the properties are case-insensitive.

The properties in the collection are sorted alphabetically by name.

#include <Aspose.Words.Cpp/Model/Properties/CustomDocumentProperties.h>

+ Inheritance diagram for Aspose::Words::Properties::CustomDocumentProperties:

Public Member Functions

SharedPtr< DocumentPropertyAdd (String name, bool value)
 Creates a new custom document property of the PropertyType.Boolean data type. More...
 
SharedPtr< DocumentPropertyAdd (String name, double value)
 Creates a new custom document property of the PropertyType.Float data type. More...
 
SharedPtr< DocumentPropertyAdd (String name, int32_t value)
 Creates a new custom document property of the PropertyType.Number data type. More...
 
SharedPtr< DocumentPropertyAdd (String name, DateTime value)
 Creates a new custom document property of the PropertyType.DateTime data type. More...
 
SharedPtr< DocumentPropertyAdd (String name, String value)
 Creates a new custom document property of the PropertyType.String data type. More...
 
SharedPtr< DocumentPropertyAddLinkToContent (String name, String linkSource)
 Creates a new linked to content custom document property. More...
 
- Public Member Functions inherited from DocumentPropertyCollection
void Clear ()
 Removes all properties from the collection. More...
 
bool Contains (String name)
 Returns true if a property with the specified name exists in the collection. More...
 
int32_t get_Count ()
 Gets number of items in the collection. More...
 
SharedPtr< IEnumerator< SharedPtr< DocumentProperty > > > GetEnumerator ()
 Returns an enumerator object that can be used to iterate over all items in the collection. More...
 
SharedPtr< DocumentPropertyidx_get (int32_t index)
 Returns a DocumentProperty object by index. More...
 
virtual SharedPtr< DocumentPropertyidx_get (String name)
 Returns a DocumentProperty object by the name of the property. More...
 
int32_t IndexOf (String name)
 Gets the index of a property by name. More...
 
void Remove (String name)
 Removes a property with the specified name from the collection. More...
 
void RemoveAt (int32_t index)
 Removes a property at the specified index. More...
 
- Public Member Functions inherited from System::Collections::Generic::IEnumerable< System::SharedPtr< Aspose::Words::Properties::DocumentProperty > >
EnumeratorBasedIterator< T, IEnumerator< T > > begin () noexcept
 
EnumeratorBasedIterator< T, IEnumerator< T > > cbegin () noexcept
 
EnumeratorBasedIterator< T, IEnumerator< T > > cend () noexcept
 
EnumeratorBasedIterator< T, IEnumerator< T > > end () noexcept
 
bool LINQ_All (std::function< bool(T)> predicate)
 
bool LINQ_Any ()
 
bool LINQ_Any (std::function< bool(T)> predicate)
 
SharedPtr< IEnumerable< ResultType > > LINQ_Cast ()
 
SharedPtr< IEnumerable< Result > > LINQ_Cast ()
 
bool LINQ_Contains (T value)
 
int LINQ_Count ()
 
LINQ_ElementAt (int index)
 
LINQ_First ()
 
LINQ_FirstOrDefault ()
 
LINQ_FirstOrDefault (std::function< bool(T)> predicate)
 
LINQ_Last ()
 
LINQ_LastOrDefault ()
 
SharedPtr< IEnumerable< ResultType > > LINQ_OfType ()
 
SharedPtr< IEnumerable< Result > > LINQ_OfType ()
 
SharedPtr< IEnumerable< Result > > LINQ_Select (const Func< Source, Result > &selector)
 
SharedPtr< IEnumerable< ResultType > > LINQ_Select (const Func< T, ResultType > &selector)
 
ArrayPtr< T > LINQ_ToArray ()
 
SharedPtr< List< T > > LINQ_ToList ()
 
SharedPtr< IEnumerable< T > > LINQ_Where (std::function< bool(T)> predicate)
 
- Public Member Functions inherited from Object
ASPOSECPP_SHARED_API Object ()
 
ASPOSECPP_SHARED_API Object (Object const &x)
 
virtual ASPOSECPP_SHARED_API ~Object ()
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 
Detail::SmartPtrCounter * GetCounter ()
 
virtual ASPOSECPP_SHARED_API int GetHashCode () const
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 
ASPOSECPP_SHARED_API void Lock ()
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 
Objectoperator= (Object const &x)
 
bool ReferenceEquals (String const &str, std::nullptr_t)
 
bool ReferenceEquals (String const &str1, String const &str2)
 
int RemovedSharedRefs (int count)
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (unsigned int argument)
 
int SharedCount () const
 
ObjectSharedRefAdded ()
 
int SharedRefRemovedSafe ()
 
virtual ASPOSECPP_SHARED_API String ToString () const
 
ASPOSECPP_SHARED_API void Unlock ()
 
Detail::SmartPtrCounter * WeakRefAdded ()
 
void WeakRefRemoved ()
 

Additional Inherited Members

- Public Types inherited from System::Collections::Generic::IEnumerable< System::SharedPtr< Aspose::Words::Properties::DocumentProperty > >
typedef IEnumerator< T > IEnumeratorType
 
typedef T ValueType
 
- Public Types inherited from Object
typedef SmartPtr< Objectptr
 
typedef System::Details::SharedMembersType shared_members_type
 
- Static Public Member Functions inherited from Object
bool Equals (double const &objA, double const &objB)
 
bool Equals (float const &objA, float const &objB)
 
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 
static const TypeInfoType ()
 

Member Function Documentation

◆ Add() [1/5]

System::SharedPtr<Aspose::Words::Properties::DocumentProperty> Aspose::Words::Properties::CustomDocumentProperties::Add ( System::String  name,
bool  value 
)

Creates a new custom document property of the PropertyType.Boolean data type.

Parameters
nameThe name of the property.
valueThe value of the property.
Returns
The newly created property object.

◆ Add() [2/5]

System::SharedPtr<Aspose::Words::Properties::DocumentProperty> Aspose::Words::Properties::CustomDocumentProperties::Add ( System::String  name,
double  value 
)

Creates a new custom document property of the PropertyType.Float data type.

Parameters
nameThe name of the property.
valueThe value of the property.
Returns
The newly created property object.

◆ Add() [3/5]

System::SharedPtr<Aspose::Words::Properties::DocumentProperty> Aspose::Words::Properties::CustomDocumentProperties::Add ( System::String  name,
int32_t  value 
)

Creates a new custom document property of the PropertyType.Number data type.

Parameters
nameThe name of the property.
valueThe value of the property.
Returns
The newly created property object.

◆ Add() [4/5]

System::SharedPtr<Aspose::Words::Properties::DocumentProperty> Aspose::Words::Properties::CustomDocumentProperties::Add ( System::String  name,
System::DateTime  value 
)

Creates a new custom document property of the PropertyType.DateTime data type.

Parameters
nameThe name of the property.
valueThe value of the property.
Returns
The newly created property object.

◆ Add() [5/5]

System::SharedPtr<Aspose::Words::Properties::DocumentProperty> Aspose::Words::Properties::CustomDocumentProperties::Add ( System::String  name,
System::String  value 
)

Creates a new custom document property of the PropertyType.String data type.

Parameters
nameThe name of the property.
valueThe value of the property.
Returns
The newly created property object.

◆ AddLinkToContent()

System::SharedPtr<Aspose::Words::Properties::DocumentProperty> Aspose::Words::Properties::CustomDocumentProperties::AddLinkToContent ( System::String  name,
System::String  linkSource 
)

Creates a new linked to content custom document property.

Parameters
nameThe name of the property.
linkSourceThe source of the property.
Returns
The newly created property object or null when the linkSource is invalid.