All Categories  Class Hierarchy  This Category  Previous  Next  Indexes

Product Class CATDMUsrFeature

CATDMUsrFeature
 


public class CATDMUsrFeature

Feature management class.
Role: this class is used to manage features (i.e. extensions attached to parts, documents or models).
Any access to an instance requires a valid connection to the environment it belongs to, using the CATDMUsrEnvironment API.
Security checks are performed whenever required, as in standard VPM interactive functions.
Data persistency is not managed by this class; it must be handled separately through the CATDMUsrConnection API.

See also:
CATDMUsrConnection, CATDMUsrEnvironment


Constructor and Destructor Index


o CATDMUsrFeature()
Default constructor.
o CATDMUsrFeature(CATDMUsrFeature&)
Copy constructor.
o CATDMUsrFeature(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&,CATUnicodeString&)
Constructor.
o CATDMUsrFeature(CATUnicodeString&,CATUnicodeString&,double,double)
Constructor.
o CATDMUsrFeature(ObjID&)
Constructor from an ObjID.
o CATDMUsrFeature(char*)
Constructor from an UUID.
o ~CATDMUsrFeature()
Destructor.

Method Index


o Create(CATDMUsrInstance&,CATUnicodeString&,CATListOfCATUnicodeString&,CATListOfCATUnicodeString&,CATDMUsrFeature&,int,char*const)
Creates a new feature.
o Delete()
Deletes a feature.
o Demote()
Set the maturity of a feature to the previous level.
o GetAttributes(CATListOfCATUnicodeString&,CATListOfCATUnicodeString&)
Retrieves the attribute list.
o GetCaenv(CATUnicodeString&)
Retrieves feature environment.
o GetCatab(CATUnicodeString&)
Retrieves feature table.
o GetCoid(CATUnicodeString&)
Retrieves feature $COID in hexadecimal format.
o GetCoid(double&)
Retrieves feature $COID in binary format.
o GetCompid(CATUnicodeString&)
Retrieves feature $COMPID in hexadecimal format.
o GetCompid(double&)
Retrieves feature $COMPID in binary format.
o GetFather(CATDMUsrInstance&)
Retrieves feature parent.
o GetMaturity(CATUnicodeString&,int*)
Retrieves feature maturity and frozen status.
o GetName(CATUnicodeString&)
Retrieves feature name (as defined by $LIST_NAVIG profile variable).
o GetObjID(ObjID&)
Retrieves feature object id.
o GetType(CATUnicodeString&)
Retrieves feature type.
o GetUUID(char [50])
Retrieves feature UUID.
o GetValue(CATUnicodeString&,CATUnicodeString&)
Retrieves an attribute value.
o Promote()
Set the maturity of a feature to the next level.
o Query(CATDMUsrInstance&,CATUnicodeString&,CATDMUsrFeature*&,int&)
Queries features of a given type related to an instance.
o Read(int&,char*&)
Reads the contents of a feature.
o SetMaturity(CATUnicodeString&)
Set the maturity of a feature to a new value.
o Update(CATListOfCATUnicodeString&,CATListOfCATUnicodeString&)
Updates feature attributes.
o operator!=(CATDMUsrFeature&)
Inequality operator.
o operator=(CATDMUsrFeature&)
Assignment operator.
o operator==(CATDMUsrFeature&)
Equality operator.

Constructor and Destructor


o CATDMUsrFeature
public CATDMUsrFeature()
Default constructor.
Role: Build an empty (invalid) feature.
This feature MUST be assigned a valid feature before any service can be used.
o CATDMUsrFeature
public CATDMUsrFeature( const CATDMUsrFeature& iOther)
Copy constructor.
Role: Build a feature (in core memory) by copying another one.
Parameters:
iOther
Feature to copy.
o CATDMUsrFeature
public CATDMUsrFeature( const CATUnicodeString& iCaenv,
const CATUnicodeString& iCatab,
const CATUnicodeString& iCoid,
const CATUnicodeString& iCompid)
Constructor.
Role: Build a feature from environment, table, coid and compid (hexadecimal).
Parameters:
iCaenv
Database environment.
iCatab
Database table.
iCoid
Object $COID identifier in a hexadecimal string.
iCompid
Object $COMPID identifier in a hexadecimal string.
o CATDMUsrFeature
public CATDMUsrFeature( const CATUnicodeString& iCaenv,
const CATUnicodeString& iCatab,
const double iCoid,
const double iCompid)
Constructor.
Role: Build a feature from environment, table, coid and compid (binary).
Parameters:
iCaenv
Database environment.
iCatab
Database table.
iCoid
Object $COID identifier in binary format.
iCompid
Object $COMPID identifier in binary format.
o CATDMUsrFeature
public CATDMUsrFeature( const ObjID& iObjectID)
Constructor from an ObjID.
Role: Build a feature from an Object Id structure definition.
Parameters:
iObjectID
Feature object Id.
o CATDMUsrFeature
public CATDMUsrFeature( const char* iUUID)
Constructor from an UUID.
Role: Build a feature from an UUID.
See also:
GetUUID
Parameters:
iUUID
Feature UUID.
o ~CATDMUsrFeature
public ~CATDMUsrFeature()
Destructor.

Methods


