All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

VPMInterfaces Interface VPMIIdentifierGeneratorMgr

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---VPMIIdentifierGeneratorMgr
 

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface VPMIIdentifierGeneratorMgr



Method Index


o end()
free the resources.
o getIdentifier(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&,int,int)
get an identifier guaranteed to be unique.
o getIdentifier(CATUnicodeString&,CATUnicodeString&,int,int)
get an identifier guaranteed to be unique.
o getIdentifierSuffix(CATUnicodeString&,int&,CATUnicodeString&)
For a given (Prefix,separator) , return an unique int identifier.
o getIdentifier_pad(CATUnicodeString&,CATUnicodeString&,int,int)
get an identifier guaranteed to be unique.
o getNConsecutiveIdentifier(CATUnicodeString&,CATUnicodeString&,int,CATListOfCATUnicodeString&,int,int)
get N consecutive identifiers guaranteed to be unique.
o getNConsecutiveIdentifier(CATUnicodeString&,int,CATListOfCATUnicodeString&,int,int)
get N consecutive identifiers guaranteed to be unique.
o getNConsecutiveIdentifierSuffix(CATUnicodeString&,int,int&,CATUnicodeString&)
For a given (prefix, separator) , return N Consecutive int Identifiers.
o getNConsecutiveIdentifier_pad(CATUnicodeString&,int,CATListOfCATUnicodeString&,int,int)
get N consecutive identifiers guaranteed to be unique.
o init(int)
initialize the IdentifierGenerator.
o setPrefixValue(CATUnicodeString&,CATUnicodeString&,int,int,int,int)
setPrefix.
o setPrefixValue(CATUnicodeString&,int,int,int)
setPrefix.
o setPrefixValue_pad(CATUnicodeString&,int,int,int,int)
setPrefix_pad.

Methods


