All Frameworks  Class Hierarchy  This Framework  Indexes

VPMDesktopServices Class VPMIQAttribute

VPMIQAttribute
 

Usage: you must use this class as is. You should never derive it.


public class VPMIQAttribute

Class to describe the structure of an attribute of any kind of object.
Role: An object owns a dynamic list of attributes for creation, update and query. The definition of those attributes is done through this class : name of attribute, alias, visibility, mandatory, help values... This class is not meant to be subclassed.


Constructor and Destructor Index


o VPMIQAttribute(CATUnicodeString&,int,int,int,CATUnicodeString&,CATUnicodeString&,int,int,int,CATUnicodeString&)
Constructs w VPMIQAttribute instance.
o VPMIQAttribute(VPMIQAttribute&)
Copy constructor.
o ~VPMIQAttribute()
Destructor.

Method Index


o AddRef()
These do the same thing as the CATBaseUnknown methods by the same name, except these don't need to be virtual (as this class is never subclassed).
o GetAlias()
Gets the alias of the attribute.
o GetAuthorizedValues()
Gets the authorized values affected to the attribute.
o GetDBLength()
Gets the maximal length in database of the attribute (relevant if string type).
o GetDefaultValue()
Gets the default value of the attribute.
o GetEnabled()
Gets the enable facet of the attribute.
o GetError()
Gets the error facet of the attribute.
o GetFamily()
Gets the family owning the attribute.
o GetFormat()
Gets the format of display of the attribute.
o GetHelpValues()
Gets the help values affected to the attribute.
o GetLength()
Gets the actual length of the attribute (relevant if string type).
o GetLetterCase()
Gets the case of the attribute.
o GetListOfValues()
Gets the multiple values of the attribute in case of a multi-valuated attribute.
o GetName()
Gets the name of the attribute.
o GetObject()
Gets the type of the object owning the attribute.
o GetOrder()
Gets the order of appearance of the attribute in the object on the screen.
o GetQueriable()
Gets the queriable facet of the attribute.
o GetRequired()
Gets the mandatory facet of the attribute.
o GetSensible()
Gets the sensible facet of the attribute.
o GetType()
Gets the type of the attribute.
o GetUnique()
Gets the uniqueness of the attribute.
o GetUpdatable()
Gets the read / write facet of the attribute.
o GetVisibility()
Gets the visibility of the attribute.
o IsBinary()
Tests if the attribute is of Binary type.
o IsBoolean()
Tests if the attribute is of Boolean type.
o IsDate()
Tests if the attribute is of Date type.
o IsEntity()
Tests if the attribute is of Entity type.
o IsEnum()
Tests if the attribute is of Enumeration type.
o IsFloat()
Tests if the attribute is of Float type.
o IsInteger()
Tests if the attribute is of Integer type.
o IsList()
Tests if the attribute is of List type.
o IsSetOfEntity()
Tests if the attribute is of Set of Entities type.
o IsString()
Tests if the attribute is of String type.
o Release()
Decrements the reference count for the given interface.
o SetAlias(CATUnicodeString&)
Sets the alias of the attribute.
o SetAuthorizedValues(CATListOfCATUnicodeString&)
Sets the list of authorized values.
o SetDefaultValue(CATUnicodeString&)
Sets the default value of the attribute.
o SetEnabled(int)
Sets the enable facet of the attribute.
o SetError(int)
Sets the error facet of the attribute.
o SetFamily(CATUnicodeString&)
Sets the family of the attribute.
o SetFormat(CATUnicodeString&)
Sets the format of the attribute.
o SetHelpValues(CATListOfCATUnicodeString&)
Sets the list of help values.
o SetLength(int)
Sets the actual length of the attribute.
o SetLetterCase(int)
Sets the case of the attribute.
o SetListOfValues(CATListOfCATUnicodeString&)
Sets the multiple values of the attribute in case of a multi-valuated attribute.
o SetOrder(int)
Sets the order of appearance of the attribute in the object on the screen.
o SetQueriable(int)
Sets the queriable facet of the attribute.
o SetRequired(int)
Sets the mandatory facet of the attribute.
o SetSensible(int)
Sets the sensitive facet of the attribute.
o SetUnique(int)
Sets the uniqueness of the attribute.
o SetUpdatable(int)
Sets the read-write facet of the attribute.
o SetVisibility(int)
Sets the visibility of the attribute.
o operator =(VPMIQAttribute&)
Assignment operator.
o operator ==(VPMIQAttribute&)
Equality operator.

