Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

IDSSLocales Interface Reference

List of all members.

Detailed Description

DSSLocales is a collection of object reference to DSSLocale object.

It is a sequence container that can add, remove and access instantly by index.

DSSLocales is primarily backed by ObjectReferences which is further backed by vector structure. As a result it has all the characteristics that a vector container has.

DSSLocales keeps record of the primary locale of this collection.


Public Member Functions

HRESULT _NewEnum ([out, retval] IUnknown oppNewEnum)
 The usual VB enumerator method.
HRESULT Add ([in] IDSSLocale *ipLocale)
 Add an item into the collection.
HRESULT Clear ()
 Clear all the elements in this collection and set the primary locale to null.
HRESULT Count ([out, retval] Int32 *opCount)
 The number of members in the collection.
HRESULT IsSupported ([in] Int32 iLocale,[out, retval] VARIANT_BOOL *opIsSupported)
 Find out if the given locale is in the cached set of metadata or data locales supported by the project that this object source is serving.
HRESULT Item ([in] VARIANT *ipIndex,[out, retval] IDSSLocale oppLocale)
 Obtain a particular member of the collection.
HRESULT MapToSupported ([in] Int32 iLocale,[out, retval] Int32 *opLocale)
 Map an arbitrary locale id to a metadata or data locale that is supported by the project that this source is serving.
HRESULT Primary ([in] IDSSLocale *ipLocale)
 Set the primary locale of this locale collection.
HRESULT Primary ([out, retval] IDSSLocale oppLocale)
 Return the primary locale of this locale collection.
HRESULT Remove ([in] VARIANT *ipIndex)
 Remove a locale from the collection by index.


Member Function Documentation

HRESULT IDSSLocales::_NewEnum [out, retval] IUnknown   oppNewEnum  ) 
 

The usual VB enumerator method.

This is the standard property used to return the objects in a collection. It returns an enumerator object. Calling methods on the enumerator object retrieves the contents of the collection.

Parameters:
oppNewEnum An IUnknown pointer to the enumerator object. The object is returned using the standard IEnumVARIANT interface.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSLocales::Add [in] IDSSLocale ipLocale  ) 
 

Add an item into the collection.

If the locale already exists in the collection, do nothing. If this collection doesn't have a primary locale at this moment, this new item will be set as the primary locale.

Parameters:
ipLocale The locale to be put into this collection.
Returns:
Usual COM result code:
  • S_OK Success

HRESULT IDSSLocales::Clear  ) 
 

Clear all the elements in this collection and set the primary locale to null.

Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSLocales::Count [out, retval] Int32 *  opCount  ) 
 

The number of members in the collection.

The Count method returns the number of members in the collection.

Parameters:
opCount The number of items in this collection.
Returns:
Usual COM result code:
  • S_OK Success
  • E_POINTER pCount is NULL

HRESULT IDSSLocales::IsSupported [in] Int32  iLocale,
[out, retval] VARIANT_BOOL *  opIsSupported
 

Find out if the given locale is in the cached set of metadata or data locales supported by the project that this object source is serving.

Parameters:
iLocale The id of the locale to check.
opIsSupported Set to VARIANT_TRUE if iLocale is supported, VARIANT_FALSE otherwise.
Returns:
Usual COM result code:
  • S_OK Success

HRESULT IDSSLocales::Item [in] VARIANT *  ipIndex,
[out, retval] IDSSLocale   oppLocale
 

Obtain a particular member of the collection.

The Item number returns a member in the collection. An index number for the member must be provided.

Parameters:
ipIndex Index of the member to return. Index starts from 1.
oppLocale The requested member of the collection.
Returns:
Usual COM result code:
  • S_OK Success
  • DSSCOM_E_INDEX_OUT_OF_RANGE Index is less than 1, or greater than Count

HRESULT IDSSLocales::MapToSupported [in] Int32  iLocale,
[out, retval] Int32 *  opLocale
 

Map an arbitrary locale id to a metadata or data locale that is supported by the project that this source is serving.

The mapping is performed using the cached set of locales.

Parameters:
iLocale The locale to be mapped to a supported locale.
opLocale The supported locale.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSLocales::Primary [in] IDSSLocale ipLocale  ) 
 

Set the primary locale of this locale collection.

Parameters:
ipLocale The primary locale of this locale collection.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSLocales::Primary [out, retval] IDSSLocale   oppLocale  ) 
 

Return the primary locale of this locale collection.

Parameters:
oppLocale The primary locale of this locale collection, null if the collection is empty.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSLocales::Remove [in] VARIANT *  ipIndex  ) 
 

Remove a locale from the collection by index.

The primary locale will be set to null if the locale to be removed is the last element in this collection. The first elment in this collection will be the primary locale if the current primary locale is to be removed.

Parameters:
ipIndex the index of the locale to be removed. It can be of one of the following types:
  • Number numeric index into the collection
Returns:
Usual COM result code:
  • S_OK
  • DSSCOM_E_INDEX_OUT_OF_RANGE Index is less than 1, or greater than Count


Copyright © 1996-2018 MicroStrategy Inc. All Rights Reserved.