o end
public virtual HRESULT end()=0
free the resources.
Returns:
An HRESULT value.
Legal values
S_OK
the initial value is set
E_FAIL
system failure.
o getIdentifier
public virtual HRESULT getIdentifier( const CATUnicodeString& iPrefix,
const CATUnicodeString& iSeparator,
CATUnicodeString& oIdentifier,
const int iPadding,
const int iMaxSize)=0
get an identifier guaranteed to be unique. this identifier is the concatenation of a string, a separator , and an integer.
Parameters:
iPrefix
[in] prefixes the identifier. his Size cannot be greater than xxx.
iSeparator
[in] character separating the Prefix from the integer counter. string size = 1. [0..9] are forbidden values.
oIdentifier
[out] the identifier generated
iPadding
[in] pad (left side ) the integer part with 0. iPadding > 0:the size in char of the integer part is equal to iPadding. iPadding =-1:no pad done.
iMaxSize
[in] the maximum size in byte of the identifier.
iForce
[in] iForce = 0 : if the size of oIdentifier is greater than iMaxSize then return S_FALSE and nothing is done. iForce = 1 : deprecated . return S_FALSE.
Returns:
An HRESULT value.
Legal values
S_OK
identifier generated successfully
S_FALSE
illegal parameters or cannot generate a greater identifier
E_FAIL
system failure.
o getIdentifier
public virtual HRESULT getIdentifier( const CATUnicodeString& iPrefix,
CATUnicodeString& oIdentifier,
const int iMaxSize=230,
const int iForce=0 )=0
get an identifier guaranteed to be unique. this identifier is the concatenation of a string, a separator ":", and a integer. the separator is ":".
Parameters:
iPrefix
[in] prefixes the identifier. his Size cannot be greater than xxx.
oIdentifier
[out] the identifier generated
iMaxSize
[in] the maximum size in byte of the identifier.
iForce
[in] iForce = 0 : if the size of oIdentifier is greater than iMaxSize then return S_FALSE and nothing is done. iForce = 1 : deprecated. return S_FALSE.
Returns:
An HRESULT value.
Legal values
S_OK
identifier generated successfully
S_FALSE
illegal parameters or cannot generate a greater identifier
E_FAIL
system failure.
o getIdentifierSuffix
public virtual HRESULT getIdentifierSuffix( const CATUnicodeString& iPrefix,
int& oIdentifier,
const CATUnicodeString& iSeparator)=0
For a given (Prefix,separator) , return an unique int identifier. the identifier returned is an int.
Parameters:
iPrefix
[in] prefixes the identifier.
oIdentifier
[out] the suffixe value returned.
iSeparator
[in] character separating the Prefix from the integer counter. string size = 1. [0..9] are forbidden values.
Returns:
An HRESULT value.
Legal values
S_OK
identifier generated successfully
S_FALSE
illegal parameters or cannot generate a greater identifier
E_FAIL
system failure.
o getIdentifier_pad
public virtual HRESULT getIdentifier_pad( const CATUnicodeString& iPrefix,
CATUnicodeString& oIdentifier,
const int iPadding,
const int iMaxSize)=0
get an identifier guaranteed to be unique. this identifier is the concatenation of a string, a separator , and an integer.
Parameters:
iPrefix
[in] prefixes the identifier. his Size cannot be greater than xxx.
oIdentifier
[out] the identifier generated
iPadding
[in] pad (left side ) the integer part with 0. iPadding > 0:the size in char of the integer part is equal to iPadding. iPadding =-1:no pad done.
iMaxSize
[in] the maximum size in byte of the identifier.
Returns:
An HRESULT value.
Legal values
S_OK
identifier generated successfully
S_FALSE
illegal parameters or cannot generate a greater identifier
E_FAIL
system failure.
o getNConsecutiveIdentifier
public virtual HRESULT getNConsecutiveIdentifier( const CATUnicodeString& iPrefix,
const CATUnicodeString& iSeparator,
const int iNbIdentifiers,
CATListOfCATUnicodeString& olIdentifiers,
const int iPadding,
const int iMaxSize)=0
get N consecutive identifiers guaranteed to be unique. these identifiers are the concatenation of a string, a separator , and an integer.
Parameters:
iPrefix
[in] prefixes the identifier. his Size cannot be greater than xxx.
iSeparator
[in] character separating the Prefix from the integer counter. string size = 1. [0..9] are forbidden values.
iNbIdentifiers
[in] the number of identifiers to be generated.
olIdentifiers
[out] a list containing the identifiers returned.
iPadding
[in] pad (left side ) the integer part with 0. iPadding > 0:the size in char of the integer part is equal to iPadding. iPadding =-1:no pad done.
iMaxSize
[in] the maximum size in byte of the identifier.
Returns:
An HRESULT value.
Legal values
S_OK
identifiers generated successfully
S_FALSE
illegal parameters or cannot generate an identifier
E_FAIL
system failure.
o getNConsecutiveIdentifier
public virtual HRESULT getNConsecutiveIdentifier( const CATUnicodeString& cPrefix,
const int iNbSuffix,
CATListOfCATUnicodeString& olIdentifiers,
const int iMaxSize=230,
const int iForce=0 )=0
get N consecutive identifiers guaranteed to be unique. these identifiers are the concatenation of a string, a separator ":", and a integer. the separator is ":"
Parameters:
iPrefix
[in] prefixes the identifier. his Size cannot be greater than xxx.
iNbIdentifiers
[in] the number of identifiers to be generated.
olIdentifiers
[out] a list containing the identifiers returned.
iMaxSize
[in] the maximum size in byte of the identifier.
iForce
[in] iForce = 0 : if the size of oIdentifier is greater than iMaxSize then return S_FALSE and nothing is done. iForce = 1 : deprecated . return S_FALSE.
Returns:
An HRESULT value.
Legal values
S_OK
identifiers generated successfully
S_FALSE
illegal parameters or cannot generate an identifier
E_FAIL
system failure.
o getNConsecutiveIdentifierSuffix
public virtual HRESULT getNConsecutiveIdentifierSuffix( const CATUnicodeString& iPrefix,
const int iNbIdentifiers,
int& oIdentifiers,
const CATUnicodeString& iSeparator=":")=0
For a given (prefix, separator) , return N Consecutive int Identifiers.
Parameters:
iPrefix
[in] prefixes the identifier.
iNbIdentifiers
[in] the number of identifiers to be generated.
oIdentifier
[out] The first identifier.
iSeparator
[in] character separating the Prefix from the integer counter. string size = 1. [0..9] are forbidden values.
Returns:
An HRESULT value.
Legal values
S_OK
identifiers generated successfully
S_FALSE
illegal parameters or cannot generate an identifier
E_FAIL
system failure.
o getNConsecutiveIdentifier_pad
public virtual HRESULT getNConsecutiveIdentifier_pad( const CATUnicodeString& iPrefix,
const int iNbIdentifiers,
CATListOfCATUnicodeString& olIdentifiers,
const int iPadding,
const int iMaxSize)=0
get N consecutive identifiers guaranteed to be unique. these identifiers are the concatenation of a string, a separator , and an integer.
Parameters:
iPrefix
[in] prefixes the identifier. his Size cannot be greater than xxx.
iNbIdentifiers
[in] the number of identifiers to be generated.
olIdentifiers
[out] a list containing the identifiers returned.
iPadding
[in] pad (left side ) the integer part with 0. iPadding > 0:the size in char of the integer part is equal to iPadding. iPadding =-1:no pad done.
iMaxSize
[in] the maximum size in byte of the identifier.
Returns:
An HRESULT value.
Legal values
S_OK
identifiers generated successfully
S_FALSE
illegal parameters or cannot generate an identifier
E_FAIL
system failure.
o init
public virtual HRESULT init(int iMode= 0)=0
initialize the IdentifierGenerator.called by the VPMSession.
Parameters:
iMode
[in] not used.
Returns:
An HRESULT value.
Legal values
S_OK
initialization is successful
E_FAIL
failure. (Database connection or settings pb)
o setPrefixValue
public virtual HRESULT setPrefixValue( const CATUnicodeString& iPrefix,
const CATUnicodeString& iSeparator,
const int iValue,
const int iPadding,
const int iMaxSize,
const int iForce)=0
setPrefix. used to set the initial value for a prefix.
Parameters:
iPrefix
[in] the prefix of the identifier to set.
iSeparator
[in] character separating the Prefix from the integer counter. string size = 1. [0..9] are forbidden values.
iValue
[in] the value for the next given suffixe.
iPadding
[in] pad (left side ) the integer part with 0. iPadding > 0:the size in char of the integer part is equal to iPadding. iPadding =-1:no pad done.
iMaxSize
[in] size overflow.
iForce
[in] iForce=0 : if the current value for iPrefix is greater than iValue return S_FALSE. if there is no current value or the current value is less than iValue the next given value will be iValue. iForce=1 : set the value without controls
Returns:
An HRESULT value.
Legal values
S_OK
the initial value is set
S_FALSE
illegal parameters or cannot set the initial value
E_FAIL
system failure.
o setPrefixValue
public virtual HRESULT setPrefixValue( const CATUnicodeString& iPrefix,
const int iValue=0 ,
const int iMaxSize=230,
const int iForce=0 )=0
setPrefix. used to set the initial value for a prefix. the separator is supposed to be ":".
Parameters:
iPrefix
[in] the prefix of the identifier to set.
iValue
[in] the value for the next given suffixe.
iMaxSize
[in] size overflow.
iForce
[in] iForce=0 : if the current value for iPrefix is greater than iValue return S_FALSE. if there is no current value or the current value is less than iValue the next given value will be iValue. iForce=1 : set the value without controls
Returns:
An HRESULT value.
Legal values
S_OK
the initial value is set
S_FALSE
illegal parameters or cannot set the initial value
E_FAIL
system failure.
o setPrefixValue_pad
public virtual HRESULT setPrefixValue_pad( const CATUnicodeString& iPrefix,
const int iValue,
const int iPadding,
const int iMaxSize,
const int iForce)=0
setPrefix_pad. used to set the initial value for a prefix.
Parameters:
iPrefix
[in] the prefix of the identifier to set.
iValue
[in] the value for the next given suffixe.
iPadding
[in] pad (left side ) the integer part with 0. iPadding > 0:the size in char of the integer part is equal to iPadding. iPadding =-1:no pad done.
iMaxSize
[in] size overflow.
iForce
[in] iForce=0 : if the current value for iPrefix is greater than iValue return S_FALSE. if there is no current value or the current value is less than iValue the next given value will be iValue. iForce=1 : set the value without controls
Returns:
An HRESULT value.
Legal values
S_OK
the initial value is set
S_FALSE
illegal parameters or cannot set the initial value
E_FAIL
system failure.

This object is included in the file: VPMIIdentifierGeneratorMgr.h
If needed, your Imakefile.mk should include the module: GUIDVPMInterfaces

Copyright © 2003, Dassault Systèmes. All rights reserved.