Constructor and Destructor


o VPMIQAttribute
public VPMIQAttribute( const CATUnicodeString& iName,
int iType,
int iLength= 300,
int iDBlength= 300,
const CATUnicodeString& iSynonym= VPMIQAttribute::DefaultSynonym,
const CATUnicodeString& iFamily= VPMIQAttribute::DefaultFamily,
int iRequired= 0,
int iUpdatable= 1,
int iUnique= 1,
const CATUnicodeString& iObject= VPMIQAttribute::DefaultObject )
Constructs w VPMIQAttribute instance. Some basic and mandatory fields are initialized.
Parameters:
iName
Name of the attribute.
iType
Type of the attribute (see the define section).
iLength
actual length of the attribute (for string attribute) (optional).
iDBlength
maximal length in database (for string attribute) (optional).
iSynonym
alias of the attribute to be displayed on screen (optional).
iFamily
Attribute of context properties or object (optional).
iRequired
true if the attribute is mandatory (optional).
iUpdatable
true if the attribute is read - write (optional).
iUnique
true if the attribute is unique (optional).
iObject
The object owning the attribute (optional).
o VPMIQAttribute
public VPMIQAttribute( const VPMIQAttribute& iOriginAttr)
Copy constructor.
Parameters:
iOriginAttr
The attribute to copy.
o ~VPMIQAttribute
public ~VPMIQAttribute()
Destructor. This is non virtual on purpose, however since we added a reference count, the size of these objects si the same as before.

Methods