o Create
public static Error Create( const CATDMUsrInstance& iParent,
const CATUnicodeString& iType,
const CATListOfCATUnicodeString& iAttrNames,
const CATListOfCATUnicodeString& iAttrValues,
CATDMUsrFeature& oFeature,
const int iSize=0,
const char*const iContents=0)
Creates a new feature.
Parameters:
iParent
Feature parent instance.
iType
Feature type.
iAttrNames
Names of attributes (including mandatory C_NAME attribute).
iAttrValues
Value of the attributes.
oFeature
Created feature.
iSize
Contents length in bytes.
iContents
Feature contents.
Returns:
Error code and messages.
o Delete
public Error Delete()
Deletes a feature.
Returns:
Error code and messages.
o Demote
public Error Demote()
Set the maturity of a feature to the previous level.
Returns:
Error code and messages.
o GetAttributes
public Error GetAttributes(CATListOfCATUnicodeString& oAttrNames,
CATListOfCATUnicodeString& oAttValues) const
Retrieves the attribute list.
Parameters:
oAttrNames
Names of the attributes.
oAttValues
Values of the attributes.
Returns:
Error code and messages.
o GetCaenv
public Error GetCaenv(CATUnicodeString& oCaenv) const
Retrieves feature environment.
Parameters:
oCaenv
Feature environment name.
Returns:
Error code and messages.
o GetCatab
public Error GetCatab(CATUnicodeString& oCatab) const
Retrieves feature table.
Parameters:
oCatab
Feature table name.
Returns:
Error code and messages.
o GetCoid
public Error GetCoid(CATUnicodeString& oCoid) const
Retrieves feature $COID in hexadecimal format.
Parameters:
oCoid
Feature $COID.
Returns:
Error code and messages.
o GetCoid
public Error GetCoid(double& oCoid) const
Retrieves feature $COID in binary format.
Parameters:
oCoid
Feature $COID.
Returns:
Error code and messages.
o GetCompid
public Error GetCompid(CATUnicodeString& oCompid) const
Retrieves feature $COMPID in hexadecimal format.
Parameters:
oCompid
Feature $COMPID.
Returns:
Error code and messages.
o GetCompid
public Error GetCompid(double& oCompid) const
Retrieves feature $COMPID in binary format.
Parameters:
oCompid
Feature $COMPID.
Returns:
Error code and messages.
o GetFather
public Error GetFather(CATDMUsrInstance& oFatherInstance) const
Retrieves feature parent.
Parameters:
oFatherInstance
Feature parent instance.
Returns:
Error code and messages.
o GetMaturity
public Error GetMaturity(CATUnicodeString& oMaturity,
int* oIsLocked=0) const
Retrieves feature maturity and frozen status.
Parameters:
oMaturity
Current maturity level.
oIsLocked
If not null, contains frozen status of feature.
Returns:
Error code and messages.
o GetName
public Error GetName(CATUnicodeString& oName) const
Retrieves feature name (as defined by $LIST_NAVIG profile variable).
Parameters:
oName
Feature name.
Returns:
Error code and messages.
o GetObjID
public Error GetObjID(ObjID& oObjectId) const
Retrieves feature object id.
Parameters:
oObjectId
Feature object id structure.
Returns:
Error code and messages.
o GetType
public Error GetType(CATUnicodeString& oType) const
Retrieves feature type.
Parameters:
oType
Feature type.
Returns:
Error code and messages.
o GetUUID
public Error GetUUID(char [50] oUUID) const
Retrieves feature UUID.
UUID's are structured as follows :
   Db name ( 8 characters)
   Caenv   ( 8           )
   Catab   (18           )
   $COID   ( 8           )
   $COMPID ( 8           )
 
Parameters:
oUUID
Instance UUID.
Returns:
Error code and messages.
o GetValue
public Error GetValue( const CATUnicodeString& iAttribute,
CATUnicodeString& oValue) const
Retrieves an attribute value.
Parameters:
iAttribute
Attribute name.
oValue
Attribute value or NULL if attribute does not exist.
Returns:
Error code and messages.
o Promote
public Error Promote()
Set the maturity of a feature to the next level.
Returns:
Error code and messages.
o Query
public static Error Query( const CATDMUsrInstance& iParent,
const CATUnicodeString& iType,
CATDMUsrFeature*& oFeatures,
int& oNbFeatures)
Queries features of a given type related to an instance.
Parameters:
iParent
Features parent instance.
iType
Features type.
oFeatures
Array of found features.
oNbFeatures
Number of found features.
Returns:
Error code and messages.
o Read
public Error Read(int& oSize,
char*& oContents) const
Reads the contents of a feature.
Parameters:
oSize
Contents length in bytes.
oContents
Address of memory allocation containing data.
Returns:
Error code and messages.
o SetMaturity
public Error SetMaturity( const CATUnicodeString& iMaturity)
Set the maturity of a feature to a new value.
Input value must belong to the list of authorized maturity values in use for the feature.
Parameters:
iMaturity
New maturity level.
Returns:
Error code and messages.
o Update
public Error Update( const CATListOfCATUnicodeString& iAttrNames,
const CATListOfCATUnicodeString& iAttrValues)
Updates feature attributes.
Parameters:
iAttrNames
Names of attributes to update.
iAttrValues
New values for attributes to update.
Returns:
Error code and messages.
o operator!=
public int operator!=( const CATDMUsrFeature& iOther) const
Inequality operator.
Role: Compare a feature to another one according to their internal identifiers.
Parameters:
iOther
Feature to be compared to current one.
Returns:
1 if the two objects are different features.
0 otherwise.
o operator=
public CATDMUsrFeature operator=( const CATDMUsrFeature& iOther)
Assignment operator.
Role: Assigns a feature object to another one.
Parameters:
iOther
Feature to be assigned.
Returns:
Assigned object.
o operator==
public int operator==( const CATDMUsrFeature& iOther) const
Equality operator.
Role: Compare a feature to another one according to their internal identifiers.
Parameters:
iOther
Feature to be compared to current one.
Returns:
1 if the two objects are the same feature.
0 otherwise.

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

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