All Frameworks  Class Hierarchy  This Framework  Indexes   

VPMDesktopServices Class 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()
Destructor.
o VPMIQAttribute(VPMIQAttribute&)
Copy constructor.
o VPMIQAttribute(CATUnicodeString&,int,int,int,CATUnicodeString&,CATUnicodeString&,int,int,int,CATUnicodeString&)
Constructs w VPMIQAttribute instance.

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&)
Equality operator.
o operator =(VPMIQAttribute&)
Assignment operator.

Constructor and Destructor


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.
o VPMIQAttribute
public VPMIQAttribute( const iOriginAttr)
Copy constructor.
Parameters:
iOriginAttr
The attribute to copy.
o VPMIQAttribute
public VPMIQAttribute( const iName,
iType,
iLength= 300,
iDBlength= 300,
const iSynonym= VPMIQAttribute::DefaultSynonym,
const iFamily= VPMIQAttribute::DefaultFamily,
iRequired= 0,
iUpdatable= 1,
iUnique= 1,
const 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).

Methods


o AddRef
public 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 GetAlias()
Gets the alias of the attribute.
o GetAuthorizedValues
public 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 GetDBLength()
Gets the maximal length in database of the attribute (relevant if string type).
o GetDefaultValue
public GetDefaultValue()
Gets the default value of the attribute.
o GetEnabled
public GetEnabled()
Gets the enable facet of the attribute.
o GetError
public GetError()
Gets the error facet of the attribute.
o GetFamily
public GetFamily()
Gets the family owning the attribute.
o GetFormat
public GetFormat()
Gets the format of display of the attribute.
o GetHelpValues
public 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 GetLength()
Gets the actual length of the attribute (relevant if string type).
o GetLetterCase
public 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 GetListOfValues()
Gets the multiple values of the attribute in case of a multi-valuated attribute.
o GetName
public GetName()
Gets the name of the attribute.
o GetObject
public GetObject()
Gets the type of the object owning the attribute.
o GetOrder
public GetOrder()
Gets the order of appearance of the attribute in the object on the screen.
o GetQueriable
public GetQueriable()
Gets the queriable facet of the attribute.
o GetRequired
public GetRequired()
Gets the mandatory facet of the attribute.
o GetSensible
public 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 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 GetUnique()
Gets the uniqueness of the attribute.
o GetUpdatable
public GetUpdatable()
Gets the read / write facet of the attribute.
o GetVisibility
public GetVisibility()
Gets the visibility of the attribute.
o IsBinary
public IsBinary()
Tests if the attribute is of Binary type.
Returns:
true if the attribute corresponds to an binary.
o IsBoolean
public IsBoolean()
Tests if the attribute is of Boolean type.
Returns:
true if the attribute corresponds to an boolean.
o IsDate
public IsDate()
Tests if the attribute is of Date type.
Returns:
true if the attribute corresponds to a date.
o IsEntity
public IsEntity()
Tests if the attribute is of Entity type.
Returns:
true if the attribute corresponds to an entity.
o IsEnum
public IsEnum()
Tests if the attribute is of Enumeration type.
Returns:
true if the attribute corresponds to an enumeration.
o IsFloat
public IsFloat()
Tests if the attribute is of Float type.
Returns:
true if the attribute corresponds to an float.
o IsInteger
public IsInteger()
Tests if the attribute is of Integer type.
Returns:
true if the attribute corresponds to an integer.
o IsList
public IsList()
Tests if the attribute is of List type.
Returns:
true if the attribute corresponds to an list.
o IsSetOfEntity
public IsSetOfEntity()
Tests if the attribute is of Set of Entities type.
Returns:
true if the attribute corresponds to an set of entities.
o IsString
public IsString()
Tests if the attribute is of String type.
Returns:
true if the attribute corresponds to an string.
o Release
public Release()
Decrements the reference count for the given interface.
Returns:
The reference count value.
o SetAlias
public SetAlias( const iAlias)
Sets the alias of the attribute.
o SetAuthorizedValues
public SetAuthorizedValues( const iAuthorizedValues)
Sets the list of authorized values. If so, the attribute should not have help values.
o SetDefaultValue
public SetDefaultValue( const iDefaultValue)
Sets the default value of the attribute.
o SetEnabled
public SetEnabled( iEnabled)
Sets the enable facet of the attribute.
o SetError
public SetError( iError)
Sets the error facet of the attribute.
o SetFamily
public SetFamily( const iFamily)
Sets the family of the attribute.
o SetFormat
public SetFormat( const iFormat)
Sets the format of the attribute.
o SetHelpValues
public SetHelpValues( const iHelpValues)
Sets the list of help values. If so, the attribute should not have authorized values.
o SetLength
public SetLength( iLength)
Sets the actual length of the attribute.
o SetLetterCase
public SetLetterCase( 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 SetListOfValues( const iListOfValues)
Sets the multiple values of the attribute in case of a multi-valuated attribute.
o SetOrder
public SetOrder( order)
Sets the order of appearance of the attribute in the object on the screen.
o SetQueriable
public SetQueriable( iQueriable)
Sets the queriable facet of the attribute.
o SetRequired
public SetRequired( 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 SetSensible( 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 SetUnique( iUnique)
Sets the uniqueness of the attribute.
o SetUpdatable
public SetUpdatable( 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 SetVisibility( iVisibility)
Sets the visibility of the attribute.
o operator ==
public operator ==( const iOtherAttr)
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.
o operator =
public operator =( const iOriginAttr)
Assignment operator.
Parameters:
iOriginAttr
The attribute to copy.

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.