o AddRef
public long AddRef()
These do the same thing as the CATBaseUnknown methods by the same name, except these don't need to be virtual (as this class is never subclassed). We don't want to derivate this class from CATBaseUnknown, as this would yield too many unused data members in the instances of this class. This reference counting is what lets us share instances between different instances of VPMIListOfAttributes, for instance.
o GetAlias
public const CATUnicodeString & GetAlias()
Gets the alias of the attribute.
o GetAuthorizedValues
public const CATListOfCATUnicodeString & GetAuthorizedValues()
Gets the authorized values affected to the attribute. If defined, the values of the attribute must be one of the list of authorized values.
o GetDBLength
public int GetDBLength()
Gets the maximal length in database of the attribute (relevant if string type).
o GetDefaultValue
public const CATUnicodeString & GetDefaultValue()
Gets the default value of the attribute.
o GetEnabled
public int GetEnabled()
Gets the enable facet of the attribute.
o GetError
public int GetError()
Gets the error facet of the attribute.
o GetFamily
public const CATUnicodeString & GetFamily()
Gets the family owning the attribute.
o GetFormat
public const CATUnicodeString & GetFormat()
Gets the format of display of the attribute.
o GetHelpValues
public const CATListOfCATUnicodeString & GetHelpValues()
Gets the help values affected to the attribute. If defined, the values of the attribute can be chosen from one of the list of help values.
o GetLength
public int GetLength()
Gets the actual length of the attribute (relevant if string type).
o GetLetterCase
public int GetLetterCase()
Gets the case of the attribute.
Returns:
<0 if the attribute is lower case, >0 if the attribute is upper case, =0 if none.
o GetListOfValues
public const CATListOfCATUnicodeString & GetListOfValues()
Gets the multiple values of the attribute in case of a multi-valuated attribute.
o GetName
public const CATUnicodeString & GetName()
Gets the name of the attribute.
o GetObject
public const CATUnicodeString & GetObject()
Gets the type of the object owning the attribute.
o GetOrder
public int GetOrder()
Gets the order of appearance of the attribute in the object on the screen.
o GetQueriable
public int GetQueriable()
Gets the queriable facet of the attribute.
o GetRequired
public int GetRequired()
Gets the mandatory facet of the attribute.
o GetSensible
public int GetSensible()
Gets the sensible facet of the attribute. If the attribute is sensible, the user exit will be called every time this attribute looses the focus.
o GetType
public int GetType()
Gets the type of the attribute. For a String attribute, the type returned is equal to 10 plus the length of the attribute.
o GetUnique
public int GetUnique()
Gets the uniqueness of the attribute.
o GetUpdatable
public int GetUpdatable()
Gets the read / write facet of the attribute.
o GetVisibility
public int GetVisibility()
Gets the visibility of the attribute.
o IsBinary
public CATBoolean IsBinary()const
Tests if the attribute is of Binary type.
Returns:
true if the attribute corresponds to an binary.
o IsBoolean
public CATBoolean IsBoolean()const
Tests if the attribute is of Boolean type.
Returns:
true if the attribute corresponds to an boolean.
o IsDate
public CATBoolean IsDate()const
Tests if the attribute is of Date type.
Returns:
true if the attribute corresponds to a date.
o IsEntity
public CATBoolean IsEntity()const
Tests if the attribute is of Entity type.
Returns:
true if the attribute corresponds to an entity.
o IsEnum
public CATBoolean IsEnum()const
Tests if the attribute is of Enumeration type.
Returns:
true if the attribute corresponds to an enumeration.
o IsFloat
public CATBoolean IsFloat()const
Tests if the attribute is of Float type.
Returns:
true if the attribute corresponds to an float.
o IsInteger
public CATBoolean IsInteger()const
Tests if the attribute is of Integer type.
Returns:
true if the attribute corresponds to an integer.
o IsList
public CATBoolean IsList()const
Tests if the attribute is of List type.
Returns:
true if the attribute corresponds to an list.
o IsSetOfEntity
public CATBoolean IsSetOfEntity()const
Tests if the attribute is of Set of Entities type.
Returns:
true if the attribute corresponds to an set of entities.
o IsString
public CATBoolean IsString()const
Tests if the attribute is of String type.
Returns:
true if the attribute corresponds to an string.
o Release
public long Release()
Decrements the reference count for the given interface.
Returns:
The reference count value.
o SetAlias
public void SetAlias( const CATUnicodeString& iAlias)
Sets the alias of the attribute.
o SetAuthorizedValues
public void SetAuthorizedValues( const CATListOfCATUnicodeString& iAuthorizedValues)
Sets the list of authorized values. If so, the attribute should not have help values.
o SetDefaultValue
public void SetDefaultValue( const CATUnicodeString& iDefaultValue)
Sets the default value of the attribute.
o SetEnabled
public void SetEnabled(int iEnabled)
Sets the enable facet of the attribute.
o SetError
public void SetError(int iError)
Sets the error facet of the attribute.
o SetFamily
public void SetFamily( const CATUnicodeString& iFamily)
Sets the family of the attribute.
o SetFormat
public void SetFormat( const CATUnicodeString& iFormat)
Sets the format of the attribute.
o SetHelpValues
public void SetHelpValues( const CATListOfCATUnicodeString& iHelpValues)
Sets the list of help values. If so, the attribute should not have authorized values.
o SetLength
public void SetLength(int iLength)
Sets the actual length of the attribute.
o SetLetterCase
public void SetLetterCase(int iLetterCase)
Sets the case of the attribute.
Parameters:
setlettercase
if >0, the attribute is upper case, if <0, the attribute is lower case, if =0, the attribute is none.
o SetListOfValues
public void SetListOfValues( const CATListOfCATUnicodeString& iListOfValues)
Sets the multiple values of the attribute in case of a multi-valuated attribute.
o SetOrder
public void SetOrder(int order)
Sets the order of appearance of the attribute in the object on the screen.
o SetQueriable
public void SetQueriable(int iQueriable)
Sets the queriable facet of the attribute.
o SetRequired
public void SetRequired(int iRequired)
Sets the mandatory facet of the attribute. Beware ! If the attribute is mandatory in the database, make sure that the user exit fills this attribute even if it is flagged as not required.
o SetSensible
public void SetSensible(int iSensible)
Sets the sensitive facet of the attribute. If the attribute is sensitive, the user-exit will be called every time the attribute looses the focus.
o SetUnique
public void SetUnique(int iUnique)
Sets the uniqueness of the attribute.
o SetUpdatable
public void SetUpdatable(int iUpdatable)
Sets the read-write facet of the attribute. Beware ! If the attribute is read-only in the database, then make it read-write will have no effect.
o SetVisibility
public void SetVisibility(int iVisibility)
Sets the visibility of the attribute.
o operator =
public const VPMIQAttribute & operator =( const VPMIQAttribute& iOriginAttr)
Assignment operator.
Parameters:
iOriginAttr
The attribute to copy.
o operator ==
public int operator ==( const VPMIQAttribute& iOtherAttr)const
Equality operator. The test is made on the name, the type and the alias.
Returns:
true if the two attributes are equal regarding the test.

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

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